aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 42d7d64..f5a72f0 100644
--- a/Makefile
+++ b/Makefile
@@ -3,22 +3,25 @@ BUILD_DIR ?= build
MARKDOWNFILES = $(wildcard md/*.md)
HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html)
-$(BUILD_DIR)/stories $(BUILD_DIR):
+GENFILES = $(wildcard gen/gen_*.sh)
+GENTARGETS = $(GENFILES:gen/gen_%.sh=$(BUILD_DIR)/%.html)
+
+$(BUILD_DIR)/stories $(BUILD_DIR): ## Requisite folders
mkdir -p $@
-$(BUILD_DIR)/stories/%.html: md/%.md | $(BUILD_DIR)/stories
+$(BUILD_DIR)/stories/%.html: md/%.md | $(BUILD_DIR)/stories ## MD Files -> HTML
pandoc "$<" \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
-$(BUILD_DIR)/index.html: gen/gen_index.sh | $(BUILD_DIR)
+$(BUILD_DIR)/%.html: gen/gen_%.sh | $(BUILD_DIR) ## Shell Script -> MD Files -> HTML
bash $< | pandoc \
--standalone \
--embed-resources \
--template template.html \
-o "$@"
-all: $(HTMLTARGETS) $(BUILD_DIR)/index.html
+all: $(HTMLTARGETS) $(GENTARGETS)
.PHONY: all