Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2004 19:05:29 +0100
From:      Oliver Lehmann <lehmann@ans-netz.de>
To:        freebsd-ports@freebsd.org
Subject:   Re: questions about OPTIONS
Message-ID:  <20040123190529.3ad89e06.lehmann@ans-netz.de>
In-Reply-To: <20040123181216.4ebba397.lehmann@ans-netz.de>
References:  <20040123181216.4ebba397.lehmann@ans-netz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Lehmann wrote:

> Hi,
> 
> I think about using OPTIONS in my Makefiles instead of using custom
> "You may use the following...." things.
> 
> But whats about that special situation (It's only an example!):
> 
> [...]
> OPTIONS=	PIXBUF "GDK Pixbuf support" off \
> 		OPENSSL "OpenSSL support" on
> [...]
> 
> .if !defined(WITHOUT_OPENSSL)
> USE_OPENSSL=	yes
> .endif
> 
> .if defined(WITH_PIXBUF)
> USE_GNOME+=	gdkpixbuf
> .else
> USE_GNOME+=	imlib
> .endif
> [...]

Another situation is:

.if !defined(WITHOUT_WAD)
DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}:source heretic_share.wad.gz:wad
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
.endif

The best thing (imho) is to seperate the OPTIONS handling from
bsd.port.mk, and create sth. like bsd.options.mk which can be included
right after OPTIONS is set, before any WITH(OUT) variable gets checked. In
that case, i can include bsd.port.pre.mk after i set DISTFILES,
USE_OPENSSL and so on...



-- 
 Oliver Lehmann
  http://www.pofo.de/
  http://wishlist.ans-netz.de/



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