mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
If /bin/sh is bash, the 'type' builtin produces a list of filenames that match the arguments to $PATH. If /bin/sh is dash, we get errors like: /bin/sh: 1: P:: not found Hopefully having a build-dep on bash is not controversial. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
13 lines
381 B
Makefile
13 lines
381 B
Makefile
MARKDOWN := $(firstword $(shell bash -c '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
|