aboutsummaryrefslogtreecommitdiff
path: root/tools/makefile
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-08-29 16:10:49 +0200
committermetamuffin <metamuffin@disroot.org>2022-08-29 16:10:49 +0200
commit18f53568b43380665686dc9e7785790f9921ce8f (patch)
tree8b32f2bfda532c77601fcd22fca2fce8761035ea /tools/makefile
parent9ca6cc8c0acdd68d2c79f1f990c9dd81dd9fef4b (diff)
downloadmetamuffin-blog-18f53568b43380665686dc9e7785790f9921ce8f.tar
metamuffin-blog-18f53568b43380665686dc9e7785790f9921ce8f.tar.bz2
metamuffin-blog-18f53568b43380665686dc9e7785790f9921ce8f.tar.zst
a
Diffstat (limited to 'tools/makefile')
-rw-r--r--tools/makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/makefile b/tools/makefile
index acd0717..15b8a45 100644
--- a/tools/makefile
+++ b/tools/makefile
@@ -1,5 +1,14 @@
TOOL := ../tools/target/debug/blog-tool
-out/%.html: articles/%.html $(TOOL)
- $(TOOL) render -i $< -o $@
+SRC_ARTICLES := $(shell find articles -type f)
+OUT_ARTICLES := $(SRC_ARTICLES:articles/%.md=out/%.html)
+
+all: $(OUT_ARTICLES)
+
+out/%.html: articles/%.md $(TOOL)
+ mkdir -p out
+ $(TOOL) render-article $< > $@
+
+$(TOOL): $(shell find ../tools/src -type f)
+ sh -c 'cd ../tools; cargo build'