aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile24
1 files 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