diff options
Diffstat (limited to 'tools/makefile')
-rw-r--r-- | tools/makefile | 13 |
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' |