1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 13:25:45 +02:00
bees/docs/Makefile
Zygo Blaxell f051d96d51 docs: dash more useful than previously believed
It turns out both dash and bash support `command -v` so let's use that.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
2018-11-25 23:21:52 -05:00

13 lines
374 B
Makefile

MARKDOWN := $(firstword $(shell command -v markdown markdown2 markdown_py 2>/dev/null || echo markdown))
.PHONY: docs
docs: $(subst .md,.html,$(wildcard *.md)) index.html ../README.html
%.html: %.md
$(MARKDOWN) $< | sed -e 's/\.md/\.html/g' > $@.new
mv -f $@.new $@
index.md: ../README.md
sed -e 's:docs/::g' < ../README.md > index.md.new
mv -f index.md.new index.md