File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -78,18 +78,20 @@ help: ## Print help for targets with comments.
78
78
# to check for changes.
79
79
.PHONY : $(NODE_EXE ) $(NODE_G_EXE )
80
80
81
+ define build_node_exe
82
+ $(MAKE ) -C out BUILDTYPE=$1 V=$(V )
81
83
# The -r/-L check stops it recreating the link if it is already in place,
82
84
# otherwise $(NODE_EXE) being a .PHONY target means it is always re-run.
83
85
# Without the check there is a race condition between the link being deleted
84
86
# and recreated which can break the addons build when running test-ci
85
87
# See comments on the build-addons target for some more info
88
+ if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/$1/$(NODE_EXE ) $@ ; fi
89
+ endef
86
90
$(NODE_EXE ) : config.gypi out/Makefile
87
- $(MAKE ) -C out BUILDTYPE=Release V=$(V )
88
- if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$( NODE_EXE) $@ ; fi
91
+ @$(call build_node_exe,"Release")
89
92
90
93
$(NODE_G_EXE ) : config.gypi out/Makefile
91
- $(MAKE ) -C out BUILDTYPE=Debug V=$(V )
92
- if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$( NODE_EXE) $@ ; fi
94
+ @$(call build_node_exe,"Debug")
93
95
94
96
CODE_CACHE_DIR ?= out/$(BUILDTYPE ) /obj/gen
95
97
CODE_CACHE_FILE ?= $(CODE_CACHE_DIR ) /node_code_cache.cc
You can’t perform that action at this time.
0 commit comments