xref: /freebsd/targets/Makefile.inc (revision bdd1243df58e60e85101c09001d9812a789b6bc4)
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.MAIN: all
24
25# The makefile in subdirs should set this to something useful
26# the default should do nothing.
27PKG_METHOD ?= none
28none:
29
30.if ${build-*:${M_L_TARGETS}} != ""
31# just build the bits, skip packaging
32all:
33SHIPDIR = no
34.if ${RELDIR} != "."
35PKG_METHOD = no
36.endif
37.endif
38
39.if ${PKG_METHOD:Mno*} != ""
40all: ${PKG_METHOD}
41
42# set this to "no" for manual control
43UPDATE_DEPENDFILE ?= yes
44.endif
45
46.if ${UPDATE_DEPENDFILE:Uno} == "yes"
47.include <meta.autodep.mk>
48.endif
49
50# all the clever packaging methods go here....
51
52.endif					# level 0
53
54.endif					# _this
55