linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] kbuild: add automatic updateconfig target
@ 2006-01-18 19:40 maximilian attems
  2006-01-18 20:42 ` Sam Ravnborg
  2006-01-19 11:50 ` Roman Zippel
  0 siblings, 2 replies; 9+ messages in thread
From: maximilian attems @ 2006-01-18 19:40 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Sam Ravnborg, Bastian Blank

From: Bastian Blank <waldi@debian.org>

current hack for daily build linux-2.6-git is quite ugly: 
yes "n" | make oldconfig

belows target helps to build git snapshots in a more automated way,
setting the new options to their default.

Signed-off-by: maximilian attems <maks@sternwelten.at>


diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 5760e05..5bf2718 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -23,6 +23,9 @@ oldconfig: $(obj)/conf
 silentoldconfig: $(obj)/conf
 	$< -s arch/$(ARCH)/Kconfig
 
+updateconfig: $(obj)/conf
+	$< -U arch/$(ARCH)/Kconfig
+
 update-po-config: $(obj)/kxgettext
 	xgettext --default-domain=linux \
           --add-comments --keyword=_ --keyword=N_ \
@@ -74,6 +77,7 @@ help:
 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
+	@echo  '  updateconfig	  - Update current config in an automated way'
 	@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'
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 10eeae5..4e7b6a1 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -24,7 +24,8 @@ enum {
 	set_yes,
 	set_mod,
 	set_no,
-	set_random
+	set_random,
+	update_default,
 } input_mode = ask_all;
 char *defconfig_file;
 
@@ -117,6 +118,7 @@ static void conf_askvalue(struct symbol 
 		fgets_check_stream(line, 128, stdin);
 		return;
 	case set_default:
+	case update_default:
 		printf("%s\n", def);
 		return;
 	default:
@@ -390,6 +392,7 @@ static int conf_choice(struct menu *menu
 		case set_yes:
 		case set_mod:
 		case set_no:
+		case update_default:
 			cnt = def;
 			printf("%d\n", cnt);
 			break;
@@ -544,6 +547,9 @@ int main(int ac, char **av)
 			input_mode = set_random;
 			srandom(time(NULL));
 			break;
+		case 'U':
+			input_mode = update_default;
+			break;
 		case 'h':
 		case '?':
 			printf("%s [-o|-s] config\n", av[0]);
@@ -568,6 +574,7 @@ int main(int ac, char **av)
 		}
 		break;
 	case ask_silent:
+	case update_default:
 		if (stat(".config", &tmpstat)) {
 			printf(_("***\n"
 				"*** You have not yet configured your kernel!\n"

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 19:40 [patch] kbuild: add automatic updateconfig target maximilian attems
@ 2006-01-18 20:42 ` Sam Ravnborg
  2006-01-18 20:47   ` Sam Ravnborg
  2006-01-19 11:50 ` Roman Zippel
  1 sibling, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2006-01-18 20:42 UTC (permalink / raw)
  To: maximilian attems; +Cc: linux-kernel, Andrew Morton, Bastian Blank

On Wed, Jan 18, 2006 at 08:40:56PM +0100, maximilian attems wrote:
> From: Bastian Blank <waldi@debian.org>
> 
> current hack for daily build linux-2.6-git is quite ugly: 
> yes "n" | make oldconfig
> 
> belows target helps to build git snapshots in a more automated way,
> setting the new options to their default.

Please always add Roman Zippel when dealing with kconfig changes.
We had a similar though more advanced proposal named miniconfig a month
or so ago but Roman had some grief with it so it was not applied.

I've let Roman decide on this one too.
Nitpicking below.

	Sam
	

> +updateconfig: $(obj)/conf
> +	$< -U arch/$(ARCH)/Kconfig

The other methods uses small letters so please change to '-u'

> -	set_random
> +	set_random,
> +	update_default,

Keep same naming as the others. May I suggest set_default.

You did not introduce a specific update.config file like for the other
targets. Any reason for that?

	Sam

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 20:42 ` Sam Ravnborg
@ 2006-01-18 20:47   ` Sam Ravnborg
  2006-01-18 22:32     ` maximilian attems
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sam Ravnborg @ 2006-01-18 20:47 UTC (permalink / raw)
  To: maximilian attems, Roman Zippel
  Cc: linux-kernel, Andrew Morton, Bastian Blank

On Wed, Jan 18, 2006 at 09:42:34PM +0100, Sam Ravnborg wrote:
> Please always add Roman Zippel when dealing with kconfig changes.
And I should do so in my replies - yes!
Please use this mail for futher comments to keep all in the loop.

	Sam

	
> On Wed, Jan 18, 2006 at 08:40:56PM +0100, maximilian attems wrote:
> > From: Bastian Blank <waldi@debian.org>
> > 
> > current hack for daily build linux-2.6-git is quite ugly: 
> > yes "n" | make oldconfig
> > 
> > belows target helps to build git snapshots in a more automated way,
> > setting the new options to their default.
> 
> Please always add Roman Zippel when dealing with kconfig changes.
> We had a similar though more advanced proposal named miniconfig a month
> or so ago but Roman had some grief with it so it was not applied.
> 
> I've let Roman decide on this one too.
> Nitpicking below.
> 
> 	Sam
> 	
> 
> > +updateconfig: $(obj)/conf
> > +	$< -U arch/$(ARCH)/Kconfig
> 
> The other methods uses small letters so please change to '-u'
> 
> > -	set_random
> > +	set_random,
> > +	update_default,
> 
> Keep same naming as the others. May I suggest set_default.
> 
> You did not introduce a specific update.config file like for the other
> targets. Any reason for that?
> 
> 	Sam
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 20:47   ` Sam Ravnborg
@ 2006-01-18 22:32     ` maximilian attems
  2006-01-18 22:52     ` maximilian attems
  2006-01-19 10:13     ` Bastian Blank
  2 siblings, 0 replies; 9+ messages in thread
From: maximilian attems @ 2006-01-18 22:32 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Roman Zippel, linux-kernel, Andrew Morton, Bastian Blank

On Wed, 18 Jan 2006, Sam Ravnborg wrote:

> On Wed, Jan 18, 2006 at 09:42:34PM +0100, Sam Ravnborg wrote:
> > Please always add Roman Zippel when dealing with kconfig changes.
> And I should do so in my replies - yes!
> Please use this mail for futher comments to keep all in the loop.
> 
> 	Sam

ok will do.
 	
> > On Wed, Jan 18, 2006 at 08:40:56PM +0100, maximilian attems wrote:
> > > From: Bastian Blank <waldi@debian.org>
> > > 
> > > current hack for daily build linux-2.6-git is quite ugly: 
> > > yes "n" | make oldconfig
> > > 
> > > belows target helps to build git snapshots in a more automated way,
> > > setting the new options to their default.
> > 
> > Please always add Roman Zippel when dealing with kconfig changes.
> > We had a similar though more advanced proposal named miniconfig a month
> > or so ago but Roman had some grief with it so it was not applied.
> > 
> > I've let Roman decide on this one too.
> > Nitpicking below.
> > 
> > 	Sam
> > 	
> > 
> > > +updateconfig: $(obj)/conf
> > > +	$< -U arch/$(ARCH)/Kconfig
> > 
> > The other methods uses small letters so please change to '-u'
> > 
> > > -	set_random
> > > +	set_random,
> > > +	update_default,
> > 
> > Keep same naming as the others. May I suggest set_default.

ok easy stuff.
 
> > You did not introduce a specific update.config file like for the other
> > targets. Any reason for that?
> > 
> > 	Sam

naah, looks more like an oversight.
will rediff and resend.

-- 
maks

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 20:47   ` Sam Ravnborg
  2006-01-18 22:32     ` maximilian attems
@ 2006-01-18 22:52     ` maximilian attems
  2006-01-19 10:13     ` Bastian Blank
  2 siblings, 0 replies; 9+ messages in thread
From: maximilian attems @ 2006-01-18 22:52 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Roman Zippel, linux-kernel, Andrew Morton, Bastian Blank


add an automated target for linux-2.6 daily builds,
sets the new options to their default without manual intervention.

based on a patch by Bastian Blank <waldi@debian.org>

Signed-off-by: maximilian attems <maks@sternwelten.at>

--
thanks for your suggestions Sam,
the patch is much shorter than previous.

i'm not yet shure why one would introduce an update.config file?
please explain :)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 5760e05..487e75f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -23,6 +23,9 @@ oldconfig: $(obj)/conf
 silentoldconfig: $(obj)/conf
 	$< -s arch/$(ARCH)/Kconfig
 
+updateconfig: $(obj)/conf
+	$< -u arch/$(ARCH)/Kconfig
+
 update-po-config: $(obj)/kxgettext
 	xgettext --default-domain=linux \
           --add-comments --keyword=_ --keyword=N_ \
@@ -74,6 +77,7 @@ help:
 	@echo  '  xconfig	  - Update current config utilising a QT based front-end'
 	@echo  '  gconfig	  - Update current config utilising a GTK based front-end'
 	@echo  '  oldconfig	  - Update current config utilising a provided .config as base'
+	@echo  '  updateconfig	  - Update current config in an automated way'
 	@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'
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 10eeae5..88c2738 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -544,6 +544,9 @@ int main(int ac, char **av)
 			input_mode = set_random;
 			srandom(time(NULL));
 			break;
+		case 'u':
+			input_mode = set_default;
+			break;
 		case 'h':
 		case '?':
 			printf("%s [-o|-s] config\n", av[0]);

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 20:47   ` Sam Ravnborg
  2006-01-18 22:32     ` maximilian attems
  2006-01-18 22:52     ` maximilian attems
@ 2006-01-19 10:13     ` Bastian Blank
  2 siblings, 0 replies; 9+ messages in thread
From: Bastian Blank @ 2006-01-19 10:13 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: maximilian attems, Roman Zippel, linux-kernel, Andrew Morton

On Wed, Jan 18, 2006 at 09:47:50PM +0100, Sam Ravnborg wrote:
> > Keep same naming as the others. May I suggest set_default.

set_* is something different. It uses the default config, not the actual
one.

Bastian

-- 
Those who hate and fight must stop themselves -- otherwise it is not stopped.
		-- Spock, "Day of the Dove", stardate unknown

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-18 19:40 [patch] kbuild: add automatic updateconfig target maximilian attems
  2006-01-18 20:42 ` Sam Ravnborg
@ 2006-01-19 11:50 ` Roman Zippel
  2006-01-19 17:37   ` maximilian attems
  1 sibling, 1 reply; 9+ messages in thread
From: Roman Zippel @ 2006-01-19 11:50 UTC (permalink / raw)
  To: maximilian attems
  Cc: linux-kernel, Andrew Morton, Sam Ravnborg, Bastian Blank

Hi,

On Wed, 18 Jan 2006, maximilian attems wrote:

> From: Bastian Blank <waldi@debian.org>
> 
> current hack for daily build linux-2.6-git is quite ugly: 
> yes "n" | make oldconfig

What's wrong with 'yes "" | make oldconfig'?
If we added such a make target, it would be basically just this.

bye, Roman

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-19 11:50 ` Roman Zippel
@ 2006-01-19 17:37   ` maximilian attems
  2006-01-19 17:51     ` Roman Zippel
  0 siblings, 1 reply; 9+ messages in thread
From: maximilian attems @ 2006-01-19 17:37 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-kernel, Andrew Morton, Sam Ravnborg, Bastian Blank

On Thu, 19 Jan 2006, Roman Zippel wrote:

> On Wed, 18 Jan 2006, maximilian attems wrote:
> 
> > From: Bastian Blank <waldi@debian.org>
> > 
> > current hack for daily build linux-2.6-git is quite ugly: 
> > yes "n" | make oldconfig
> 
> What's wrong with 'yes "" | make oldconfig'?
> If we added such a make target, it would be basically just this.
> 
> bye, Roman

why should we add this workaround, when adding a target
that sets the default is so easy?

-- 
maks

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [patch] kbuild: add automatic updateconfig target
  2006-01-19 17:37   ` maximilian attems
@ 2006-01-19 17:51     ` Roman Zippel
  0 siblings, 0 replies; 9+ messages in thread
From: Roman Zippel @ 2006-01-19 17:51 UTC (permalink / raw)
  To: maximilian attems
  Cc: linux-kernel, Andrew Morton, Sam Ravnborg, Bastian Blank

Hi,

On Thu, 19 Jan 2006, maximilian attems wrote:

> > What's wrong with 'yes "" | make oldconfig'?
> > If we added such a make target, it would be basically just this.
> 
> why should we add this workaround, when adding a target
> that sets the default is so easy?

What advantages would this have compared to the "workaround"?

bye, Roman

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-01-19 17:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18 19:40 [patch] kbuild: add automatic updateconfig target maximilian attems
2006-01-18 20:42 ` Sam Ravnborg
2006-01-18 20:47   ` Sam Ravnborg
2006-01-18 22:32     ` maximilian attems
2006-01-18 22:52     ` maximilian attems
2006-01-19 10:13     ` Bastian Blank
2006-01-19 11:50 ` Roman Zippel
2006-01-19 17:37   ` maximilian attems
2006-01-19 17:51     ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).