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}
11 .elif ${.CURDIR:M${SRCTOP}/*}
12 RELDIR:= ${.CURDIR:S,${SRCTOP}/,,}
14 RELTOP?= ${RELDIR:C,[^/]+,..,g}
18 # site customizations that do not depend on anything!
19 SRC_ENV_CONF?= /etc/src-env.conf
20 .if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_)
21 .-include "${SRC_ENV_CONF}"
22 _src_env_conf_included_: .NOTMAIN
25 # Top-level installs should not use meta mode as it may prevent installing
27 .if make(*install*) && ${.MAKE.LEVEL} == 0
33 # If we were found via .../share/mk we need to replace that
34 # with ${.PARSEDIR:tA} so that we can be found by
35 # sub-makes launched from objdir.
36 .if ${.MAKEFLAGS:M.../share/mk} != ""
37 .MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
39 .if ${MAKESYSPATH:Uno:M*.../*} != ""
40 MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
42 .elif empty(MAKESYSPATH)
43 MAKESYSPATH:= ${.PARSEDIR:tA}
47 .include <src.sys.obj.mk>