aboutsummaryrefslogtreecommitdiffstats
path: root/core/core.mk
diff options
context:
space:
mode:
authorbenoitc <[email protected]>2016-04-03 23:46:20 +0200
committerLoïc Hoguin <[email protected]>2017-05-15 19:10:46 +0200
commit9292409f21393ec539cdf40720d26b43914f6018 (patch)
treedcac806b43259fed1067098c162ce77087bd55c6 /core/core.mk
parent724521b68c19f107437db9fa2ee8def6ff604e0a (diff)
downloaderlang.mk-9292409f21393ec539cdf40720d26b43914f6018.tar.gz
erlang.mk-9292409f21393ec539cdf40720d26b43914f6018.tar.bz2
erlang.mk-9292409f21393ec539cdf40720d26b43914f6018.zip
Add WITHOUT variable to exclude components on build
This allows to ignore lines from the default build.config if needed. For example to not include packages run make WITHOUT=index
Diffstat (limited to 'core/core.mk')
-rw-r--r--core/core.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/core.mk b/core/core.mk
index 278e20f..89cfa25 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -29,6 +29,9 @@ ifeq ($(MAKE_VERSION),3.82)
$(warning Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html)
endif
+# Ignored plugins
+ERLANG_MK_WITHOUT = ""
+
# Core configuration.
PROJECT ?= $(notdir $(CURDIR))
@@ -184,13 +187,16 @@ ERLANG_MK_COMMIT ?=
ERLANG_MK_BUILD_CONFIG ?= build.config
ERLANG_MK_BUILD_DIR ?= .erlang.mk.build
+WITHOUT ?= $(ERLANG_MK_WITHOUT)
+WITHOUT := $(strip $(WITHOUT))
+
erlang-mk:
git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
ifdef ERLANG_MK_COMMIT
cd $(ERLANG_MK_BUILD_DIR) && git checkout $(ERLANG_MK_COMMIT)
endif
if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi
- $(MAKE) -C $(ERLANG_MK_BUILD_DIR)
+ $(MAKE) -C $(ERLANG_MK_BUILD_DIR) WITHOUT='$(WITHOUT)'
cp $(ERLANG_MK_BUILD_DIR)/erlang.mk ./erlang.mk
rm -rf $(ERLANG_MK_BUILD_DIR)