summaryrefslogtreecommitdiffstats
path: root/targets/Makefile.inc
blob: 2dc3b8155824c789dbb2f69c2e6398ff40860f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# $FreeBSD$

.if !target(__${_this}__)
__${_this}__:

_CURDIR ?= ${.CURDIR}
_OBJDIR ?= ${.OBJDIR}

.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."

.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
.if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T})
_bootstrap_dirdeps = yes
.else
# BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR
# This is useful if we need to leverage DIRDEPS
BUILD_AT_LEVEL0 = no
# this renders the rest harmless
PKG_METHOD = no
.endif
.endif

# The makefile in subdirs should set this to something useful
# the default should do nothing.
PKG_METHOD ?= none

.MAIN: all

.if ${build-*:${M_L_TARGETS}} != ""
# just build the bits, skip packaging
all:
SHIPDIR = no
.if ${RELDIR} != "."
PKG_METHOD = no
.endif
.endif

.if ${PKG_METHOD:Mno*} != ""
all: ${PKG_METHOD}

# set this to "no" for manual control
UPDATE_DEPENDFILE ?= yes
.endif

.if ${UPDATE_DEPENDFILE:Uno} == "yes"
.include <meta.autodep.mk>
.endif

# all the clever packaging methods go here....

.endif					# level 0

.endif					# _this
OpenPOWER on IntegriCloud