xref: /freebsd/share/mk/local.sys.dirdeps.env.mk (revision 0a97523d467443fa54171ef7a399b1c9043eac75)
1
2# For universe we want to potentially
3# build for multiple MACHINE_ARCH per MACHINE
4# so we need more than MACHINE in TARGET_SPEC
5TARGET_SPEC_VARS?= MACHINE MACHINE_ARCH
6
7# this is sufficient for most of the tree.
8.MAKE.DEPENDFILE_DEFAULT = ${.MAKE.DEPENDFILE_PREFIX}
9
10# but if we have a machine qualified file it should be used in preference
11.MAKE.DEPENDFILE_PREFERENCE = \
12	${.MAKE.DEPENDFILE_PREFIX}.${MACHINE} \
13	${.MAKE.DEPENDFILE_PREFIX}
14
15# some corner cases
16BOOT_MACHINE_DIR.amd64 = stand/i386
17
18.-include <site.sys.dirdeps.env.mk>
19
20ALL_MACHINE_LIST?= ${TARGET_MACHINE_LIST}
21
22.for m in ${ALL_MACHINE_LIST:O:u}
23BOOT_MACHINE_DIR.$m ?= stand/$m
24.endfor
25
26HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET}
27
28.if ${REQUESTED_MACHINE:U${MACHINE}} == "host"
29MACHINE= host
30.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET}
31# not what we want
32TARGET_MACHINE= host
33.endif
34.endif
35.if ${MACHINE} == "host"
36OBJTOP := ${HOST_OBJTOP}
37MACHINE_ARCH= ${MACHINE_ARCH_${MACHINE}}
38.endif
39
40
41.if ${.MAKE.LEVEL} == 0 || empty(PYTHON)
42PYTHON ?= /usr/local/bin/python
43.export PYTHON
44
45# _SKIP_BUILD is not 100% as it requires wrapping all 'all:' targets to avoid
46# building in MAKELEVEL0.  Just prohibit 'all' entirely in this case to avoid
47# problems.
48.if make(all)
49.error DIRDEPS_BUILD: Please run '${MAKE}' instead of '${MAKE} all'.
50.endif
51.endif
52
53.if ${.MAKE.OS} != "FreeBSD" || ${_HOST_OSREL:R} < ${OS_REVISION:R}
54# a pseudo option to indicate we need libegacy for host
55MK_host_egacy= yes
56.endif
57