build: don't run make recursively
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 2 Jan 2015 16:00:27 +0000 (17:00 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 8 Jan 2015 22:20:49 +0000 (23:20 +0100)
For targets that need the binary: don't invoke `make all` as part of the
recipe, just depend on the $(NODE_EXE) target.

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Makefile

index 25864c5..337779b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -105,19 +105,17 @@ test-http1: all
 test-valgrind: all
        $(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message
 
-test/gc/node_modules/weak/build/Release/weakref.node:
-       @if [ ! -f $(NODE_EXE) ]; then make all; fi
+test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE)
        ./$(NODE_EXE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
                --directory="$(shell pwd)/test/gc/node_modules/weak" \
                --nodedir="$(shell pwd)"
 
-build-addons:
-       @if [ ! -f node ]; then make all; fi
+build-addons: $(NODE_EXE)
        rm -rf test/addons/doc-*/
-       ./node tools/doc/addon-verify.js
+       ./$(NODE_EXE) tools/doc/addon-verify.js
        $(foreach dir, \
                        $(sort $(dir $(wildcard test/addons/*/*.gyp))), \
-                       ./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
+                       ./$(NODE_EXE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
                                        --directory="$(shell pwd)/$(dir)" \
                                        --nodedir="$(shell pwd)" && ) echo "build done"