From 77403942eebdf9f6f103a858ceec72899d68574b Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Jan 2013 03:08:21 +0000 Subject: [PATCH 1/3] fix make file issue --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4e870a452..c63bb0bfb 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ 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}/' > $@ + sed -i 's/__VERSION__/${VERSION}/' $@ clean: rm -rf out/ From 6f743c6ee21dc96a286d2f52c3902bce11f7e19d Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Jan 2013 16:45:01 +0000 Subject: [PATCH 2/3] make makefile work for darwin(mac) --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c63bb0bfb..09dbf0f3e 100644 --- a/Makefile +++ b/Makefile @@ -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,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/ From d478ae23863f85dd1918e4b9494a717592bd60fd Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 27 Jan 2013 16:59:52 +0000 Subject: [PATCH 3/3] take two at fixin Mac issue --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 09dbf0f3e..b656d5d9b 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +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 $< > $@ - ifeq ($(UNAME),Darwin) - sed -i '' 's/__VERSION__/${VERSION}/' $@ - else - sed -i 's/__VERSION__/${VERSION}/' $@ +ifeq ($(UNAME),Darwin) + sed -i '' 's/__VERSION__/${VERSION}/' $@ +else + sed -i 's/__VERSION__/${VERSION}/' $@ +endif clean: rm -rf out/