commit e144113787d2d6a16fae03b2f3195b57963afbfa
parent 0a9b2663ae4cefdac551bd83bdef6f6c87076f1d
Author: lou woell <lou@repetitions.de>
Date:   Mon,  7 Sep 2026 00:49:06 +0200

properly set up build dir in makefile

Diffstat:
Mmakefile | 26++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/makefile b/makefile @@ -14,17 +14,25 @@ GEN=lisp/bin/ethicagen VERSIONS=la_spinoza en_elwes de_stern de_auerbach fr_saisset fr_appuhn HTML = $(foreach v, $(VERSIONS), $(BUILD_DIR)/$(v).html) -.PHONY: all +.PHONY: all deploy clean + all: $(HTML) $(BUILD_DIR)/assets -$(BUILD_DIR)/assets: +$(BUILD_DIR): + @echo --- + @echo Create build directory. + @echo + mkdir -p $@ + @echo --- + +$(BUILD_DIR)/assets: $(BUILD_DIR) @echo --- - @echo Link assets + @echo Link assets. @echo ln -sfr assets -t $(BUILD_DIR) @echo --- -$(HTML) &: $(DATA_DIR)/* $(DATA_DIR)/meta.json $(TEMPLATE_DIR) $(GEN) +$(HTML) &: $(DATA_DIR)/* $(DATA_DIR)/meta.json $(TEMPLATE_DIR) $(GEN) $(BUILD_DIR) @echo --- @echo Generating HTML files. @echo @@ -34,7 +42,7 @@ $(HTML) &: $(DATA_DIR)/* $(DATA_DIR)/meta.json $(TEMPLATE_DIR) $(GEN) -- $(VERSIONS) @echo --- -$(ARCHIVE): $(SRC_DIRS) $(FILES) +$(ARCHIVE): $(SRC_DIRS) $(FILES) $(BUILD_DIR) @echo --- @echo Generating source archive. @echo @@ -58,4 +66,10 @@ deploy: $(ARCHIVE) all rsync -vrL --delete $(BUILD_DIR)/ repetitions:~/ethica @echo --- -.PHONY: deploy clean +clean: + @echo --- + @echo Cleaning directory. + @echo + rm -R $(BUILD_DIR) + rm -R lisp/bin + @echo ---