| 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # Configuration heplers |
| 3 | |
| 4 | cmd_merge_fragments = \ |
| 5 | $(srctree)/scripts/kconfig/merge_config.sh \ |
| 6 | $4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \ |
| 7 | $(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config) |
| 8 | |
| 9 | # Creates 'merged defconfigs' |
| 10 | # --------------------------------------------------------------------------- |
| 11 | # Usage: |
| 12 | # $(call merge_into_defconfig,base_config,config_fragment1 config_fragment2 ...) |
| 13 | # |
| 14 | # Input config fragments without '.config' suffix |
| 15 | define merge_into_defconfig |
| 16 | $(call cmd,merge_fragments,$1,$2) |
| 17 | +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig |
| 18 | endef |
| 19 | |
| 20 | |
| 21 | # Creates 'merged defconfigs without warning about overrides' |
| 22 | # --------------------------------------------------------------------------- |
| 23 | # Usage: |
| 24 | # $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...) |
| 25 | # |
| 26 | # Input config fragments without '.config' suffix |
| 27 | define merge_into_defconfig_override |
| 28 | $(call cmd,merge_fragments,$1,$2,-Q) |
| 29 | +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig |
| 30 | endef |