xref: /freebsd/targets/Makefile.inc (revision 7899f917b1c0ea178f1d2be0cfb452086d079d23)
1.if !target(__${_this}__)
2__${_this}__:
3
4_CURDIR ?= ${.CURDIR}
5_OBJDIR ?= ${.OBJDIR}
6
7.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."
8
9.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
10.if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T})
11_bootstrap_dirdeps = yes
12.else
13# BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR
14# This is useful if we need to leverage DIRDEPS
15BUILD_AT_LEVEL0 = no
16# this renders the rest harmless
17PKG_METHOD = no
18.endif
19.endif
20
21.MAIN: all
22
23# The makefile in subdirs should set this to something useful
24# the default should do nothing.
25PKG_METHOD ?= none
26none:
27
28.if ${build-*:${M_L_TARGETS}} != ""
29# just build the bits, skip packaging
30all:
31SHIPDIR = no
32.if ${RELDIR} != "."
33PKG_METHOD = no
34.endif
35.endif
36
37.if ${PKG_METHOD:Mno*} != ""
38all: ${PKG_METHOD}
39
40# set this to "no" for manual control
41UPDATE_DEPENDFILE ?= yes
42.endif
43
44.if ${UPDATE_DEPENDFILE:Uno} == "yes"
45.include <meta.autodep.mk>
46.endif
47
48# all the clever packaging methods go here....
49
50.endif					# level 0
51
52.endif					# _this
53