Skip to content

Commit 9d9f691

Browse files
danbevrefack
authored andcommitted
Revert "build: extract common code from NODE_EXE/_G_EXE"
This reverts commit 4e2fa8b. Refs: #22457 PR-URL: #22458 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 68b07de commit 9d9f691

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Makefile

+4-6
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,18 @@ help: ## Print help for targets with comments.
9090
# to check for changes.
9191
.PHONY: $(NODE_EXE) $(NODE_G_EXE)
9292

93-
define build_node_exe
94-
$(MAKE) -C out BUILDTYPE=$1 V=$(V)
9593
# The -r/-L check stops it recreating the link if it is already in place,
9694
# otherwise $(NODE_EXE) being a .PHONY target means it is always re-run.
9795
# Without the check there is a race condition between the link being deleted
9896
# and recreated which can break the addons build when running test-ci
9997
# See comments on the build-addons target for some more info
100-
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/$1/$(NODE_EXE) $@; fi
101-
endef
10298
$(NODE_EXE): config.gypi out/Makefile
103-
@$(call build_node_exe,"Release")
99+
$(MAKE) -C out BUILDTYPE=Release V=$(V)
100+
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
104101

105102
$(NODE_G_EXE): config.gypi out/Makefile
106-
@$(call build_node_exe,"Debug")
103+
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
104+
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
107105

108106
CODE_CACHE_DIR ?= out/$(BUILDTYPE)/obj/gen
109107
CODE_CACHE_FILE ?= $(CODE_CACHE_DIR)/node_code_cache.cc

0 commit comments

Comments
 (0)