From 32f2858c60f20337603cbb2f0d2a037936294fed Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Mon, 16 May 2016 12:32:03 -0400 Subject: [PATCH 1/3] build: Update build-addons when node-gyp changes. We can tell when `node-gyp` is changed by creating a prerequisite on `deps/npm/node_modules/node-gyp/package.json`. The prerequisite is added to the `test/addons/.buildstamp` since `build-addons` is .PHONY. Testing for this change was entirely manual. $ make clean test-build # Initial build $ make test-build # Make sure build-addons doesn't rebuild $ touch deps/npm/node_modules/node-gyp/package.json # simulate change $ make test-build # Ensure build-addons rebuilds --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 488754b3f5d778..75820f24394bd3 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,9 @@ ADDONS_BINDING_GYPS := \ $(wildcard test/addons/*/binding.gyp)) # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. -test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) \ +# Depends on node-gyp package.json so that build-addons is (re)executed when +# node-gyp is updated as part of an npm update. +test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json $(ADDONS_BINDING_GYPS) \ deps/uv/include/*.h deps/v8/include/*.h \ src/node.h src/node_buffer.h src/node_object_wrap.h \ test/addons/.docbuildstamp @@ -163,7 +165,7 @@ test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) \ # if the subprocess touched anything so it pessimistically assumes that # .buildstamp and .docbuildstamp are out of date and need a rebuild. # Just goes to show that recursive make really is harmful... -# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update. +# TODO(bnoordhuis) Force rebuild after gyp update. build-addons: $(NODE_EXE) test/addons/.buildstamp test-gc: all test/gc/node_modules/weak/build/Release/weakref.node From b6fd00b8d06c83c0ef002ac81142d508d0a03d27 Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Wed, 18 May 2016 17:46:48 -0400 Subject: [PATCH 2/3] build: Keep Makefile lines under 80 characters. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75820f24394bd3..8abf2327c3871e 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,8 @@ ADDONS_BINDING_GYPS := \ # Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale. # Depends on node-gyp package.json so that build-addons is (re)executed when # node-gyp is updated as part of an npm update. -test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json $(ADDONS_BINDING_GYPS) \ +test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json \ + $(ADDONS_BINDING_GYPS) \ deps/uv/include/*.h deps/v8/include/*.h \ src/node.h src/node_buffer.h src/node_object_wrap.h \ test/addons/.docbuildstamp From 8dbb7297413e02d3267e67ebc48e2ac2db76c18f Mon Sep 17 00:00:00 2001 From: Lance Ball Date: Thu, 19 May 2016 09:48:30 -0400 Subject: [PATCH 3/3] build: Use tabs instead of spaces in a Makefile. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8abf2327c3871e..ef503ae69975e8 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ ADDONS_BINDING_GYPS := \ # Depends on node-gyp package.json so that build-addons is (re)executed when # node-gyp is updated as part of an npm update. test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json \ - $(ADDONS_BINDING_GYPS) \ + $(ADDONS_BINDING_GYPS) \ deps/uv/include/*.h deps/v8/include/*.h \ src/node.h src/node_buffer.h src/node_object_wrap.h \ test/addons/.docbuildstamp