Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-09-04 18:03:01 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2012-09-04 18:04:01 +0400
commit7b6d3cea2c165c4f83222dce9243884397584b8c (patch)
tree7e3f978ea3d1474496a56c9d879ccbdcc2117d78 /Makefile
parentd3135e0f57ffece13c70160606250006cd097c17 (diff)
build: add ninja support to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 20 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index cae2a23a361..664fafde0ca 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
BUILDTYPE ?= Release
PYTHON ?= python
+NINJA ?= ninja
DESTDIR ?=
SIGN ?=
@@ -22,22 +23,34 @@ endif
# to check for changes.
.PHONY: node node_g
+ifeq ($(USE_NINJA),1)
+node: config.gypi
+ $(NINJA) -C out/Release/
+ ln -fs out/Release/node node
+
+node_g: config.gypi
+ $(NINJA) -C out/Debug/
+ ln -fs out/Debug/node $@
+else
node: config.gypi out/Makefile
$(MAKE) -C out BUILDTYPE=Release V=$(V)
ln -fs out/Release/node node
node_g: config.gypi out/Makefile
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
- ln -fs out/Debug/node node_g
-
-config.gypi: configure
- ./configure
-
-out/Debug/node:
- $(MAKE) -C out BUILDTYPE=Debug V=$(V)
+ ln -fs out/Debug/node $@
+endif
out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
+ifeq ($(USE_NINJA),1)
+ touch out/Makefile
+ $(PYTHON) tools/gyp_node -f ninja
+else
$(PYTHON) tools/gyp_node -f make
+endif
+
+config.gypi: configure
+ ./configure
install: all
$(PYTHON) tools/install.py $@ $(DESTDIR)