From 6b14aaa4d43d98b80f931b376b68c3f69518b5f8 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 17 May 2014 01:47:06 +0000 Subject: [PATCH] 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. --- share/mk/src.opts.mk | 7 ------- share/mk/src.sys.mk | 7 +++++++ share/mk/sys.mk | 17 +++++++++++------ 3 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 share/mk/src.sys.mk diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 887858de00bf..4627443ce935 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -30,13 +30,6 @@ .if !target(____) ____: -# 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 # diff --git a/share/mk/src.sys.mk b/share/mk/src.sys.mk new file mode 100644 index 000000000000..39ed4c8268d0 --- /dev/null +++ b/share/mk/src.sys.mk @@ -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 diff --git a/share/mk/sys.mk b/share/mk/sys.mk index f9ea0e23d413..634b13034be4 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -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 + # Set any local definitions first. Place this early, but it needs # MACHINE_CPUARCH to be defined. .sinclude +.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}