Skip to content

Commit

Permalink
make makefile work for darwin(mac)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Jan 27, 2013
1 parent 7740394 commit 6f743c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -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)

Expand All @@ -14,7 +15,10 @@ out/doc/assets/%: doc/assets/%
out/doc/%.html: doc/%.md
mkdir -p $(@D)
node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
sed -i 's/__VERSION__/${VERSION}/' $@
ifeq ($(UNAME),Darwin)
sed -i '' 's/__VERSION__/${VERSION}/' $@
else
sed -i 's/__VERSION__/${VERSION}/' $@

clean:
rm -rf out/

0 comments on commit 6f743c6

Please sign in to comment.