prevent overwriting custom make options in ports

Roland Smith rsmith at
Mon Jun 9 16:03:04 UTC 2008

On Mon, Jun 09, 2008 at 03:33:01PM +0100, Anton Shterenlikht wrote:
> I use ports/lang/gcc42.
> I set WITHOUT_JAVA=yes in the Makefile.
> However, with each tree update this option is
> overwritten, so I have to edit the Makefile
> each time I update the port.
> What is the best way to preserve my custom setting,
> add an environment variable?

Add the following to your /etc/make.conf:

.if ${.CURDIR:M*/lang/gcc*}

What this means is: if the current build directory (.CURDIR) matches 
(M) the pattern */lang/gcc*, set WITHOUT_JAVA=yes. See the VARIABLE
ASSIGNMENTS section in the make(1) manual page for details. 

[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list