Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 2006 23:13:32 +0400
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: src.conf(5) seems to affect ports build
Message-ID:  <20061020191332.GC59856@rambler-co.ru>
In-Reply-To: <20061020150848.GQ53114@obiwan.tataz.chchile.org>
References:  <20061020150848.GQ53114@obiwan.tataz.chchile.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <bsd.own.mk> 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(__<bsd.own.mk>__)
 __<bsd.own.mk>__:
=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(__<bsd.own.mk>__)
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 <bsd.own.mk>
 .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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061020191332.GC59856>