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