Skip to content

Commit a639712

Browse files
brooniearndb
authored andcommitted
kbuild: Provide a version of merge_into_defconfig without override warnings
While warning on overridden Kconfig options is a good default for merging config fragements sometimes that is our explicit intent and the warnings are unhelpful, add a new merge_into_defconfig_override which does the merge but with warnings suppressed. Since merge_into_defconfig accepts any number of fragments it is difficult to allow it to accept the flag. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 46dff8d commit a639712

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

scripts/Makefile.defconf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ define merge_into_defconfig
1313
$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
1414
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
1515
endef
16+
17+
18+
# Creates 'merged defconfigs without warning about overrides'
19+
# ---------------------------------------------------------------------------
20+
# Usage:
21+
# $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...)
22+
#
23+
# Input config fragments without '.config' suffix
24+
define merge_into_defconfig_override
25+
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
26+
-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
27+
$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
28+
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
29+
endef

0 commit comments

Comments
 (0)