2015-06-19 14:56:24 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
# early setup only see also src.sys.mk
|
|
|
|
|
|
|
|
# make sure this is defined in a consistent manner
|
|
|
|
SRCTOP:= ${.PARSEDIR:tA:H:H}
|
|
|
|
|
2015-09-23 23:30:57 +00:00
|
|
|
.if ${.CURDIR} == ${SRCTOP}
|
2017-10-31 00:07:41 +00:00
|
|
|
RELDIR= .
|
|
|
|
RELTOP= .
|
2015-09-23 23:30:57 +00:00
|
|
|
.elif ${.CURDIR:M${SRCTOP}/*}
|
2017-10-31 00:07:41 +00:00
|
|
|
RELDIR:= ${.CURDIR:S,${SRCTOP}/,,}
|
2015-09-23 23:30:57 +00:00
|
|
|
.endif
|
2017-10-31 00:07:41 +00:00
|
|
|
RELTOP?= ${RELDIR:C,[^/]+,..,g}
|
|
|
|
RELOBJTOP?= ${RELTOP}
|
|
|
|
RELSRCTOP?= ${RELTOP}
|
2015-09-23 23:30:57 +00:00
|
|
|
|
2015-06-19 14:56:24 +00:00
|
|
|
# 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
|
|
|
|
|
2016-05-21 01:31:54 +00:00
|
|
|
# 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
|
2016-08-25 23:55:56 +00:00
|
|
|
.export MK_META_MODE
|
2016-05-21 01:31:54 +00:00
|
|
|
.endif
|
|
|
|
|
2015-06-19 14:56:24 +00:00
|
|
|
# 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
|
2016-05-26 23:20:04 +00:00
|
|
|
.elif empty(MAKESYSPATH)
|
|
|
|
MAKESYSPATH:= ${.PARSEDIR:tA}
|
|
|
|
.export MAKESYSPATH
|
2015-06-19 14:56:24 +00:00
|
|
|
.endif
|
2017-11-01 21:22:05 +00:00
|
|
|
|
2017-11-18 20:01:09 +00:00
|
|
|
.if ${RELDIR:U} == "." && ${.MAKE.LEVEL} == 0
|
|
|
|
.sinclude "${.CURDIR}/Makefile.sys.inc"
|
|
|
|
.endif
|
2017-11-01 21:22:05 +00:00
|
|
|
.include <src.sys.obj.mk>
|