aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEneas U de Queiroz <cotequeiroz@gmail.com>2020-04-19 20:12:51 -0300
committerPetr Štetiar <ynezz@true.cz>2020-05-20 17:03:45 +0200
commitdb6c1214e0fbf9b9268f2ea2c90e7d6da4f1a577 (patch)
treeb331ae9dedeeb462cc40de38bf41a9855d009dab /include
parent9f843b1d43ec9e4989f86d8936a70f51940072e5 (diff)
downloadupstream-db6c1214e0fbf9b9268f2ea2c90e7d6da4f1a577.tar.gz
upstream-db6c1214e0fbf9b9268f2ea2c90e7d6da4f1a577.tar.bz2
upstream-db6c1214e0fbf9b9268f2ea2c90e7d6da4f1a577.zip
build: add option to treat recursive deps as error
Running make with RECURSIVE_DEP_IS_ERROR=1 will cause a hard failure when a recursive dependency is detected. This is useful to apply stricter Ci tests, for example. Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/toplevel.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/toplevel.mk b/include/toplevel.mk
index ad8e5b8f20..5cf93ce7ef 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -99,6 +99,9 @@ prepare-tmpinfo: FORCE
$(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
fi
+ifeq ($(RECURSIVE_DEP_IS_ERROR),1)
+ KCONF_FLAGS=--fatalrecursive
+endif
ifneq ($(DISTRO_PKG_CONFIG),)
scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
endif
@@ -111,7 +114,7 @@ $(eval $(call rdep,scripts/config,scripts/config/mconf))
config: scripts/config/conf prepare-tmpinfo FORCE
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
- $< Config.in
+ $< $(KCONF_FLAGS) Config.in
config-clean: FORCE
$(_SINGLE)$(NO_TRACE_MAKE) -C scripts/config clean
@@ -120,7 +123,7 @@ defconfig: scripts/config/conf prepare-tmpinfo FORCE
touch .config
@if [ ! -s .config -a -e $(HOME)/.openwrt/defconfig ]; then cp $(HOME)/.openwrt/defconfig .config; fi
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
- $< --defconfig=.config Config.in
+ $< $(KCONF_FLAGS) --defconfig=.config Config.in
confdefault-y=allyes
confdefault-m=allmod
@@ -129,7 +132,7 @@ confdefault:=$(confdefault-$(CONFDEFAULT))
oldconfig: scripts/config/conf prepare-tmpinfo FORCE
[ -L .config ] && export KCONFIG_OVERWRITECONFIG=1; \
- $< --$(if $(confdefault),$(confdefault),old)config Config.in
+ $< $(KCONF_FLAGS) --$(if $(confdefault),$(confdefault),old)config Config.in
menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
if [ \! -e .config -a -e $(HOME)/.openwrt/defconfig ]; then \
@@ -210,7 +213,7 @@ ifeq ($(SDK),1)
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
- @./scripts/config/conf --defconfig=.config Config.in
+ @./scripts/config/conf $(KCONF_FLAGS) --defconfig=.config Config.in
@+$(ULIMIT_FIX) $(SUBMAKE) -r $@
else
@@ -219,7 +222,7 @@ else
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
@( \
cp .config tmp/.config; \
- ./scripts/config/conf --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
+ ./scripts/config/conf $(KCONF_FLAGS) --defconfig=tmp/.config -w tmp/.config Config.in > /dev/null 2>&1; \
if ./scripts/kconfig.pl '>' .config tmp/.config | grep -q CONFIG; then \
printf "$(_R)WARNING: your configuration is out of sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
fi \