summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-12-30 19:20:36 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-12-30 19:20:36 +0100
commit8170b6616c13828b434e0103b362ca0e056309d0 (patch)
treed7c8367ffc38c507a7cec22327a5e62a19ce5ae9 /Makefile
parent74a28fd0f2ccab43a51430dd29093053f9e366ea (diff)
downloadquatuorbellefeuille.com-8170b6616c13828b434e0103b362ca0e056309d0.tar.xz
Add template machinery
*Of course* it's going to be an ugly Bash script. Is there anything else?
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 08319dc..59be5a8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,27 @@
-pages = $(wildcard *.html)
+pages_src = $(wildcard *.html)
+pages = $(foreach p,$(pages_src),public/$(p))
+
sheets = $(wildcard *.css)
images = $(wildcard *.svg)
feeds = $(wildcard *.xml)
-resources = $(pages) $(sheets) $(images) $(feeds)
-targets = $(foreach f,$(resources),public/$(f))
+resources_src = $(sheets) $(images) $(feeds)
+resources = $(foreach f,$(resources_src),public/$(f))
+
.PHONY: all clean site
all: site
-site: $(targets)
+site: $(pages) $(resources)
public:
mkdir $@
-$(targets): public/%: % | public
+$(resources): public/%: % | public
cp $< $@
+$(pages): public/%.html: %.html | public
+ ./build.sh $< $@
+
clean:
rm -r public