1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 13:25:45 +02:00
bees/docs/Makefile
Zygo Blaxell 012219bbfb docs: derive docs/index.md from README.md
The two files are identical except README.md links to docs/* while
index.md links to *.

A sed script can do that transformation, so use sed to do it.

This does modify a file in git, but this is necessary to make all
the Github views work consistently.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
2018-11-22 21:21:29 -05:00

13 lines
371 B
Makefile

MARKDOWN := $(firstword $(shell type -P 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