wowana.me
website source
commit 1e72c1b7ef9842dc8576581dece2d853e1c9ff56 Author: opal hart <opal@wowana.me> Date: Mon, 6 May 2019 09:09:10 +0000 add Makefile Diffstat:
A | Makefile | | | 24 | ++++++++++++++++++++++++ |
1 file changed, 24 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile @@ -0,0 +1,24 @@ +PHONY := all check clean debug +SRC := $(wildcard src/*.md src/blog/*.md) +OBJ := $(SRC:%.md=%.part.xht) +FINAL := $(OBJ:src/%.part.xht=out/%.xht) + +all: $(FINAL) + +check: $(FINAL) + xmllint --nonet --noout $^ + +clean: + # only removes files we generated, not manually-created files + rm -f $(FINAL) + +debug: + @echo "SRC := $(SRC)" + @echo "OBJ := $(OBJ)" + @echo "FINAL := $(FINAL)" + +src/%.xht.part: src/%.md + markdown < $< > $@ + +out/%.xht: src/%.xht.part + cat src/header.inc $< src/footer.inc > $@