Allow site.*.mk to augment local.*.mk and src.*.mk

Add some extra customization points so that FreeBSD build
can be adapted to local requirements.
We use these to minimize changes to share/mk

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D37617
This commit is contained in:
Simon J. Gerraty 2022-12-07 11:30:35 -08:00
parent 7014e78fb7
commit 073ccb9d55
9 changed files with 16 additions and 2 deletions

View File

@ -25,4 +25,4 @@ DIRDEPS.OPENSSL.no+= lib/libmd
DIRDEPS.PAM_SUPPORT.yes+= lib/libpam/libpam
DIRDEPS.TCP_WRAPPERS.yes+= lib/libwrap
.-include <site.dirdeps-options.mk>

View File

@ -217,3 +217,5 @@ CSU_DIR.${DEP_MACHINE_ARCH} ?= csu/${DEP_MACHINE_ARCH}
CSU_DIR := ${CSU_DIR.${DEP_MACHINE_ARCH}}
BOOT_MACHINE_DIR:= ${BOOT_MACHINE_DIR.${DEP_MACHINE}}
KERNEL_NAME:= ${KERNEL_NAME.${DEP_MACHINE}}
.-include <site.dirdeps.mk>

View File

@ -36,5 +36,6 @@ CFLAGS+= ${HOST_CFLAGS}
.endif
.-include "src.init.mk"
.-include <site.init.mk>
.-include "${.CURDIR}/local.init.mk"
.endif

View File

@ -25,6 +25,9 @@ MACHINE_ARCH.host = ${_HOST_ARCH}
# the list of machines we support
ALL_MACHINE_LIST?= amd64 arm arm64 i386 powerpc riscv
.-include <site.meta.sys.mk>
.for m in ${ALL_MACHINE_LIST:O:u}
MACHINE_ARCH_LIST.$m?= ${TARGET_ARCHES_${m}:U$m}
MACHINE_ARCH.$m?= ${MACHINE_ARCH_LIST.$m:[1]}

View File

@ -49,3 +49,4 @@ ECHO_TRACE?= true
.endif
.include "src.sys.env.mk"
.-include <site.sys.env.mk>

View File

@ -52,6 +52,7 @@ _PREMK_LIBDIR:= ${LIBDIR}
.endif
.include "src.sys.mk"
.-include <site.sys.mk>
.if ${.MAKE.MODE:Mmeta*} != ""
# we can afford to use cookies to prevent some targets

View File

@ -756,6 +756,8 @@ LIBLNDIR= ${_LIB_OBJTOP}/usr.bin/lex/lib
LIBTERMCAPWDIR= ${LIBTINFOWDIR}
.-include <site.src.libnames.mk>
# Default other library directories to lib/libNAME.
.for lib in ${_LIBRARIES}
LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib}

View File

@ -242,6 +242,8 @@ __DEFAULT_DEPENDENT_OPTIONS= \
__DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var}
.endfor
.-include <site.src.opts.mk>
#
# Default behaviour of some options depends on the architecture. Unfortunately
# this means that we have to test TARGET_ARCH (the buildworld case) as well

View File

@ -42,6 +42,8 @@ _undefMAKEOBJDIRPREFIX= t
.endif
.endif
.-include <site.src.sys.env.mk>
SRC_ENV_CONF?= /etc/src-env.conf
.if !empty(SRC_ENV_CONF) && !target(_src_env_conf_included_)
.-include "${SRC_ENV_CONF}"
@ -89,6 +91,6 @@ MAKESYSPATH:= ${.PARSEDIR:tA}
.endif
.if ${RELDIR:U} == "." && ${.MAKE.LEVEL} == 0
.sinclude "${.CURDIR}/Makefile.sys.inc"
.-include "${.CURDIR}/Makefile.sys.inc"
.endif
.include <src.sys.obj.mk>