mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
95137b228e
RELSRCTOP is likely not as useful since make will always be running from inside of .OBJDIR and using something like ${.CURDIR}/${RELSRCTOP} is not redundant for ${SRCTOP}. Sponsored by: Dell EMC Isilon
46 lines
1.2 KiB
Makefile
46 lines
1.2 KiB
Makefile
# $FreeBSD$
|
|
|
|
# early setup only see also src.sys.mk
|
|
|
|
# make sure this is defined in a consistent manner
|
|
SRCTOP:= ${.PARSEDIR:tA:H:H}
|
|
|
|
.if ${.CURDIR} == ${SRCTOP}
|
|
RELDIR= .
|
|
RELTOP= .
|
|
.elif ${.CURDIR:M${SRCTOP}/*}
|
|
RELDIR:= ${.CURDIR:S,${SRCTOP}/,,}
|
|
.endif
|
|
RELTOP?= ${RELDIR:C,[^/]+,..,g}
|
|
RELOBJTOP?= ${RELTOP}
|
|
RELSRCTOP?= ${RELTOP}
|
|
|
|
# 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
|
|
|
|
# Top-level installs should not use meta mode as it may prevent installing
|
|
# based on cookies.
|
|
.if make(*install*) && ${.MAKE.LEVEL} == 0
|
|
META_MODE= normal
|
|
MK_META_MODE= no
|
|
.export MK_META_MODE
|
|
.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
|
|
.elif empty(MAKESYSPATH)
|
|
MAKESYSPATH:= ${.PARSEDIR:tA}
|
|
.export MAKESYSPATH
|
|
.endif
|