questions about OPTIONS

Joe Marcus Clarke marcus at marcuscom.com
Fri Jan 23 09:30:12 PST 2004


On Fri, 2004-01-23 at 12:12, 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
> [...]
> 
> 
> 
> Where should I include bsd.pre.port.mk? 

After OPTIONS= but before you check WITH_*.

> 
> -   After OPTIONS? In that case, USE_GNOME and USE_OPENSSL
>   wouldn't have any effect.

USE_GNOME will be okay.  USE_OPENSSL would not work, though.

> -   After those WITH_* variables are getting checked? In
>   that case, the options I may had set in the dialog
>   wouldn't be used.

Right.  You cannot include bsd.port.pre.mk after you check the WITH_*
stuff or OPTIONS will have no effect.

> 
> Ideas how to fix/workaround this?

The USE_GNOME thing will work, but you may have to hack in the OpenSSL
dependency.  It would be nice if bsd.openssl.mk could be made to work
before and after bsd.port.pre.mk (e.g. maybe Dirk could add a
WANT_OPENSSL option like we do for GNOME).

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040123/f2d85f39/attachment.bin


More information about the freebsd-ports mailing list