All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Kumar Gala <galak@kernel.crashing.org>,
	Roman Zippel <zippel@linux-m68k.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: kbuild question
Date: Fri, 16 Feb 2007 09:50:01 +0100	[thread overview]
Message-ID: <20070216085001.GA11979@uranus.ravnborg.org> (raw)
In-Reply-To: <A46E6EB1-4687-43BA-8DE9-BBAE7BD0D160@kernel.crashing.org>

> 
> Now is there some way to not have to duplicate the 'config choices  
> between if ONLY_HAVE_ONE and if !ONLY_HAVE_ONE
> 
> To use your example I want to do:
> 
> config ONLY_HAVE_ONE
> 	prompt "only have one?"
> 	boolean
> 
> if ONLY_HAVE_ONE
> config VAL_FIRST
> 	bool "First value"
> 
> config VAL_SECOND
> 	bool "Second value"
> endif
> 
> if !ONLY_HAVE_ONE
> choice
> 	prompt "multiple values"
> 	default VAL_FIRST
> 
> config VAL_FIRST
> 	bool "First value"
> 
> config VAL_SECOND
> 	bool "Second value"
> endchoice
> 
> endif
> 
> I'd like not to have to repeat/duplicate VAL_FIRST, VAL_SECOND, etc..

A choice allow you to select multiple values if the type of all
choice entries are of type 'tristate' but this gets enabled
only when CONFIG_MODULES equal to 'y'.
So except if you really need the 'select multiple' when MODULES
are selected I see no easy way to achive what you want.

I did not try but carefull usage of 'depends on' could also help you
but it will get messy quite fast.

Maybe Roman can se a better way?

	Sam

  reply	other threads:[~2007-02-16  8:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15 19:18 kbuild question Kumar Gala
2007-02-15 22:33 ` Sam Ravnborg
2007-02-15 23:44   ` Kumar Gala
2007-02-16  8:50     ` Sam Ravnborg [this message]
2007-02-16 10:23 ` Roman Zippel
2007-02-16 14:14   ` Kumar Gala
2007-02-18 17:16     ` Roman Zippel
2007-02-18 19:25       ` Sam Ravnborg
2007-03-15 15:22         ` Kumar Gala
2011-03-02 21:11 KBuild question Tom Bart
2011-03-02 21:40 ` Sam Ravnborg

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=20070216085001.GA11979@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.