Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135933546
D2860.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D2860.id.diff
View Options
Index: head/share/mk/local.sys.env.mk
===================================================================
--- head/share/mk/local.sys.env.mk
+++ head/share/mk/local.sys.env.mk
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+# This makefile is for customizations that should be done early
+
+.if !defined(_TARGETS)
+# some things we do only once
+_TARGETS:= ${.TARGETS}
+.export _TARGETS
+.endif
+
+# some handy macros
+_this = ${.PARSEDIR:tA}/${.PARSEFILE}
+# some useful modifiers
+
+# A useful trick for testing multiple :M's against something
+# :L says to use the variable's name as its value - ie. literal
+# got = ${clean* destroy:${M_ListToMatch:S,V,.TARGETS,}}
+M_ListToMatch = L:@m@$${V:M$$m}@
+# match against our initial targets (see above)
+M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,}
+
+# turn a list into a set of :N modifiers
+# NskipFoo = ${Foo:${M_ListToSkip}}
+M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N,
+
+# type should be a builtin in any sh since about 1980,
+# AUTOCONF := ${autoconf:L:${M_whence}}
+M_type = @x@(type $$x 2> /dev/null); echo;@:sh:[0]:N* found*:[@]:C,[()],,g
+M_whence = ${M_type}:M/*:[1]
+
+# convert a path to a valid shell variable
+M_P2V = tu:C,[./-],_,g
+
+# these are handy
+# we can use this for a cheap timestamp at the start of a target's script,
+# but not at the end - since make will expand both at the same time.
+TIME_STAMP_FMT = @ %s [%Y-%m-%d %T]
+TIME_STAMP = ${TIME_STAMP_FMT:localtime}
+# this will produce the same output but as of when date(1) is run.
+TIME_STAMP_DATE = `date '+${TIME_STAMP_FMT}'`
+TIME_STAMP_END?= ${TIME_STAMP_DATE}
+
+.include "src.sys.env.mk"
Index: head/share/mk/local.sys.mk
===================================================================
--- head/share/mk/local.sys.mk
+++ head/share/mk/local.sys.mk
@@ -1,34 +1,5 @@
# $FreeBSD$
-.if !defined(_TARGETS)
-# some things we do only once
-_TARGETS:= ${.TARGETS}
-.export _TARGETS
-.endif
-
-# some handy macros
-_this = ${.PARSEDIR:tA}/${.PARSEFILE}
-# some useful modifiers
-
-# A useful trick for testing multiple :M's against something
-# :L says to use the variable's name as its value - ie. literal
-# got = ${clean* destroy:${M_ListToMatch:S,V,.TARGETS,}}
-M_ListToMatch = L:@m@$${V:M$$m}@
-# match against our initial targets (see above)
-M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,}
-
-# turn a list into a set of :N modifiers
-# NskipFoo = ${Foo:${M_ListToSkip}}
-M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N,
-
-# type should be a builtin in any sh since about 1980,
-# AUTOCONF := ${autoconf:L:${M_whence}}
-M_type = @x@(type $$x 2> /dev/null); echo;@:sh:[0]:N* found*:[@]:C,[()],,g
-M_whence = ${M_type}:M/*:[1]
-
-# convert a path to a valid shell variable
-M_P2V = tu:C,[./-],_,g
-
.if ${MK_META_MODE} == "yes"
MAKE_PRINT_VAR_ON_ERROR+= \
.CURDIR \
@@ -51,13 +22,4 @@
.endif
.endif
-# these are handy
-# we can use this for a cheap timestamp at the start of a target's script,
-# but not at the end - since make will expand both at the same time.
-TIME_STAMP_FMT = @ %s [%Y-%m-%d %T]
-TIME_STAMP = ${TIME_STAMP_FMT:localtime}
-# this will produce the same output but as of when date(1) is run.
-TIME_STAMP_DATE = `date '+${TIME_STAMP_FMT}'`
-TIME_STAMP_END?= ${TIME_STAMP_DATE}
-
.include "src.sys.mk"
Index: head/share/mk/src.sys.env.mk
===================================================================
--- head/share/mk/src.sys.env.mk
+++ head/share/mk/src.sys.env.mk
@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+# early setup only see also src.sys.mk
+
+# make sure this is defined in a consistent manner
+SRCTOP:= ${.PARSEDIR:tA:H:H}
+
+# site customizations that do not depend on anything!
+SRC_ENV_CONF?= /etc/src-env.conf
+.if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_)
+.-include "${SRC_ENV_CONF}"
+_src_env_conf_included_: .NOTMAIN
+.endif
+
+# If we were found via .../share/mk we need to replace that
+# with ${.PARSEDIR:tA} so that we can be found by
+# sub-makes launched from objdir.
+.if ${.MAKEFLAGS:M.../share/mk} != ""
+.MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
+.endif
+.if ${MAKESYSPATH:Uno:M*.../*} != ""
+MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
+.export MAKESYSPATH
+.endif
Index: head/share/mk/src.sys.mk
===================================================================
--- head/share/mk/src.sys.mk
+++ head/share/mk/src.sys.mk
@@ -5,24 +5,13 @@
# to preserve historical (and useful) behavior. Changes here need to
# be reflected there so SRCCONF isn't included multiple times.
-# make sure this is defined in a consistent manner
-SRCTOP:= ${.PARSEDIR:tA:H:H}
-
# Allow user to configure things that only effect src tree builds.
SRCCONF?= /etc/src.conf
.if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_)
.sinclude "${SRCCONF}"
_srcconf_included_: .NOTMAIN
.endif
-# If we were found via .../share/mk we need to replace that
-# with ${.PARSEDIR:tA} so that we can be found by
-# sub-makes launched from objdir.
-.if ${.MAKEFLAGS:M.../share/mk} != ""
-.MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
-.endif
-.if ${MAKESYSPATH:Uno:M*.../*} != ""
-MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
-.export MAKESYSPATH
-.endif
+
# tempting, but bsd.compiler.mk causes problems this early
+# probably need to remove dependence on bsd.own.mk
#.include "src.opts.mk"
Index: head/share/mk/sys.mk
===================================================================
--- head/share/mk/sys.mk
+++ head/share/mk/sys.mk
@@ -31,15 +31,9 @@
.include <bsd.mkopt.mk>
-# Pull in global settings.
-__MAKE_CONF?=/etc/make.conf
-.if exists(${__MAKE_CONF})
-.include "${__MAKE_CONF}"
-.endif
-
-# Set any local definitions first. Place this early, but it needs
-# MACHINE_CPUARCH to be defined.
-.-include <local.sys.mk>
+# early include for customization
+# see local.sys.mk below
+.-include <local.sys.env.mk>
.if ${MK_META_MODE} == "yes"
.-include <meta.sys.mk>
@@ -360,6 +354,14 @@
rm -f ${.PREFIX}.tmp.c
${CTFCONVERT_CMD}
+# Pull in global settings.
+__MAKE_CONF?=/etc/make.conf
+.if exists(${__MAKE_CONF})
+.include "${__MAKE_CONF}"
+.endif
+
+# late include for customization
+.-include <local.sys.mk>
.if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
SHELL= ${__MAKE_SHELL}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 15, 7:26 AM (2 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25316146
Default Alt Text
D2860.id.diff (6 KB)
Attached To
Mode
D2860: restore include of make.conf to orginal location
Attached
Detach File
Event Timeline
Log In to Comment