19 lines
424 B
Makefile
19 lines
424 B
Makefile
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)/*
|