reacting to conflicting WITH_* variables
Doug Barton
DougB at FreeBSD.org
Sat Apr 12 15:11:49 PDT 2003
On Fri, 11 Apr 2003, Roman Neuhauser wrote:
> What is the canonical way of handling conflicting WITH_{FOO,BAR}
> variables?
>
> Say a port can be compiled with WITH_THIS or WITH_THAT, but not both,
> What is the right way to bail out?
I would do something like:
.if defined(WITH_FOO) && defined(WITH_BAR)
.error You can define WITH_FOO or WITH_BAR, but not both
.endif
Or, something more fitting bsd.port.mk style:
.if defined(WITH_FOO) && defined(WITH_BAR)
@{ECHO} You can define WITH_FOO or WITH_BAR, but not both
@{FALSE}
.endif
I'm not sure there is a One True Way for this problem.
--
This .signature sanitized for your protection
More information about the freebsd-ports
mailing list