xref: /freebsd/targets/Makefile.inc (revision d6b92ffa)
1# $FreeBSD$
2
3.if !target(__${_this}__)
4__${_this}__:
5
6_CURDIR ?= ${.CURDIR}
7_OBJDIR ?= ${.OBJDIR}
8
9.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."
10
11.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
12.if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T})
13_bootstrap_dirdeps = yes
14.else
15# BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR
16# This is useful if we need to leverage DIRDEPS
17BUILD_AT_LEVEL0 = no
18# this renders the rest harmless
19PKG_METHOD = no
20.endif
21.endif
22
23# The makefile in subdirs should set this to something useful
24# the default should do nothing.
25PKG_METHOD ?= none
26
27.MAIN: all
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