mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
ae3019ca08
Use SRCTOP to replace .../ in MAKSYSPATH (avoid extra :tA) Use SRCTOP rather than ROOTSRCDIR in src.libnames.mk Merge from head
27 lines
978 B
Makefile
27 lines
978 B
Makefile
# $FreeBSD$
|
|
|
|
# Note: This file is also duplicated in the sys/conf/kern.pre.mk so
|
|
# it will always grab SRCCONF, even if it isn't being built in-tree
|
|
# 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 in
|
|
# with ${SRCTOP} so that we can be found by
|
|
# sub-makes launched from objdir.
|
|
.if ${.MAKEFLAGS:M.../share/mk} != ""
|
|
.MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${SRCTOP}/share/mk,}
|
|
.endif
|
|
.if ${MAKESYSPATH:Uno:M*.../*} != ""
|
|
MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${SRCTOP}/share/mk,}
|
|
.export MAKESYSPATH
|
|
.endif
|