clean up how the website is built a bit

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2025-04-04 18:00:31 -05:00
parent dbd46654cf
commit 179d5c162a
Signed by: bss
GPG Key ID: 3DE06D3180895FCB

View File

@ -9,13 +9,18 @@ BASE_PATCH_DIR := ./patches/base
BASE_PATCHES := $(wildcard $(BASE_PATCH_DIR)/*.patch)
BASE_PATCHES_OUT := $(subst $(BASE_PATCH_DIR),$(TMPDIR),$(BASE_PATCHES))
WEB_PATCH_DIR := ./patches/web
WEB_PATCHES := $(wildcard $(WEB_PATCH_DIR)/*.patch)
WEB_PATCHES_OUT := $(subst $(WEB_PATCH_DIR),$(TMPDIR),$(WEB_PATCHES))
# DEFAULT BUILD
all: base-patches
all: base
# CCSRD VERSIONS
base-patches: $(CCSRD) $(BASE_PATCHES_OUT)
base: $(CCSRD) $(BASE_PATCHES_OUT)
web: base $(WEB_PATCHES_OUT)
# CLEANUPS
@ -33,10 +38,14 @@ $(TMPDIR)/%.patch: $(BASE_PATCH_DIR)/%.patch
patch $(CCSRD) $< --quiet
@touch $@
$(TMPDIR)/%.patch: $(WEB_PATCH_DIR)/%.patch
$(info >>> WEB '$<')
patch $(CCSRD) $< --quiet
@touch $@
# OUTPUTS
web: base-patches
find patches/web -type f -name \*.patch -print0 | sort -z | xargs -0 -n 1 patch $(CCSRD)
http: base web
cp -a $(WEBDIR) $(TMPDIR)/
mkdir -p $(PAGESDIR)
cp $(CCSRD) $(PAGESDIR)/index.md