some build stuff

This commit is contained in:
2018-05-02 13:46:39 +02:00
parent 17d1d5e3d7
commit 958e97a666
14 changed files with 162 additions and 0 deletions

26
Makefile Normal file
View File

@ -0,0 +1,26 @@
POSTS = $(shell find ./posts -mindepth 1 -type d)
.PHONY: all
all:
$(MAKE) posts
$(MAKE) index
.PHONY: posts
posts:
for d in $(POSTS); do (echo $$d; cd $$d; $(MAKE) -f ../../m4/posts.mk); done
.PHONY: clean
clean:
for d in $(POSTS); do (cd $$d; $(MAKE) -f ../../m4/posts.mk cleanposts); done
-rm -f toc.inc
-rm -f abstracts.inc
-rm -f index.html
.PHONY: index
index:
-rm -f toc.inc
-rm -f abstracts.inc
for d in $(POSTS); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexTOCEntry.m4) >> toc.inc; done
for d in $(POSTS); do (cd $$d; m4 -D URL=$$d/article.html ../../m4/macros.m4 article.m4 ../../m4/indexAbstractsEntry.m4) >> abstracts.inc; done
m4 ./m4/macros.m4 index.m4 > index.html