Merge pull request #1412 from ether/fix-doc-build

fix make file issue
pull/1417/head
John McLear 2013-01-27 09:08:58 -08:00
commit 189f4347b1
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ outdoc_files = $(addprefix out/,$(doc_sources:.md=.html))
docassets = $(addprefix out/,$(wildcard doc/assets/*))
VERSION = $(shell node -e "console.log( require('./src/package.json').version )")
UNAME := $(shell uname -s)
docs: $(outdoc_files) $(docassets)
@ -14,7 +15,11 @@ out/doc/assets/%: doc/assets/%
out/doc/%.html: doc/%.md
mkdir -p $(@D)
node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
cat $@ | sed 's/__VERSION__/${VERSION}/' > $@
ifeq ($(UNAME),Darwin)
sed -i '' 's/__VERSION__/${VERSION}/' $@
else
sed -i 's/__VERSION__/${VERSION}/' $@
endif
clean:
rm -rf out/