diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2024-10-24 19:50:15 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2024-10-24 19:50:15 -0500 |
| commit | 015932a62e400e7d595777b6b29f64e60ae12943 (patch) | |
| tree | fe079726bcf33ba5f7430d6d96ac7e42644d9197 /src/Makefile | |
| parent | f824bbcca25b4caaef8023cf36efaaed37e7257f (diff) | |
changes
Diffstat (limited to 'src/Makefile')
| -rw-r--r-- | src/Makefile | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index c60678a..7c7af1f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,28 +1,26 @@ -BUILD_DIR = _build +BUILD_DIR ?= build -MARKDOWNFILES != find md/ -type f -name "*.md" +MARKDOWNFILES = $(wildcard md/*.md) HTMLTARGETS = $(MARKDOWNFILES:md/%.md=$(BUILD_DIR)/stories/%.html) -$(BUILD_DIR)/stories/%.html: md/%.md +$(BUILD_DIR)/stories $(BUILD_DIR): + mkdir -p $@ + +$(BUILD_DIR)/stories/%.html: md/%.md | $(BUILD_DIR)/stories pandoc "$<" \ --standalone \ --embed-resources \ --template template.html \ -o "$@" -$(BUILD_DIR)/index.html: make_index.md.sh +$(BUILD_DIR)/index.html: gen/gen_index.sh | $(BUILD_DIR) bash $< | pandoc \ --standalone \ --embed-resources \ --template template.html \ -o "$@" -make_dirs: - mkdir -p $(BUILD_DIR)/stories - all: make_dirs $(HTMLTARGETS) $(BUILD_DIR)/index.html -clean: - rm -rf $(BUILD_DIR) +.PHONY: make_dirs all -.PHONY: clean make_dirs all up |
