Repository navigation
8000
Expand file tree
/
Copy pathMakefile
More file actions
92 lines (77 loc) · 2.58 KB
/
Copy pathMakefile
File metadata and controls
92 lines (77 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
8000
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# $NetBSD: Makefile,v 1.24 2013/10/16 14:50:43 christos Exp $
.include <bsd.own.mk>
.if ${MKX11} != "no"
. if ${X11FLAVOUR} == "Xorg"
EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg
. else
EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86
. endif
.endif
.if defined(__MINIX)
.if ${MKLIBSTDCXX} == "yes"
EXTRA_DIST_FILES+= ${.CURDIR}/Minix.libstdcxx
.endif
.if ${MKLIBCXX} == "yes"
EXTRA_DIST_FILES+= ${.CURDIR}/Minix.libcxx
.endif
.if ${MKBITCODE} == "yes"
EXTRA_DIST_FILES+= ${.CURDIR}/Minix.bitcode
.endif
.endif # defined(__MINIX)
# XXX these are only used by compat currently, but they could be used
# by something else; this may need to be fixed properly in the future.
.if ${MKCOMPAT} != "no" || defined(__MINIX)
.if exists(NetBSD.dist.${MACHINE_ARCH})
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
.elif !empty(MACHINE_ARCH:Mearm*)
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.earm
.endif
.endif
.if ${MKATF} != "no"
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests
.endif
.if ${MKEXTSRC} != "no"
EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc
.endif
NetBSD.dist: NetBSD.dist.tmp
cmp -s NetBSD.dist.tmp NetBSD.dist || { \
echo "Updating NetBSD.dist"; \
mv NetBSD.dist.tmp NetBSD.dist; \
}
NetBSD.dist.tmp::
${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
${.TARGET}
CONFIGFILES= NetBSD.dist special
FILESDIR= /etc/mtree
# distrib-dirs --
# Populate $DESTDIR with directories needed by NetBSD
#
.if ${MKUNPRIVED} == "no"
TOOL_MTREE.unpriv=
.else
TOOL_MTREE.unpriv= -W
.endif
# postinstall(8) invokes this target to produce the right
# /etc/mtree/NetBSD.dist content without duplicating logic from
# the Makefile.
#
emit_dist_file:
@cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
.if !defined(DISTRIBUTION_DONE) # {
# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
# INSTALL_DIR would want to write to the metalog, and it can't do that
# if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
# Invoke mtree to create the directories listed in NetBSD.dist;
# then invoke mtree again to register those directories in the metalog.
${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
-p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
.if ${MKUNPRIVED} != "no" # {
${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
-p ${DESTDIR}/ -C -k all | \
${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
.endif # MKUNPRIVED # }
.endif # DISTRIBUTION_DONE # }
CLEANFILES+= NetBSD.dist NetBSD.dist.tmp
.include <bsd.prog.mk>