aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-03-13 02:21:43 -0400
committerMichal Marek <mmarek@suse.cz>2015-03-24 11:48:44 -0400
commit63a91033d52e64a22e571fe84924c0b7f21c280d (patch)
tree05f0c97ca9cc3e5af07ec4bb4776ca34840180ba
parentbc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd (diff)
kbuild: add generic mergeconfig target, %.config
"scripts/kconfig/merge_config.sh && make oldconfig" works well enough for merging local config fragments, but Kbuild currently has the entry points only for "kvmconfig" and "tinyconfig". This commit provides the generic target for mergeconfig, so we can manage our own config fragments easily: put "foo.config" in arch/$(SRCARCH)/configs/ or kernel/configs/, and then run "make foo.config". Now "make kvmconfig" is just a shorthand of "make kvm_guest.config". Likewise, "make tinyconfig" is equivalent to "make allnoconfig tiny.config". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
-rw-r--r--scripts/kconfig/Makefile19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index b0e4be28204d..cb2cf548c45c 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -104,21 +104,20 @@ endif
104%_defconfig: $(obj)/conf 104%_defconfig: $(obj)/conf
105 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) 105 $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
106 106
107configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config) 107configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@)
108 108
109define mergeconfig 109%.config: $(obj)/conf
110$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture)) 110 $(if $(call configfiles),, $(error No configuration exists for this target on this architecture))
111$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(call configfiles,$(1)) 111 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles)
112+$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig 112 +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig
113endef
114 113
115PHONY += kvmconfig 114PHONY += kvmconfig
116kvmconfig: 115kvmconfig: kvm_guest.config
117 $(call mergeconfig,kvm_guest) 116 @:
118 117
119PHONY += tinyconfig 118PHONY += tinyconfig
120tinyconfig: allnoconfig 119tinyconfig:
121 $(call mergeconfig,tiny) 120 $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
122 121
123# Help text used by make help 122# Help text used by make help
124help: 123help: