xref: /openbmc/linux/scripts/Makefile.defconf (revision a6397125)
1a400c287SNicolas Saenz Julienne# SPDX-License-Identifier: GPL-2.0
2a400c287SNicolas Saenz Julienne# Configuration heplers
3a400c287SNicolas Saenz Julienne
4a400c287SNicolas Saenz Julienne# Creates 'merged defconfigs'
5a400c287SNicolas Saenz Julienne# ---------------------------------------------------------------------------
6a400c287SNicolas Saenz Julienne# Usage:
7a400c287SNicolas Saenz Julienne#   $(call merge_into_defconfig,base_config,config_fragment1 config_fragment2 ...)
8a400c287SNicolas Saenz Julienne#
9a400c287SNicolas Saenz Julienne# Input config fragments without '.config' suffix
10a400c287SNicolas Saenz Juliennedefine merge_into_defconfig
11a400c287SNicolas Saenz Julienne	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
12a400c287SNicolas Saenz Julienne		-m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
13a400c287SNicolas Saenz Julienne		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
14a400c287SNicolas Saenz Julienne	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
15a400c287SNicolas Saenz Julienneendef
16*a6397125SMark Brown
17*a6397125SMark Brown
18*a6397125SMark Brown# Creates 'merged defconfigs without warning about overrides'
19*a6397125SMark Brown# ---------------------------------------------------------------------------
20*a6397125SMark Brown# Usage:
21*a6397125SMark Brown#   $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...)
22*a6397125SMark Brown#
23*a6397125SMark Brown# Input config fragments without '.config' suffix
24*a6397125SMark Browndefine merge_into_defconfig_override
25*a6397125SMark Brown	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
26*a6397125SMark Brown		-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
27*a6397125SMark Brown		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
28*a6397125SMark Brown	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
29*a6397125SMark Brownendef
30