diff options
author | sxa555 <sxa@uk.ibm.com> | 2016-11-28 18:39:47 +0000 |
---|---|---|
committer | Michael Dawson <michael_dawson@ca.ibm.com> | 2016-12-05 15:26:18 -0500 |
commit | f3d613ed076af5bfba7e9133c6bb5c47abd97c8b (patch) | |
tree | 632d520f695e2a27f9230e4017a959d1bdd47d4c /Makefile | |
parent | eb122b158237986173fcc6ec85d7d30b42c2dd20 (diff) | |
download | android-node-v8-f3d613ed076af5bfba7e9133c6bb5c47abd97c8b.tar.gz android-node-v8-f3d613ed076af5bfba7e9133c6bb5c47abd97c8b.tar.bz2 android-node-v8-f3d613ed076af5bfba7e9133c6bb5c47abd97c8b.zip |
build: Don't regenerate node symlink
The node -> out/*/node symlink is getting recreated in parallel with
other targets in the makefile which require it (e.g. test-ci) and
this seems to be causing a race condition which is showing up on AIX
Fixes: https://github.com/nodejs/node/issues/9825
PR-URL: https://github.com/nodejs/node/pull/9827
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -64,13 +64,18 @@ endif # to check for changes. .PHONY: $(NODE_EXE) $(NODE_G_EXE) +# The -r/-L check stops it recreating the link if it is already in place, +# otherwise $(NODE_EXE) being a .PHONY target means it is always re-run. +# Without the check there is a race condition between the link being deleted +# and recreated which can break the addons build when running test-ci +# See comments on the build-addons target for some more info $(NODE_EXE): config.gypi out/Makefile $(MAKE) -C out BUILDTYPE=Release V=$(V) - ln -fs out/Release/$(NODE_EXE) $@ + if [ ! -r $(NODE_EXE) -o ! -L $(NODE_EXE) ]; then ln -fs out/Release/$(NODE_EXE) $@; fi $(NODE_G_EXE): config.gypi out/Makefile $(MAKE) -C out BUILDTYPE=Debug V=$(V) - ln -fs out/Debug/$(NODE_EXE) $@ + if [ ! -r $(NODE_EXE) -o ! -L $(node_EXE) ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \ |