[openwrt/openwrt] target.mk: init default configs if they are missing in the .config
LEDE Commits
lede-commits at lists.infradead.org
Thu Jul 18 05:16:38 PDT 2024
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/02488176b7995721d4e8288f0bd9a00428dbb991
commit 02488176b7995721d4e8288f0bd9a00428dbb991
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Thu Jul 18 13:53:37 2024 +0200
target.mk: init default configs if they are missing in the .config
The config options that are enabled by default and where other default
packages depends on should not only be set if there is no .config file,
but also if the .config exists but the config option (e.g.
CONFIG_SECCOMP) is missing in the file.
This is relevant, for example, if you are working with .config templates
and then want to complete the configuration using make defconfig.
Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
include/target.mk | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/include/target.mk b/include/target.mk
index 48536b5dd9..d13902ad6e 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -82,13 +82,12 @@ ifneq ($(DUMP),)
# default package configuration
# Keep DYNAMIC_DEF_PKG_CONF in sync with toplevel.mk to reflect the same configs
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP
- ifneq ($(wildcard $(TOPDIR)/.config),)
- $(foreach config, $(DYNAMIC_DEF_PKG_CONF), \
- $(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \
- )
- # Init config that are enabled by default. Dependency are checked matching the one in
- # the config.
- else
+ $(foreach config, $(DYNAMIC_DEF_PKG_CONF), \
+ $(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \
+ )
+ # The config options that are enabled by default and where other default
+ # packages depends on needs to be set if they are missing in the .config.
+ ifeq ($(shell grep "CONFIG_SECCOMP" $(TOPDIR)/.config 2>/dev/null),)
ifeq ($(filter $(BOARD), uml),)
ifneq ($(filter $(ARCH), aarch64 arm armeb mips mipsel mips64 mips64el i386 powerpc x86_64),)
CONFIG_SECCOMP := y
More information about the lede-commits
mailing list