Author: imp
Date: Sat May 17 01:47:06 2014
New Revision: 266278
URL: http://svnweb.freebsd.org/changeset/base/266278

Log:
  Read in SRCCONF early and consistently, if src.sys.mk exists, which is
  should for all normal builds. Read /etc/make.conf earlier than before,
  but consistently before SRCCONF and local.sys.mk.

Added:
  head/share/mk/src.sys.mk   (contents, props changed)
Modified:
  head/share/mk/src.opts.mk
  head/share/mk/sys.mk

Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk   Sat May 17 00:53:12 2014        (r266277)
+++ head/share/mk/src.opts.mk   Sat May 17 01:47:06 2014        (r266278)
@@ -30,13 +30,6 @@
 .if !target(__<src.opts.mk>__)
 __<src.opts.mk>__:
 
-# Allow user to configure things that only effect src tree builds.
-SRCCONF?=      /etc/src.conf
-.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf"
-.include "${SRCCONF}"
-.endif
-
-# Must be included after src.conf
 .include <bsd.own.mk>
 
 #

Added: head/share/mk/src.sys.mk
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/mk/src.sys.mk    Sat May 17 01:47:06 2014        (r266278)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+# Allow user to configure things that only effect src tree builds.
+SRCCONF?=      /etc/src.conf
+.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf"
+.include "${SRCCONF}"
+.endif

Modified: head/share/mk/sys.mk
==============================================================================
--- head/share/mk/sys.mk        Sat May 17 00:53:12 2014        (r266277)
+++ head/share/mk/sys.mk        Sat May 17 01:47:06 2014        (r266278)
@@ -14,11 +14,22 @@ unix                ?=      We run FreeBSD, not UNIX.
 # for something different in FreeBSD.
 #
 
MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
+
+# Pull in global settings.
+__MAKE_CONF?=/etc/make.conf
+.if exists(${__MAKE_CONF})
+.include "${__MAKE_CONF}"
 .endif
 
+# Setup anything for the FreeBSD source build, if we're building
+# inside the source tree. Needs to be after make.conf, but before
+# local stuff.
+.sinclude <src.sys.mk>
+
 # Set any local definitions first. Place this early, but it needs
 # MACHINE_CPUARCH to be defined.
 .sinclude <local.sys.mk>
+.endif
 
 # If the special target .POSIX appears (without prerequisites or
 # commands) before the first noncomment line in the makefile, make shall
@@ -314,12 +325,6 @@ YFLAGS             ?=      -d
        rm -f ${.PREFIX}.tmp.c
        ${CTFCONVERT_CMD}
 
-# FreeBSD build pollution.  Hide it in the non-POSIX part of the ifdef.
-__MAKE_CONF?=/etc/make.conf
-.if exists(${__MAKE_CONF})
-.include "${__MAKE_CONF}"
-.endif
-
 .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
 SHELL= ${__MAKE_SHELL}
 .SHELL: path=${__MAKE_SHELL}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to