2012-08-14 02:03:06 +00:00
|
|
|
doc_dirs = doc $(wildcard doc/*/)
|
|
|
|
outdoc_dirs = out $(addprefix out/,$(doc_dirs))
|
|
|
|
doc_sources = $(wildcard doc/*/*.md) $(wildcard doc/*.md)
|
|
|
|
outdoc_files = $(addprefix out/,$(doc_sources:.md=.html))
|
2012-10-27 15:28:15 +00:00
|
|
|
VERSION = $(shell node -e "console.log( require('./src/package.json').version )")
|
2012-08-14 02:03:06 +00:00
|
|
|
|
|
|
|
docs: $(outdoc_files)
|
|
|
|
|
|
|
|
out/doc/%.html: doc/%.md
|
|
|
|
mkdir -p $(@D)
|
|
|
|
node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
|
2012-10-27 15:28:15 +00:00
|
|
|
cat $@ | sed 's/__VERSION__/${VERSION}/' > $@
|
2012-08-14 02:03:06 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf out/
|