]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - targets/Makefile.inc
ping(8): Fix a mandoc related issue
[FreeBSD/FreeBSD.git] / targets / Makefile.inc
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
17 BUILD_AT_LEVEL0 = no
18 # this renders the rest harmless
19 PKG_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.
27 PKG_METHOD ?= none
28 none:
29
30 .if ${build-*:${M_L_TARGETS}} != ""
31 # just build the bits, skip packaging
32 all:
33 SHIPDIR = no
34 .if ${RELDIR} != "."
35 PKG_METHOD = no
36 .endif
37 .endif
38
39 .if ${PKG_METHOD:Mno*} != ""
40 all: ${PKG_METHOD}
41
42 # set this to "no" for manual control
43 UPDATE_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