From 2b78fd32196a5193dd1932c06d89aeb004f84afd Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 19 Feb 2020 10:58:12 +0100 Subject: Initiate a literate programming approach for the Makefile rules --- Makefile | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c24a187..b8dbffc 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,32 @@ SASS := $(shell find site/ -name "*.sass") -ORG_POSTS := $(shell find site/ -name "*.org") -COQ_POSTS := $(shell find site/ -name "*.v") -INPUTS := $(ORG_POSTS:.org=.html) $(COQ_POSTS:.v=.html) $(SASS:.sass=.css) +INPUTS := $(SASS:.sass=.css) +MAKEFILES := org.mk coq.mk -COQCARGS := -async-proofs-cache force -w -custom-entry-overriden +include ${MAKEFILES} build: ${INPUTS} soupault.conf @echo "run soupault" @soupault - @scripts/update-gitignore.sh ${INPUTS} + @echo "update gitignore" + @scripts/update-gitignore.sh ${INPUTS} ${MAKEFILES} clean: - rm -f ${INPUTS} - rm -rf build + @echo "remove generated makefiles" + @rm -f ${MAKEFILES} + @echo "remove generated files in site/" + @rm -f ${INPUTS} + @echo "remove build/ directory" + @rm -rf build force: clean build -soupault.conf: site/posts/SoupaultConfiguration.org +soupault.conf: site/posts/meta/Soupault.org @echo "generate soupault.conf" @emacs $< --batch --eval "(org-babel-tangle)" --kill 2>/dev/null -%.html: %.v - @echo "export $*.v" - @coqc ${COQCARGS} $*.v - @coqdoc --no-index --charset utf8 --short --body-only -d site/posts/ \ - --coqlib "https://coq.inria.fr/distrib/current/stdlib/" \ - $*.v - @sed -i -e 's/href="$(shell basename $*.html)\#/href="\#/g' $*.html - @rm -f site/posts/coqdoc.css - -%.html: %.org - @echo "export $*.org" - @emacs $< --batch --eval "(setq org-html-htmlize-output-type nil)" --eval "(org-html-export-to-html nil nil nil t)" --kill +org.mk coq.mk &: site/posts/meta/Contents.org + @echo "generate org.mk, coq.mk" + @emacs $< --batch --eval "(org-babel-tangle)" --kill 2>/dev/null %.css: %.sass @echo "compile $*.sass" -- cgit v1.2.3