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