1# $FreeBSD$ 2 3# early setup only see also src.sys.mk 4 5# make sure this is defined in a consistent manner 6SRCTOP:= ${.PARSEDIR:tA:H:H} 7 8.if ${.CURDIR} == ${SRCTOP} 9RELDIR = . 10.elif ${.CURDIR:M${SRCTOP}/*} 11RELDIR := ${.CURDIR:S,${SRCTOP}/,,} 12.endif 13 14# site customizations that do not depend on anything! 15SRC_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# Top-level installs should not use meta mode as it may prevent installing 22# based on cookies. 23.if make(*install*) && ${.MAKE.LEVEL} == 0 24META_MODE= normal 25MK_META_MODE= no 26.endif 27 28# If we were found via .../share/mk we need to replace that 29# with ${.PARSEDIR:tA} so that we can be found by 30# sub-makes launched from objdir. 31.if ${.MAKEFLAGS:M.../share/mk} != "" 32.MAKEFLAGS:= ${.MAKEFLAGS:S,.../share/mk,${.PARSEDIR:tA},} 33.endif 34.if ${MAKESYSPATH:Uno:M*.../*} != "" 35MAKESYSPATH:= ${MAKESYSPATH:S,.../share/mk,${.PARSEDIR:tA},} 36.export MAKESYSPATH 37.elif empty(MAKESYSPATH) 38MAKESYSPATH:= ${.PARSEDIR:tA} 39.export MAKESYSPATH 40.endif 41