Best way to override user's CFLAGS in a port?

Thierry Thomas thierry at pompo.net
Tue Sep 7 10:09:37 PDT 2004


Le Mar  7 sep 04 à 18:24:58 +0200, John Polstra <jdp at polstra.com>
 écrivait :
> The ezm3 port has to be built with an optimization level of -O, and
> that's not likely to change any time soon.  Some users, especially
> users of -current where -O2 is officially supported, are getting
> burned by that.  What is the best way for me to change the ezm3 port's
> Makefile so that -O will be used regardless of the user's environment
> or /etc/make.conf settings?

On the contrary, Aspell needs at least -O. Then I have written:

# Does not link without at least -O
.if !defined(CFLAGS) || ${CFLAGS:M-O*} == ""
CFLAGS+=		-O
.endif

Regards,
-- 
Th. Thomas.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20040907/c77caea3/attachment.bin


More information about the freebsd-ports mailing list