From owner-freebsd-ports Sun Jun 30 22:15: 9 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E94D37B400; Sun, 30 Jun 2002 22:15:06 -0700 (PDT) Received: from heechee.tobez.org (254.adsl0.ryv.worldonline.dk [213.237.10.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACE8743E09; Sun, 30 Jun 2002 22:15:05 -0700 (PDT) (envelope-from tobez@tobez.org) Received: by heechee.tobez.org (Postfix, from userid 1001) id DE7C9ABCC; Mon, 1 Jul 2002 07:14:58 +0200 (CEST) Date: Mon, 1 Jul 2002 07:14:58 +0200 From: Anton Berezin To: Doug Barton Cc: ports@FreeBSD.org Subject: Re: can't override CFLAGS in port makefile Message-ID: <20020701051458.GA84241@heechee.tobez.org> Mail-Followup-To: Anton Berezin , Doug Barton , ports@FreeBSD.org References: <3D1FD83E.3C95470D@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D1FD83E.3C95470D@FreeBSD.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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