From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 19 00:16:39 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A703916A40F; Sun, 19 Nov 2006 00:16:39 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp1-g19.free.fr (smtp1-g19.free.fr [212.27.42.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F93743D67; Sun, 19 Nov 2006 00:16:32 +0000 (GMT) (envelope-from tataz@tataz.chchile.org) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp1-g19.free.fr (Postfix) with ESMTP id 0863E3455; Sun, 19 Nov 2006 01:16:37 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 4A9E19B46E; Sun, 19 Nov 2006 00:17:06 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 316C7405B; Sun, 19 Nov 2006 01:17:06 +0100 (CET) Date: Sun, 19 Nov 2006 01:17:06 +0100 From: Jeremie Le Hen To: Ruslan Ermilov Message-ID: <20061119001706.GY20405@obiwan.tataz.chchile.org> References: <20061020150848.GQ53114@obiwan.tataz.chchile.org> <20061020191332.GC59856@rambler-co.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061020191332.GC59856@rambler-co.ru> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-hackers@FreeBSD.org, Jeremie Le Hen Subject: Re: [fbsd] Re: src.conf(5) seems to affect ports build X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Nov 2006 00:16:39 -0000 Ruslan, could you commit this patch, please ? Thank you. Regards, On Fri, Oct 20, 2006 at 11:13:32PM +0400, Ruslan Ermilov wrote: > On Fri, Oct 20, 2006 at 05:08:48PM +0200, Jeremie Le Hen wrote: > > Hi, > > > > src.conf(5) manual page states: > > > > % The src.conf file contains settings that will apply to every build > > % involving the FreeBSD source tree; see build(7). > > % ... > > % The only purpose of src.conf is to control the compilation of the FreeBSD > > % sources, which are usually found in /usr/src. > > > > However, share/mk/bsd.port.mk includes which in turn includes > > /etc/src.conf. Therefore if I have some WITH_/WITHOUT_ knob in it > > which affects CFLAGS, they will be taken into account even for port builds. > > > > Is it the expected behaviour ? Maybe WITH(OUT)_ should simply avoid > > modifying CFLAGS (though I think this might become useful in the near > > future). > > > See if the attached patch helps. If it does, I'll commit. I've > never heard back on this patch after I sent it to obrien@. > > > Cheers, > -- > Ruslan Ermilov > ru@FreeBSD.org > FreeBSD committer > Index: bsd.own.mk > =================================================================== > RCS file: /home/ncvs/src/share/mk/bsd.own.mk,v > retrieving revision 1.57 > diff -u -p -r1.57 bsd.own.mk > --- bsd.own.mk 30 Sep 2006 11:32:46 -0000 1.57 > +++ bsd.own.mk 30 Sep 2006 20:31:16 -0000 > @@ -104,10 +104,12 @@ > .if !target(____) > ____: > > +.if !defined(_WITHOUT_SRCCONF) > SRCCONF?= /etc/src.conf > .if exists(${SRCCONF}) > .include "${SRCCONF}" > .endif > +.endif > > # Binaries > BINOWN?= root > @@ -170,6 +172,7 @@ STRIP?= -s > COMPRESS_CMD?= gzip -cn > COMPRESS_EXT?= .gz > > +.if !defined(_WITHOUT_SRCCONF) > # > # Define MK_* variables (which are either "yes" or "no") for users > # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the > @@ -447,5 +450,6 @@ MK_${var}_SUPPORT:= no > MK_${var}_SUPPORT:= yes > .endif > .endfor > +.endif # !_WITHOUT_SRCCONF > > .endif # !target(____) > Index: bsd.port.mk > =================================================================== > RCS file: /home/ncvs/src/share/mk/bsd.port.mk,v > retrieving revision 1.308 > diff -u -p -r1.308 bsd.port.mk > --- bsd.port.mk 24 Aug 2006 18:04:49 -0000 1.308 > +++ bsd.port.mk 26 Aug 2006 13:55:59 -0000 > @@ -3,8 +3,9 @@ > PORTSDIR?= /usr/ports > BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk > > -# Needed to keep bsd.own.mk from reading in /etc/src.conf when building ports. > -SRCCONF= /dev/null > +# Needed to keep bsd.own.mk from reading in /etc/src.conf > +# and setting MK_* variables when building ports. > +_WITHOUT_SRCCONF= > > .include > .include "${BSDPORTMK}" -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >