diff options
author | Thomas Letan <lthms@soap.coffee> | 2020-02-19 17:05:44 +0100 |
---|---|---|
committer | Thomas Letan <lthms@soap.coffee> | 2020-02-19 17:05:44 +0100 |
commit | c87e51b9ff0d539dc5cb0bf1f8afafebd25efb5e (patch) | |
tree | 7388067320532dfa9446748a794cf9b70fa1842d | |
parent | Add a section in write-up index for the meta contents (diff) |
Rework the Makefiles for a cleaner handling of generated scripts
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 41 | ||||
-rw-r--r-- | site/posts/meta/Contents.org | 21 | ||||
-rw-r--r-- | site/posts/meta/Soupault.org | 9 |
4 files changed, 39 insertions, 33 deletions
@@ -27,4 +27,5 @@ site/posts/RewritingInCoq.html site/posts/Ltac101.html org.mk coq.mk +scripts/export-org.el # begin generated files @@ -1,36 +1,37 @@ -SASS := $(shell find site/ -name "*.sass") -INPUTS := $(SASS:.sass=.css) -MAKEFILES := org.mk coq.mk -ROOT := $(shell pwd) +SASS := $(shell find site/ -name "*.sass") +INPUTS := $(SASS:.sass=.css) +MAKEFILES := org.mk coq.mk +ROOT := $(shell pwd) +GEN_SCRIPTS := include ${MAKEFILES} -build: ${INPUTS} soupault.conf - @echo "run soupault" +build : ${INPUTS} soupault.conf + @echo " run soupault" @soupault - @echo "update gitignore" - @scripts/update-gitignore.sh ${INPUTS} ${MAKEFILES} + @echo " update .gitignore" + @scripts/update-gitignore.sh ${INPUTS} ${MAKEFILES} ${GEN_SCRIPTS} -clean: - @echo "remove generated makefiles" +clean : + @echo " remove generated makefiles" @rm -f ${MAKEFILES} - @echo "remove generated files in site/" + @echo " remove generated files in site/" @rm -f ${INPUTS} - @echo "remove build/ directory" + @echo " remove build/ directory" @rm -rf build -force: clean build +force : clean build -soupault.conf: site/posts/meta/Soupault.org - @echo "generate soupault.conf" - @emacs $< --batch --eval "(org-babel-tangle)" --kill 2>/dev/null +soupault.conf : site/posts/meta/Soupault.org + @echo " tangle $<" + @emacs $< --batch --eval "(org-babel-tangle)" --kill -org.mk coq.mk &: site/posts/meta/Contents.org - @echo "generate org.mk, coq.mk" +org.mk coq.mk scripts/export-org.el &: site/posts/meta/Contents.org + @echo " tangle $<" @emacs $< --batch --eval "(org-babel-tangle)" --kill 2>/dev/null -%.css: %.sass - @echo "compile $*.sass" +%.css : %.sass + @echo " compile $*.sass" @sassc --style=compressed --sass $< $@ .PHONY: clean build force diff --git a/site/posts/meta/Contents.org b/site/posts/meta/Contents.org index cc580d8..7cae32f 100644 --- a/site/posts/meta/Contents.org +++ b/site/posts/meta/Contents.org @@ -17,9 +17,10 @@ #+BEGIN_SRC makefile :tangle ../../../org.mk ORG_POSTS := $(shell find site/ -name "*.org") INPUTS += $(ORG_POSTS:.org=.html) +GEN_SCRIPTS += scripts/export-org.el -%.html: %.org - @echo "export $*.org" +%.html : %.org scripts/export-org.el + @echo " export $*.org" @emacs $< --batch --kill \ --load="${ROOT}/scripts/export-org.el" \ #+END_SRC @@ -34,15 +35,15 @@ INPUTS += $(ORG_POSTS:.org=.html) COQ_POSTS := $(shell find site/ -name "*.v") INPUTS += $(COQ_POSTS:.v=.html) -COQCARGS := -async-proofs-cache force \ - -w -custom-entry-overriden -COQDOCARGS := --no-index --charset utf8 --short --body-only \ - --coqlib "https://coq.inria.fr/distrib/current/stdlib/" +COQCARG := -async-proofs-cache force \ + -w -custom-entry-overriden +COQDOCARG := --no-index --charset utf8 --short --body-only \ + --coqlib "https://coq.inria.fr/distrib/current/stdlib/" -%.html: %.v - @echo "export $*.v" - @coqc ${COQCARGS} $< - @coqdoc ${COQDOCARGS} -d $(shell dirname $<) $< +%.html : %.v + @echo " export $*.v" + @coqc ${COQCARG} $< + @coqdoc ${COQDOCARG} -d $(shell dirname $<) $< @sed -i -e 's/href="$(shell basename $@)\#/href="\#/g' $@ @rm -f $(shell dirname $<)/coqdoc.css #+END_SRC diff --git a/site/posts/meta/Soupault.org b/site/posts/meta/Soupault.org index bbc05c5..a935c85 100644 --- a/site/posts/meta/Soupault.org +++ b/site/posts/meta/Soupault.org @@ -1,10 +1,10 @@ #+BEGIN_EXPORT html -<h1><code>soap.coffee/~lthms</code> Soupault Configuration</h1> +<h1><code>soupault</code> Configuration</h1> <div id="history">site/posts/meta/Soupault.org</div> #+END_EXPORT -#+BEGIN_SRC toml :tangle ../../soupault.conf +#+BEGIN_SRC toml :tangle ../../../soupault.conf [settings] strict = true verbose = false @@ -13,7 +13,10 @@ build_dir = "build" page_file_extensions = ["html"] - ignore_extensions = ["draft", "vo", "vok", "vos", "glob", "html~", "org", "aux", "sass"] + ignore_extensions = [ + "draft", "vo", "vok", "vos", "glob", + "html~", "org", "aux", "sass", + ] generator_mode = true complete_page_selector = "html" |