Re: [fbsd] Re: src.conf(5) seems to affect ports build



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

+.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(__<bsd.own.mk>__)
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 <bsd.own.mk>
.include "${BSDPORTMK}"




--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: src.conf(5) seems to affect ports build
    ... % The src.conf file contains settings that will apply to every build ... % involving the FreeBSD source tree; ... % The only purpose of src.conf is to control the compilation of the FreeBSD ... See if the attached patch helps. ...
    (freebsd-hackers)
  • Please commit FreeBSD PR kern/27615 patch
    ... FreeBSD PR kern/27615 has been open since 4.3. ... Could you commit the patch that's there before ... with "unsubscribe freebsd-security" in the body of the message ...
    (FreeBSD-Security)
  • cvs-src summary for November 22-29
    ... It is intended to help the FreeBSD community keep up with the fast-paced ... You can get old summaries, and an HTML version of this one, at ... objectors to any commit. ... Important bug fixes ...
    (freebsd-current)
  • Re: [OT] Q: what would you choose for a VCS today
    ... FreeBSD as base that would allow better teams cooperation and easy code ... control fly out the window from, say, the 42nd floor. ... If you think you need a vendor branch, take a look at mercurial patch ... Patch queues are quite powerful, and even though you end up versioning ...
    (freebsd-hackers)
  • cvs-src summary for September 28 - October 4
    ... It is intended to help the FreeBSD community keep up with the fast-paced ... You can get old summaries, and an HTML version of this one, at ... on diverted status -- that is, whether they came from a divert socket ... Dag-Erling Smorgrav made a commit to rm, ...
    (freebsd-current)