Tidy and organize Makefile

No features added.
This commit is contained in:
Andrew Stryker 2024-01-09 17:00:48 -08:00
parent 0841debef3
commit 8a692c80bd

View File

@ -1,18 +1,40 @@
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#
# Manage website building
#
# Andrew Stryker <axs@sdf.org>
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#-----------------------------------------------------------------------------#
#
# Configuration
#
#-----------------------------------------------------------------------------#
DEST ?= axs@sdf.org:html
SITE_URL ?= https://axs.sdf.org
.PHONY: default help publish
#-----------------------------------------------------------------------------#
#
# Define user interface
#
#-----------------------------------------------------------------------------#
.PHONY: default help publish build
default: build
build: #>
@echo "\t 🏗️ Building site"
@echo "🏗️ Building site"
@# We call hugo with two options:
@# --cleanDestinationDir, to remove deleted files
@# --minify, to compress files my removing extra whitespace
hugo --cleanDestinationDir --minify
@echo "✓ Building complete"
publish: build #> Publish site
@echo "Publishing..."
@echo "📰Publishing..."
@# rsync options:
@# verbose: show each operation
@# links: preserve symlinks
@ -20,7 +42,7 @@ publish: build #> Publish site
@# times: preserve modification times
@# delete: delete extraneous files, i.e., files on destination
@# chmod: set permsions
@echo "\t Copying from public to ${DEST}"
@echo "\t 📡 Copying from public to ${DEST}"
@rsync \
--verbose \
--recursive \
@ -36,3 +58,5 @@ publish: build #> Publish site
@ssh axs@sdf.org 'mkhomepg -p'
@echo "✓ Publising complete"
@echo "\nThe site should be available on ${SITE_URL}"
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#