Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Mar 2006 13:49:59 -0800 (PST)
From:      "Freddie Cash" <fcash@ocis.net>
To:        "Danny Pansters" <danny@ricin.com>
Cc:        ports@freebsd.org
Subject:   Re: mutually exclusive OPTIONS?
Message-ID:  <48051.192.168.0.10.1143668999.squirrel@webmail.sd73.bc.ca>
In-Reply-To: <200603292344.52149.danny@ricin.com>
References:  <200603292344.52149.danny@ricin.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, March 29, 2006 1:44 pm, Danny Pansters wrote:
> I'm making a port that has several mutually exclusive compile-time
> options. I want to present them as OPTIONS as should, but is there a
> way within the ports framework to ensure that only one (of the 5
> possibilities) is selected, or when one of them is the default but
> then with 4 mutually exclusive OPTIONS if the user needs one of teh
> non-default options?

Hopefully someone else will know a better way, but the way I've used
and seen in other ports is:

.if defined(WITH_OPTION1) && defined(WITH_OPTION2)
IGNORE=    error! You can't select these two options together.
.endif

And so on for all the combinations that should not be selected.  :)

----
Freddie Cash
fcash@ocis.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48051.192.168.0.10.1143668999.squirrel>