Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Bevenius <daniel.bevenius@gmail.com>2020-06-17 12:11:09 +0300
committerDaniel Bevenius <daniel.bevenius@gmail.com>2020-06-22 08:24:51 +0300
commit122038c6a2334a3da8ffbaa824bb3c3f61ab8197 (patch)
treeb977211b476376fff11948f4429c26d0080fc6c7 /Makefile
parent07b2ada00decf1dacd49e76370d9e4a4d929de92 (diff)
build: add target specific build_type variable
This commit add a target specific variable named 'build_type' to the node and node_g targets. The motivation for doing this is that both targets share the same prerequisites, and the recepies are the same (apart from the build type) so some duplication can be avoided. PR-URL: https://github.com/nodejs/node/pull/33925 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 6 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 7fa645f21dd..89cd8f68885 100644
--- a/Makefile
+++ b/Makefile
@@ -98,13 +98,12 @@ help: ## Print help for targets with comments.
# and recreated which can break the addons build when running test-ci
# See comments on the build-addons target for some more info
ifeq ($(BUILD_WITH), make)
-$(NODE_EXE): config.gypi out/Makefile
- $(MAKE) -C out BUILDTYPE=Release V=$(V)
- if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
-
-$(NODE_G_EXE): config.gypi out/Makefile
- $(MAKE) -C out BUILDTYPE=Debug V=$(V)
- if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
+$(NODE_EXE): build_type:=Release
+$(NODE_G_EXE): build_type:=Debug
+$(NODE_EXE) $(NODE_G_EXE): config.gypi out/Makefile
+ $(MAKE) -C out BUILDTYPE=${build_type} V=$(V)
+ if [ ! -r $@ -o ! -L $@ ]; then \
+ ln -fs out/${build_type}/$(NODE_EXE) $@; fi
else
ifeq ($(BUILD_WITH), ninja)
ifeq ($(V),1)