From owner-freebsd-ports@FreeBSD.ORG Sat Apr 12 15:11:49 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6251737B401 for ; Sat, 12 Apr 2003 15:11:49 -0700 (PDT) Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id D434743F75 for ; Sat, 12 Apr 2003 15:11:48 -0700 (PDT) (envelope-from DougB@freebsd.org) Received: from master.gorean.org (12-234-22-23.client.attbi.com[12.234.22.23]) by rwcrmhc51.attbi.com (rwcrmhc51) with SMTP id <2003041222114805100ndsoee>; Sat, 12 Apr 2003 22:11:48 +0000 Date: Sat, 12 Apr 2003 15:11:47 -0700 (PDT) From: Doug Barton To: Roman Neuhauser In-Reply-To: <20030411193254.GA36951@freepuppy.bellavista.cz> Message-ID: <20030412150020.N25048@znfgre.tberna.bet> References: <20030411193254.GA36951@freepuppy.bellavista.cz> Organization: http://www.FreeBSD.org/ X-message-flag: Outlook -- Not just for spreading viruses anymore! MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-ports Subject: Re: reacting to conflicting WITH_* variables X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 22:11:49 -0000 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