3 # early setup only see also src.sys.mk
5 # make sure this is defined in a consistent manner
6 SRCTOP:= ${.PARSEDIR:tA:H:H}
8 .if ${.CURDIR} == ${SRCTOP}
10 .elif ${.CURDIR:M${SRCTOP}/*}
11 RELDIR := ${.CURDIR:S,${SRCTOP}/,,}
14 # site customizations that do not depend on anything!
15 SRC_ENV_CONF?= /etc/src-env.conf
16 .if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_)
17 .-include "${SRC_ENV_CONF}"
18 _src_env_conf_included_: .NOTMAIN
21 # Top-level installs should not use meta mode as it may prevent installing
23 .if make(*install*) && ${.MAKE.LEVEL} == 0
29 # If we were found via .../share/mk we need to replace that
30 # with ${.PARSEDIR:tA} so that we can be found by
31 # sub-makes launched from objdir.
32 .if ${.MAKEFLAGS:M.../share/mk} != ""
33 .MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
35 .if ${MAKESYSPATH:Uno:M*.../*} != ""
36 MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
38 .elif empty(MAKESYSPATH)
39 MAKESYSPATH:= ${.PARSEDIR:tA}