Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 236491e

Browse filesBrowse files
lanceMyles Borins
authored andcommitted
build: update build-addons when node-gyp changes
Backported from 99bf6fa 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 PR-URL: #6787 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 9a8acad commit 236491e
Copy full SHA for 236491e

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ ADDONS_BINDING_GYPS := \
138138
$(wildcard test/addons/*/binding.gyp))
139139

140140
# Implicitly depends on $(NODE_EXE), see the build-addons rule for rationale.
141-
test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) test/addons/.docbuildstamp
141+
# Depends on node-gyp package.json so that build-addons is (re)executed when
142+
# node-gyp is updated as part of an npm update.
143+
test/addons/.buildstamp: deps/npm/node_modules/node-gyp/package.json \
144+
$(ADDONS_BINDING_GYPS) test/addons/.docbuildstamp
142145
# Cannot use $(wildcard test/addons/*/) here, it's evaluated before
143146
# embedded addons have been generated from the documentation.
144147
for dirname in test/addons/*/; do \
@@ -154,7 +157,7 @@ test/addons/.buildstamp: $(ADDONS_BINDING_GYPS) test/addons/.docbuildstamp
154157
# if the subprocess touched anything so it pessimistically assumes that
155158
# .buildstamp and .docbuildstamp are out of date and need a rebuild.
156159
# Just goes to show that recursive make really is harmful...
157-
# TODO(bnoordhuis) Force rebuild after gyp or node-gyp update.
160+
# TODO(bnoordhuis) Force rebuild after gyp update.
158161
build-addons: $(NODE_EXE) test/addons/.buildstamp
159162

160163
test-gc: all test/gc/node_modules/weak/build/Release/weakref.node

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.