From 5945bc80300f5504403ffe533dc60bfc95762695 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Wed, 26 Feb 2020 19:16:22 +0100 Subject: Introduce a notion of dependency between generation processes The chain of generation processes is now divided into three well-identified stages. The order of definition of generation processes is no longer important. --- Makefile | 45 +++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 593e062..03be338 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,46 @@ ROOT := $(shell pwd) CLEODIR := site/cleopatra -GENFILES := -GENAUX := -CONTENTS := -GENSASS := +ARTIFACTS := build.log +CONFIGURE := EMACSBIN := emacs EMACS := ROOT="${ROOT}" ${EMACSBIN} -TANGLE := --batch --load="${ROOT}/scripts/tangle-org.el" \ +TANGLE := --batch \ + --load="${ROOT}/scripts/tangle-org.el" \ 2>> build.log -default: init-log build +define emacs-tangle = +echo " tangle $<" +${EMACS} $< ${TANGLE} +endef -init-log: +default : postbuild ignore + +init : @rm -f build.log -.PHONY: init-log default build +prebuild : init + +build : prebuild -GENFILES += bootstrap.mk scripts/update-gitignore.sh -GENSASS += +postbuild : build + +.PHONY : init prebuild build postbuild ignore include bootstrap.mk -bootstrap.mk scripts/update-gitignore.sh \ - &: ${CLEODIR}/Bootstrap.org - @echo " tangle $<" - @${EMACS} $< ${TANGLE} +prebuild : bootstrap-prebuild +build : bootstrap-build +postbuild : bootstrap-postbuild + +bootstrap-build : bootstrap-prebuild +bootstrap-postbuild : bootstrap-build + +bootstrap.mk scripts/update-gitignore.sh &:\ + ${CLEODIR}/Bootstrap.org + @$(emacs-tangle) + +CONFIGURE += bootstrap.mk scripts/update-gitignore.sh + +.PHONY : bootstrap-prebuild bootstrap-build bootstrap-postbuild -- cgit v1.2.3