From f099e1bcff48d7d83c258c866c84a6eb90621434 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 7 Jun 2015 20:30:28 -0600 Subject: util/kconfig/Makefile: Add savedefconfig target Add a savedefconfig target and the help for it to the kconfig makefile. The main advantage I found for using defconfigs instead of the full .config is that they require less maintenence, so long as reasonable default values are set when adding new config options. When the defconfig is expanded, it will use default values for all options not saved in the defconfig. This cuts the size of a saved config from 500ish lines to roughly 20 lines. savedefconfig was added to the linux kernel in commit id 7cf3d73b4360e91b14326632ab1aeda4cb26308d Change-Id: I45f3dc87b773fb6e9ee53e32fdcafff1f53074d2 Signed-off-by: Martin Roth Reviewed-on: http://review.coreboot.org/10462 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Stefan Reinauer Reviewed-by: Patrick Georgi --- util/kconfig/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'util/kconfig/Makefile') diff --git a/util/kconfig/Makefile b/util/kconfig/Makefile index f6ce8181dd..a216fd3aea 100644 --- a/util/kconfig/Makefile +++ b/util/kconfig/Makefile @@ -76,11 +76,14 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h $(Q)rm -f $(obj)/config.pot # --- UNUSED, ignore ---------------------------------------------------------- -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig savedefconfig allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(objk)/conf $< --$@ $(Kconfig) +savedefconfig: $(objk)/conf + $< --$@=defconfig $(Kconfig) + defconfig: $(objk)/conf ifeq ($(KBUILD_DEFCONFIG),) $< -d $(Kconfig) @@ -104,6 +107,7 @@ help: @echo ' localyesconfig - Update current config converting local mods to core' @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' @echo ' defconfig - New config with default answer to all options' + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' @echo ' allnoconfig - New config where all options are answered with no' @echo ' allyesconfig - New config where all options are accepted with yes' @echo ' allmodconfig - New config selecting modules when possible' -- cgit v1.2.3