All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Roman Zippel <zippel@linux-m68k.org>,
	Michal Marek <mmarek@suse.cz>,
	Uwe Kleine-Koig <u.kleine-koenig@pengutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3/4] kconfig: add alldefconfig
Date: Sun, 25 Jul 2010 23:39:48 +0200	[thread overview]
Message-ID: <20100725213948.GC5834@merkur.ravnborg.org> (raw)
In-Reply-To: <20100725213808.GA5814@merkur.ravnborg.org>

>From e797380842b48477cc9d5e625420c3426caff6e2 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 24 Jul 2010 23:51:23 +0200
Subject: [PATCH 3/4] kconfig: add alldefconfig

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

This may be usefull 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         |    8 ++++++--
 scripts/kconfig/conf.c           |   28 ++++++++++++++++++----------
 3 files changed, 25 insertions(+), 13 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 7ea649d..366711a 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -95,7 +95,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
 	$(Q)rm -f arch/um/Kconfig.arch
 	$(Q)rm -f $(obj)/config.pot
 
-PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
+PHONY += randconfig allyesconfig allnoconfig allmodconfig alldefconfig defconfig
 
 randconfig: $(obj)/conf
 	$< -r $(Kconfig)
@@ -109,6 +109,9 @@ allnoconfig: $(obj)/conf
 allmodconfig: $(obj)/conf
 	$< -m $(Kconfig)
 
+alldefconfig: $(obj)/conf
+	$< -f $(Kconfig)
+
 defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< -d $(Kconfig)
@@ -132,7 +135,8 @@ help:
 	@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  '  defconfig	  - New config with default from ARCH supplied defconfig'
+	@echo  '  alldefconfig    - New config with all symbols set to default'
 	@echo  '  allmodconfig	  - New config selecting modules when possible'
 	@echo  '  allyesconfig	  - New config where all options are accepted with yes'
 	@echo  '  allnoconfig	  - New config where all options are answered with no'
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 9960d1c..2b4775e 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -23,10 +23,11 @@ enum {
 	ask_all,
 	ask_new,
 	ask_silent,
-	set_default,
+	read_default,
 	set_yes,
 	set_mod,
 	set_no,
+	set_default,
 	set_random
 } input_mode = ask_all;
 char *defconfig_file;
@@ -439,7 +440,7 @@ int main(int ac, char **av)
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
 
-	while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
+	while ((opt = getopt(ac, av, "osdD:nmyfrh")) != -1) {
 		switch (opt) {
 		case 'o':
 			input_mode = ask_silent;
@@ -449,10 +450,10 @@ int main(int ac, char **av)
 			sync_kconfig = 1;
 			break;
 		case 'd':
-			input_mode = set_default;
+			input_mode = read_default;
 			break;
 		case 'D':
-			input_mode = set_default;
+			input_mode = read_default;
 			defconfig_file = optarg;
 			break;
 		case 'n':
@@ -464,6 +465,9 @@ int main(int ac, char **av)
 		case 'y':
 			input_mode = set_yes;
 			break;
+		case 'f':
+			input_mode = set_default;
+			break;
 		case 'r':
 		{
 			struct timeval now;
@@ -512,7 +516,7 @@ int main(int ac, char **av)
 	}
 
 	switch (input_mode) {
-	case set_default:
+	case read_default:
 		if (!defconfig_file)
 			defconfig_file = conf_get_default_confname();
 		if (conf_read(defconfig_file)) {
@@ -537,10 +541,11 @@ int main(int ac, char **av)
 			break;
 		}
 		switch (input_mode) {
-		case set_no:	 name = "allno.config"; break;
-		case set_mod:	 name = "allmod.config"; break;
-		case set_yes:	 name = "allyes.config"; break;
-		case set_random: name = "allrandom.config"; break;
+		case set_no:	  name = "allno.config"; break;
+		case set_mod:	  name = "allmod.config"; break;
+		case set_yes:	  name = "allyes.config"; break;
+		case set_default: name = "alldefault.config"; break;
+		case set_random:  name = "allrandom.config"; break;
 		default: break;
 		}
 		if (!stat(name, &tmpstat))
@@ -574,10 +579,13 @@ int main(int ac, char **av)
 	case set_mod:
 		conf_set_all_new_symbols(def_mod);
 		break;
+	case set_default:
+		conf_set_all_new_symbols(def_default);
+		break;
 	case set_random:
 		conf_set_all_new_symbols(def_random);
 		break;
-	case set_default:
+	case read_default:
 		conf_set_all_new_symbols(def_default);
 		break;
 	case ask_new:
-- 
1.6.0.6


WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org>
To: lkml <linux-kernel@vger.kernel.org>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Roman Zippel <zippel@linux-m68k.org>,
	Michal Marek <mmarek@suse.cz>,
	Uwe Kleine-Koig <u.kleine-koenig@pengutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3/4] kconfig: add alldefconfig
Date: Sun, 25 Jul 2010 23:39:48 +0200	[thread overview]
Message-ID: <20100725213948.GC5834@merkur.ravnborg.org> (raw)
In-Reply-To: <20100725213808.GA5814@merkur.ravnborg.org>

From e797380842b48477cc9d5e625420c3426caff6e2 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 24 Jul 2010 23:51:23 +0200
Subject: [PATCH 3/4] kconfig: add alldefconfig

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

This may be usefull 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         |    8 ++++++--
 scripts/kconfig/conf.c           |   28 ++++++++++++++++++----------
 3 files changed, 25 insertions(+), 13 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 7ea649d..366711a 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -95,7 +95,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
 	$(Q)rm -f arch/um/Kconfig.arch
 	$(Q)rm -f $(obj)/config.pot
 
-PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
+PHONY += randconfig allyesconfig allnoconfig allmodconfig alldefconfig defconfig
 
 randconfig: $(obj)/conf
 	$< -r $(Kconfig)
@@ -109,6 +109,9 @@ allnoconfig: $(obj)/conf
 allmodconfig: $(obj)/conf
 	$< -m $(Kconfig)
 
+alldefconfig: $(obj)/conf
+	$< -f $(Kconfig)
+
 defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< -d $(Kconfig)
@@ -132,7 +135,8 @@ help:
 	@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  '  defconfig	  - New config with default from ARCH supplied defconfig'
+	@echo  '  alldefconfig    - New config with all symbols set to default'
 	@echo  '  allmodconfig	  - New config selecting modules when possible'
 	@echo  '  allyesconfig	  - New config where all options are accepted with yes'
 	@echo  '  allnoconfig	  - New config where all options are answered with no'
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 9960d1c..2b4775e 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -23,10 +23,11 @@ enum {
 	ask_all,
 	ask_new,
 	ask_silent,
-	set_default,
+	read_default,
 	set_yes,
 	set_mod,
 	set_no,
+	set_default,
 	set_random
 } input_mode = ask_all;
 char *defconfig_file;
@@ -439,7 +440,7 @@ int main(int ac, char **av)
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE);
 
-	while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
+	while ((opt = getopt(ac, av, "osdD:nmyfrh")) != -1) {
 		switch (opt) {
 		case 'o':
 			input_mode = ask_silent;
@@ -449,10 +450,10 @@ int main(int ac, char **av)
 			sync_kconfig = 1;
 			break;
 		case 'd':
-			input_mode = set_default;
+			input_mode = read_default;
 			break;
 		case 'D':
-			input_mode = set_default;
+			input_mode = read_default;
 			defconfig_file = optarg;
 			break;
 		case 'n':
@@ -464,6 +465,9 @@ int main(int ac, char **av)
 		case 'y':
 			input_mode = set_yes;
 			break;
+		case 'f':
+			input_mode = set_default;
+			break;
 		case 'r':
 		{
 			struct timeval now;
@@ -512,7 +516,7 @@ int main(int ac, char **av)
 	}
 
 	switch (input_mode) {
-	case set_default:
+	case read_default:
 		if (!defconfig_file)
 			defconfig_file = conf_get_default_confname();
 		if (conf_read(defconfig_file)) {
@@ -537,10 +541,11 @@ int main(int ac, char **av)
 			break;
 		}
 		switch (input_mode) {
-		case set_no:	 name = "allno.config"; break;
-		case set_mod:	 name = "allmod.config"; break;
-		case set_yes:	 name = "allyes.config"; break;
-		case set_random: name = "allrandom.config"; break;
+		case set_no:	  name = "allno.config"; break;
+		case set_mod:	  name = "allmod.config"; break;
+		case set_yes:	  name = "allyes.config"; break;
+		case set_default: name = "alldefault.config"; break;
+		case set_random:  name = "allrandom.config"; break;
 		default: break;
 		}
 		if (!stat(name, &tmpstat))
@@ -574,10 +579,13 @@ int main(int ac, char **av)
 	case set_mod:
 		conf_set_all_new_symbols(def_mod);
 		break;
+	case set_default:
+		conf_set_all_new_symbols(def_default);
+		break;
 	case set_random:
 		conf_set_all_new_symbols(def_random);
 		break;
-	case set_default:
+	case read_default:
 		conf_set_all_new_symbols(def_default);
 		break;
 	case ask_new:
-- 
1.6.0.6


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

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-25 21:38 [RFC] kconfig: introduce alldefconfig + savedefconfig Sam Ravnborg
2010-07-25 21:38 ` [PATCH 1/4] kconfig: save location of config symbols Sam Ravnborg
2010-07-25 21:38   ` Sam Ravnborg
2010-07-25 21:39 ` [PATCH 2/4] kconfig: print more info when we see a recursive dependency Sam Ravnborg
2010-07-25 21:39   ` Sam Ravnborg
2010-07-25 21:39 ` Sam Ravnborg [this message]
2010-07-25 21:39   ` [PATCH 3/4] kconfig: add alldefconfig Sam Ravnborg
2010-07-25 21:40 ` [PATCH 4/4] kconfig: add savedefconfig Sam Ravnborg
2010-07-25 21:40   ` Sam Ravnborg
2010-07-27 15:42   ` Michal Marek
2010-07-27 16:50     ` Sam Ravnborg
2010-07-28 20:36     ` [RFC PATCH] kconfig: use long options in conf Sam Ravnborg
2010-07-28 20:36       ` Sam Ravnborg
2010-07-29  8:13       ` Sam Ravnborg
2010-07-29  8:15         ` [PATCH 1/2] kconfig: rename loose_nonint_oldconfig => oldnoconfig Sam Ravnborg
2010-07-29  8:15           ` Sam Ravnborg
2010-07-29  8:16         ` [PATCH 2/2] kconfig: change nonint_oldconfig to listnewconfig Sam Ravnborg
2010-07-29  8:16           ` Sam Ravnborg
2010-07-29  9:23         ` [RFC PATCH] kconfig: use long options in conf Michal Marek
2010-07-29 14:47           ` Aristeu Rozanski
2010-07-29 15:04             ` Michal Marek
2010-07-29 15:16               ` Aristeu Rozanski
2010-07-29 19:34                 ` Sam Ravnborg
2010-07-29 19:50                   ` Aristeu Rozanski
2010-07-29 23:04                     ` Sam Ravnborg
2010-07-30 14:53                       ` Aristeu Rozanski
2010-07-29  9:17       ` Michal Marek
2010-07-29  9:39         ` Sam Ravnborg
2010-07-29 10:08           ` Michal Marek
2010-07-29 14:30             ` Randy Dunlap
2010-07-29 19:29               ` Sam Ravnborg
2010-07-25 22:20 ` [RFC] kconfig: introduce alldefconfig + savedefconfig Sam Ravnborg
2010-07-28  6:47 ` Uwe Kleine-König

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=20100725213948.GC5834@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=zippel@linux-m68k.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.