Date: Mon, 1 Jul 2002 07:14:58 +0200 From: Anton Berezin <tobez@tobez.org> To: Doug Barton <DougB@FreeBSD.org> Cc: ports@FreeBSD.org Subject: Re: can't override CFLAGS in port makefile Message-ID: <20020701051458.GA84241@heechee.tobez.org> In-Reply-To: <3D1FD83E.3C95470D@FreeBSD.org> References: <3D1FD83E.3C95470D@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On Sun, Jun 30, 2002 at 09:19:10PM -0700, Doug Barton wrote: > Workin' on some stuff this week, I got tripped up again by a problem > I've run into before... namely that if a user has CFLAGS defined in > /etc/make.conf, I can't twiddle it in my port's Makefile. Specifically, > I'd like to be able to add: > > CFLAGS+= -static > > under certain circumstances. If I don't define anything for CFLAGS in > /etc/make.conf, it works. However, it doesn't if the user has it > defined. > > Any ideas? That's because ordinarily CFLAGS is passed to the sub-make in the environment, which gets overwritten by make.conf. If you define MAKE_ARGS+= CFLAGS="${CFLAGS}" everything should work provided that MAKE_ARGS features in the sub-make invocation command line, which is the case for do-build and do-install targets. =Anton. -- | Anton Berezin | FreeBSD: The power to serve | | catpipe Systems ApS _ _ |_ | http://www.FreeBSD.org | | tobez@catpipe.net (_(_|| | tobez@FreeBSD.org | | +45 7021 0050 | Private: tobez@tobez.org | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020701051458.GA84241>