]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/src.sys.env.mk
MFV r293415:
[FreeBSD/FreeBSD.git] / share / mk / src.sys.env.mk
1 # $FreeBSD$
2
3 # early setup only see also src.sys.mk
4
5 # make sure this is defined in a consistent manner
6 SRCTOP:= ${.PARSEDIR:tA:H:H}
7
8 .if ${.CURDIR} == ${SRCTOP}
9 RELDIR = .
10 .elif ${.CURDIR:M${SRCTOP}/*}
11 RELDIR := ${.CURDIR:S,${SRCTOP}/,,}
12 .endif
13
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
19 .endif
20
21 # If we were found via .../share/mk we need to replace that
22 # with ${.PARSEDIR:tA} so that we can be found by
23 # sub-makes launched from objdir.
24 .if ${.MAKEFLAGS:M.../share/mk} != ""
25 .MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},}
26 .endif
27 .if ${MAKESYSPATH:Uno:M*.../*} != ""
28 MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},}
29 .export MAKESYSPATH
30 .endif