# BENZIN Makefile
HEADER=templates/header.html
PANDOC_ARGS=--from=gfm+emoji --to=html --section-divs
SOURCES=$(wildcard src/*.md src/**/*.md)
TMP_HTML=$(patsubst src/%.md, tmp/%.content.html, $(SOURCES))
HTML=$(patsubst src/%.md, out/%.html, $(SOURCES))
.PHONY: clean all
.SECONDARY: $(TMP_HTML)
all: $(HTML)
out/%.html: $(HEADER) tmp/%.content.html
mkdir -p $(@D)
cat $^ > $@
tmp/%.content.html: src/%.md
mkdir -p $(@D)
cat $< | pandoc $(PANDOC_ARGS) > $@
clean:
rm -rf tmp out