public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Michal Marek <mmarek@suse.cz>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH] kconfig: add alldefconfig
Date: Sat, 31 Jul 2010 23:31:47 +0200	[thread overview]
Message-ID: <1280611910-8155-6-git-send-email-sam@ravnborg.org> (raw)
In-Reply-To: <20100731212907.GA7554@merkur.ravnborg.org>

alldefconfig create a configuration with all values set
to their default value (form the Kconfig files).

This may be useful when we try to use more sensible default
values and may also be used in combination with
the minimal defconfigs.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 Documentation/kbuild/kconfig.txt |    2 +-
 scripts/kconfig/Makefile         |   13 +++++++------
 scripts/kconfig/conf.c           |    7 +++++++
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt
index b2cb16e..cca46b1 100644
--- a/Documentation/kbuild/kconfig.txt
+++ b/Documentation/kbuild/kconfig.txt
@@ -65,7 +65,7 @@ also use the environment variable KCONFIG_ALLCONFIG as a flag or a
 filename that contains config symbols that the user requires to be
 set to a specific value.  If KCONFIG_ALLCONFIG is used without a
 filename, "make *config" checks for a file named
-"all{yes/mod/no/random}.config" (corresponding to the *config command
+"all{yes/mod/no/def/random}.config" (corresponding to the *config command
 that was used) for symbol values that are to be forced.  If this file
 is not found, it checks for a file named "all.config" to contain forced
 values.
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 2900d11..0bf1fb6 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -95,9 +95,9 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
 	$(Q)rm -f arch/um/Kconfig.arch
 	$(Q)rm -f $(obj)/config.pot
 
-PHONY += allnoconfig allyesconfig allmodconfig randconfig
+PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
 
-allnoconfig allyesconfig allmodconfig randconfig: $(obj)/conf
+allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
 	$< --$@ $(Kconfig)
 
 PHONY += listnewconfig oldnoconfig defconfig
@@ -127,11 +127,12 @@ help:
 	@echo  '  localmodconfig  - Update current config disabling modules not loaded'
 	@echo  '  localyesconfig  - Update current config converting local mods to core'
 	@echo  '  silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
-	@echo  '  randconfig	  - New config with random answer to all options'
-	@echo  '  defconfig	  - New config with default answer to all options'
-	@echo  '  allmodconfig	  - New config selecting modules when possible'
-	@echo  '  allyesconfig	  - New config where all options are accepted with yes'
+	@echo  '  defconfig	  - New config with default from ARCH supplied defconfig'
 	@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'
+	@echo  '  alldefconfig    - New config with all symbols set to default'
+	@echo  '  randconfig	  - New config with random answer to all options'
 	@echo  '  listnewconfig   - List new options'
 	@echo  '  oldnoconfig     - Same as silentoldconfig but set new symbols to n (unset)'
 
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index ff5c914..c8bd33c 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -27,6 +27,7 @@ enum input_mode {
 	allnoconfig,
 	allyesconfig,
 	allmodconfig,
+	alldefconfig,
 	randconfig,
 	defconfig,
 	listnewconfig,
@@ -446,6 +447,7 @@ static struct option long_opts[] = {
 	{"allnoconfig",     no_argument,       NULL, allnoconfig},
 	{"allyesconfig",    no_argument,       NULL, allyesconfig},
 	{"allmodconfig",    no_argument,       NULL, allmodconfig},
+	{"alldefconfig",    no_argument,       NULL, alldefconfig},
 	{"randconfig",      no_argument,       NULL, randconfig},
 	{"listnewconfig",   no_argument,       NULL, listnewconfig},
 	{"oldnoconfig",     no_argument,       NULL, oldnoconfig},
@@ -534,6 +536,7 @@ int main(int ac, char **av)
 	case allnoconfig:
 	case allyesconfig:
 	case allmodconfig:
+	case alldefconfig:
 	case randconfig:
 		name = getenv("KCONFIG_ALLCONFIG");
 		if (name && !stat(name, &tmpstat)) {
@@ -544,6 +547,7 @@ int main(int ac, char **av)
 		case allnoconfig:	name = "allno.config"; break;
 		case allyesconfig:	name = "allyes.config"; break;
 		case allmodconfig:	name = "allmod.config"; break;
+		case alldefconfig:	name = "alldef.config"; break;
 		case randconfig:	name = "allrandom.config"; break;
 		default: break;
 		}
@@ -578,6 +582,9 @@ int main(int ac, char **av)
 	case allmodconfig:
 		conf_set_all_new_symbols(def_mod);
 		break;
+	case alldefconfig:
+		conf_set_all_new_symbols(def_default);
+		break;
 	case randconfig:
 		conf_set_all_new_symbols(def_random);
 		break;
-- 
1.6.0.6


  parent reply	other threads:[~2010-07-31 21:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31 21:29 [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: use long options in conf Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: save location of config symbols Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-31 21:31 ` Sam Ravnborg [this message]
2010-07-31 21:31 ` [PATCH] kconfig: refactor code in symbol.c Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: code refactoring in confdata.c Sam Ravnborg
2010-07-31 21:31 ` [PATCH] kconfig: add savedefconfig Sam Ravnborg
2010-07-31 21:34 ` [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Sam Ravnborg
2010-07-31 21:35   ` [PATCH 1/9] kconfig: use long options in conf Sam Ravnborg
2010-07-31 21:35   ` [PATCH 2/9] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-31 21:35   ` [PATCH 3/9] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-31 21:35   ` [PATCH 4/9] kconfig: save location of config symbols Sam Ravnborg
2010-07-31 21:35   ` [PATCH 5/9] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-31 21:35   ` [PATCH 6/9] kconfig: add alldefconfig Sam Ravnborg
2010-07-31 21:35   ` [PATCH 7/9] kconfig: refactor code in symbol.c Sam Ravnborg
2010-07-31 21:35   ` [PATCH 8/9] kconfig: code refactoring in confdata.c Sam Ravnborg
2010-07-31 21:35   ` [PATCH 9/9] kconfig: add savedefconfig Sam Ravnborg
2010-08-02  8:05     ` Uwe Kleine-König
2010-08-03 12:30 ` [PATCH v2 0/9] kconfig: introduce saveconfig and alldefconfig (+more) Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280611910-8155-6-git-send-email-sam@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox