Date: Sat, 12 Apr 2003 15:11:47 -0700 (PDT) From: Doug Barton <DougB@FreeBSD.org> To: Roman Neuhauser <neuhauser@bellavista.cz> Cc: freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: reacting to conflicting WITH_* variables Message-ID: <20030412150020.N25048@znfgre.tberna.bet> In-Reply-To: <20030411193254.GA36951@freepuppy.bellavista.cz> References: <20030411193254.GA36951@freepuppy.bellavista.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030412150020.N25048>