questions about OPTIONS

Oliver Lehmann lehmann at ans-netz.de
Fri Jan 23 10:07:15 PST 2004


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/


More information about the freebsd-ports mailing list