From e4bb845655ccc4c0788336b140845b051bd661a5 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 10 Dec 2022 13:16:48 +0100 Subject: make Makefile more convenient for manual use --- Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 79f800e..c04bbfa 100644 --- a/Makefile +++ b/Makefile @@ -4,19 +4,15 @@ # # Available under the terms of Creative Commons Zero v1.0 Universal. -ifndef WEBSITE -$(error `WEBSITE` not defined) -endif - -ifndef DEST -$(error `DEST` not defined) -endif +GUIX := guix +ifdef WEBSITE all: $(WEBSITE)/en/index.html $(WEBSITE)/en/index.html: $(WEBSITE)/index.html sed 's/type="checkbox">/type="checkbox" checked>/' $< > $@ +ifdef DEST install: $(WEBSITE)/en/index.html mkdir -p "$(DEST)"/static cp -r ./$(WEBSITE)/* "$(DEST)" @@ -24,8 +20,18 @@ install: $(WEBSITE)/en/index.html cp ./LICENSES/LicenseRef-Normalize-CSS-MIT.txt \ $(DEST)/static/normalize-mit-license.txt cp ./LICENSES/CC0-1.0.txt $(DEST)/static/cc0-1.0.txt +endif +else +all: + $(MAKE) all WEBSITE=sheets + $(MAKE) all WEBSITE=pray +endif + +build-sheets-websites: + $(MAKE) clean + $(GUIX) build -f guix.scm clean: - rm -f $(WEBSITE)/en/index.html + rm -f sheets/en/index.html pray/en/index.html -.PHONY: all install clean +.PHONY: all install build-sheets-websites clean -- cgit v1.2.3