summaryrefslogtreecommitdiffstats
path: root/site/posts/meta/Bootstrap.org
diff options
context:
space:
mode:
authorThomas Letan <lthms@soap.coffee>2020-02-20 18:09:35 +0100
committerThomas Letan <lthms@soap.coffee>2020-02-20 18:09:35 +0100
commit36b9264cc8eedcc6f4d3f8499b3d627e4ffae52b (patch)
treeecebd53849f7f5e9d8d96bbe91cd60d7cf98d706 /site/posts/meta/Bootstrap.org
parent046606ce1f33c0a2b2955df6ca7dc8b56985d4f0 (diff)
Make an heavy use of Makefile variables
Diffstat (limited to 'site/posts/meta/Bootstrap.org')
-rw-r--r--site/posts/meta/Bootstrap.org33
1 files changed, 18 insertions, 15 deletions
diff --git a/site/posts/meta/Bootstrap.org b/site/posts/meta/Bootstrap.org
index a6ced60..9765d56 100644
--- a/site/posts/meta/Bootstrap.org
+++ b/site/posts/meta/Bootstrap.org
@@ -3,40 +3,43 @@
#+END_EXPORT
#+BEGIN_SRC emacs-lisp :tangle (concat (getenv "ROOT") "/scripts/tangle-org.el")
+ (require 'org)
(setq org-src-preserve-indentation t)
(org-babel-tangle)
#+END_SRC
#+BEGIN_SRC makefile :tangle (concat (getenv "ROOT") "/bootstrap.mk")
-GEN_SCRIPTS += scripts/export-org.el
-MAKEFILES += org.mk coq.mk
+SASS := $(shell find site/ -name "*.sass")
+
+GENFILES += scripts/export-org.el org.mk coq.mk \
+ $(SASS:.sass=.css) soupault.conf
+
+EMACS := ROOT="${ROOT}" emacs
include org.mk coq.mk
-build : ${INPUTS} soupault.conf
+TANGLEARGS := --batch \
+ --load="${ROOT}/scripts/tangle-org.el"
+
+build : ${GENFILES}
@echo " run soupault"
@soupault
@echo " update .gitignore"
- @scripts/update-gitignore.sh ${INPUTS} ${MAKEFILES} ${GEN_SCRIPTS}
+ @scripts/update-gitignore.sh ${GENFILES}
clean :
- @echo " remove generated makefiles"
- @rm -f ${MAKEFILES}
- @echo " remove generated files in site/"
- @rm -f ${INPUTS}
- @echo " remove build/ directory"
- @rm -rf build
+ @echo " remove generated files"
+ @rm -rf ${GENFILES} build/
force : clean build
-soupault.conf : site/posts/meta/Soupault.org
+soupault.conf : ${CLEODIR}/Soupault.org
@echo " tangle $<"
- @emacs $< --batch --load="${ROOT}/scripts/tangle-org.el" 2>/dev/null
-
+ @${EMACS} $< ${TANGLEARGS}
-org.mk coq.mk scripts/export-org.el &: site/posts/meta/Contents.org
+org.mk coq.mk scripts/export-org.el &: ${CLEODIR}/Contents.org
@echo " tangle $<"
- @emacs $< --batch --load="${ROOT}/scripts/tangle-org.el" 2>/dev/null
+ @${EMACS} $< ${TANGLEARGS}
%.css : %.sass
@echo " compile $*.sass"