From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 20 19:13:53 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1762216A403 for ; Fri, 20 Oct 2006 19:13:53 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4E1843D5C for ; Fri, 20 Oct 2006 19:13:47 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 6BB7B62C5; Fri, 20 Oct 2006 23:13:45 +0400 (MSD) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 94F2A625E; Fri, 20 Oct 2006 23:13:28 +0400 (MSD) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id k9KJDWCj060151; Fri, 20 Oct 2006 23:13:32 +0400 (MSD) (envelope-from ru) Date: Fri, 20 Oct 2006 23:13:32 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20061020191332.GC59856@rambler-co.ru> References: <20061020150848.GQ53114@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5Mfx4RzfBqgnTE/w" Content-Disposition: inline In-Reply-To: <20061020150848.GQ53114@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-hackers@FreeBSD.org Subject: 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: Fri, 20 Oct 2006 19:13:53 -0000 --5Mfx4RzfBqgnTE/w Content-Type: multipart/mixed; boundary="VUDLurXRWRKrGuMn" Content-Disposition: inline --VUDLurXRWRKrGuMn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 20, 2006 at 05:08:48PM +0200, Jeremie Le Hen wrote: > Hi, >=20 > src.conf(5) manual page states: >=20 > % 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 FreeB= SD > % sources, which are usually found in /usr/src. >=20 > 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 build= s. >=20 > Is it the expected behaviour ? Maybe WITH(OUT)_ should simply avoid > modifying CFLAGS (though I think this might become useful in the near > future). >=20 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, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --VUDLurXRWRKrGuMn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Content-Transfer-Encoding: quoted-printable Index: bsd.own.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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(____) ____: =20 +.if !defined(_WITHOUT_SRCCONF) SRCCONF?=3D /etc/src.conf .if exists(${SRCCONF}) .include "${SRCCONF}" .endif +.endif =20 # Binaries BINOWN?=3D root @@ -170,6 +172,7 @@ STRIP?=3D -s COMPRESS_CMD?=3D gzip -cn COMPRESS_EXT?=3D .gz =20 +.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:=3D no MK_${var}_SUPPORT:=3D yes .endif .endfor +.endif # !_WITHOUT_SRCCONF =20 .endif # !target(____) Index: bsd.port.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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?=3D /usr/ports BSDPORTMK?=3D ${PORTSDIR}/Mk/bsd.port.mk =20 -# Needed to keep bsd.own.mk from reading in /etc/src.conf when building po= rts. -SRCCONF=3D /dev/null +# Needed to keep bsd.own.mk from reading in /etc/src.conf +# and setting MK_* variables when building ports. +_WITHOUT_SRCCONF=3D =20 .include .include "${BSDPORTMK}" --VUDLurXRWRKrGuMn-- --5Mfx4RzfBqgnTE/w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFOR/cqRfpzJluFF4RAsvzAKCIAwd+jNts1htDjUnIF0S0cvZ9PQCeOZZN JI2jg4o3JycW6uJkggYaJOg= =zTXx -----END PGP SIGNATURE----- --5Mfx4RzfBqgnTE/w--