2022-10-18 17:20:26 +00:00
|
|
|
SRC = $(wildcard *.md)
|
|
|
|
|
2022-10-19 10:00:57 +00:00
|
|
|
DISCOURSE_MD = $(addprefix discourse/, $(SRC))
|
|
|
|
HTML_MD = $(addprefix html/, $(SRC))
|
|
|
|
HTML = $(HTML_MD:.md=.html)
|
|
|
|
|
|
|
|
discourse/%.md: %.md
|
|
|
|
@mkdir --parents discourse
|
|
|
|
python3 ./substitute-links.py md-to-discourse --input $^ --output $@
|
|
|
|
|
|
|
|
html/%.md: %.md
|
2022-10-18 17:20:26 +00:00
|
|
|
@mkdir --parents html
|
2022-10-19 10:00:57 +00:00
|
|
|
python3 ./substitute-links.py md-to-html --input $^ --output $@
|
|
|
|
|
|
|
|
%.html: %.md
|
2022-10-19 08:57:30 +00:00
|
|
|
pandoc $^ --standalone --output $@
|
2022-10-18 17:20:26 +00:00
|
|
|
|
2022-10-19 10:00:57 +00:00
|
|
|
.PHONY: html
|
|
|
|
html: $(HTML)
|
|
|
|
|
|
|
|
.PHONY: discourse
|
|
|
|
discourse: $(DISCOURSE_MD)
|
2022-10-18 17:20:26 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2022-10-19 10:00:57 +00:00
|
|
|
$(RM) $(DISCOURSE_MD)
|
|
|
|
$(RM) -d discourse
|
2022-10-18 17:20:26 +00:00
|
|
|
$(RM) $(HTML)
|
|
|
|
$(RM) -d html
|