Newbie: problem using SUB_LIST in Makefile - SOLVED
Dmitry Marakasov
amdmi3 at amdmi3.ru
Fri Nov 23 11:25:06 PST 2007
* Rainer Schwarze (rsc at admadic.de) wrote:
> You have the powers of a seer :-)
> This is what I was appending to OPTIONS:
> CWRAPPER "use C wrapper (no suid perl script needed)" on
:))
> > .include <bsd.port.pre.mk>
> >
> > .if !defined(WITHOUT_CWRAPPER)
>
> Just a newbie question: Is there a reason to use !defined(WITHOUT_...)
> instead of defined(WITH_...) ?
There was once a rule that you should check for non-default values.
I.e. if you have
OPTIONS= CWRAPPER "C wrapper" on
you should check for WITHOUT_CWRAPPER
and if you have
OPTIONS= CWRAPPER "C wrapper" off
you should check for WITH_CWRAPPER
The cause of this is that WITH(OUT)_CWRAPPER may be defined in
/etc/make.conf, make environment or make commandline, and that
should have higher priority than value set with OPTIONS.
For example, you have:
OPTIONS= CWRAPPER "C wrapper" on
and in /etc/make.conf:
WITHOUT_CWRAPPER= yes # I don't want any *** C wrappers!!!
Thus, both WITHOUT_CWRAPPER and WITH_CWRAPPER will be defined, but the
port will behave correctly if you check for WITHOUT_CWRAPPER.
Actually, this was fixed, so you can check for either WITH_ or WITHOUT_
as you like (http://lists.freebsd.org/pipermail/freebsd-ports/2007-April/039831.html),
but I prefer to stick with scheme described above.
--
Dmitry A. Marakasov | jabber: amdmi3 at jabber.ru
amdmi3 at amdmi3.ru | http://www.amdmi3.ru
More information about the freebsd-ports
mailing list