pad.pub0.org/Makefile

26 lines
632 B
Makefile
Raw Normal View History

doc_sources = $(wildcard doc/*/*.md) $(wildcard doc/*.md)
outdoc_files = $(addprefix out/,$(doc_sources:.md=.html))
docassets = $(addprefix out/,$(wildcard doc/assets/*))
2012-10-27 15:28:15 +00:00
VERSION = $(shell node -e "console.log( require('./src/package.json').version )")
2013-01-27 16:45:01 +00:00
UNAME := $(shell uname -s)
docs: $(outdoc_files) $(docassets)
out/doc/assets/%: doc/assets/%
mkdir -p $(@D)
cp $< $@
out/doc/%.html: doc/%.md
mkdir -p $(@D)
2014-12-24 02:45:21 +00:00
node bin/doc/generate.js --format=html --template=doc/template.html $< > $@
2013-01-27 16:59:52 +00:00
ifeq ($(UNAME),Darwin)
sed -i '' 's/__VERSION__/${VERSION}/' $@
else
sed -i 's/__VERSION__/${VERSION}/' $@
endif
clean:
rm -rf out/