From 5044f79cbe4828d82dad1dff7e406f1b198dbcc7 Mon Sep 17 00:00:00 2001 From: Andrew Stryker Date: Wed, 20 Dec 2023 11:08:42 -0800 Subject: [PATCH] Start organizing the Makefile --- Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c5db62f..0a92cde 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,11 @@ DEST ?= axs@sdf.org:html SITE_URL ?= https://axs.sdf.org -.PHONY: default help publish +.PHONY: default help publish build -build: #> - @echo "\t 🏗️ Building site" - @# We call hugo with two options: - @# --cleanDestinationDir, to remove deleted files - @# --minify, to compress files my removing extra whitespace - hugo --cleanDestinationDir --minify +default: build + +build: .build_sentinel #> publish: build #> Publish site @echo "Publishing..." @@ -36,3 +33,11 @@ publish: build #> Publish site @ssh axs@sdf.org 'mkhomepg -p' @echo "✓ Publising complete" @echo "\nThe site should be available on ${SITE_URL}" + +.build_sentinel: $(wildcard content/*/*) + @echo "\t 🏗️ Building site" + @# We call hugo with two options: + @# --cleanDestinationDir, to remove deleted files + @# --minify, to compress files my removing extra whitespace + hugo --cleanDestinationDir --minify + @touch $@