knazarov.com/Makefile

20 lines
424 B
Makefile
Raw Normal View History

2021-08-15 20:11:40 +00:00
ODIR=output
PAGES_SRC := $(wildcard pages/*)
PAGES_DST := $(patsubst pages/%,$(ODIR)/%/index.html,$(PAGES_SRC))
all: $(PAGES_DST) $(ODIR)/style.css $(ODIR)/index.html
$(ODIR)/%/index.html: pages/%/note.md
mkdir -p "$(dir $@)"
cat "$<" | ./mdpage.sh > "$@"
$(ODIR)/index.html: index.md
cat index.md | ./mdpage.sh --notitle > "$@"
$(ODIR)/style.css: style.css
cp style.css $(ODIR)/style.css
clean:
rm -rf $(ODIR)/*