1 # $NetBSD: Makefile,v 1.24 2013/10/16 14:50:43 christos Exp $
6 . if
${X11FLAVOUR} == "Xorg"
7 EXTRA_DIST_FILES
= ${.CURDIR
}/NetBSD.
dist.Xorg
9 EXTRA_DIST_FILES
= ${.CURDIR
}/NetBSD.
dist.XFree86
14 .if
${MKLIBSTDCXX} == "yes"
15 EXTRA_DIST_FILES
+= ${.CURDIR
}/Minix.libstdcxx
18 .if
${MKLIBCXX} == "yes"
19 EXTRA_DIST_FILES
+= ${.CURDIR
}/Minix.libcxx
22 .if
${MKBITCODE} == "yes"
23 EXTRA_DIST_FILES
+= ${.CURDIR
}/Minix.bitcode
25 .
endif # defined(__MINIX)
27 # XXX these are only used by compat currently, but they could be used
28 # by something else; this may need to be fixed properly in the future.
29 .if
${MKCOMPAT} != "no" || defined
(__MINIX
)
30 .if exists
(NetBSD.
dist.
${MACHINE_ARCH})
31 EXTRA_DIST_FILES
+= ${.CURDIR
}/NetBSD.
dist.
${MACHINE_ARCH}
32 .elif
!empty
(MACHINE_ARCH
:Mearm
*)
33 EXTRA_DIST_FILES
+= ${.CURDIR
}/NetBSD.
dist.earm
38 EXTRA_DIST_FILES
+= ${.CURDIR
}/NetBSD.
dist.tests
41 .if
${MKEXTSRC} != "no"
42 EXTRA_DIST_FILES
+= ${.CURDIR
}/NetBSD.
dist.extsrc
45 NetBSD.
dist: NetBSD.
dist.tmp
46 cmp
-s NetBSD.
dist.tmp NetBSD.
dist ||
{ \
47 echo
"Updating NetBSD.dist"; \
48 mv NetBSD.
dist.tmp NetBSD.
dist; \
51 ${TOOL_CAT} ${.CURDIR
}/NetBSD.
dist.base
${EXTRA_DIST_FILES} > \
54 CONFIGFILES
= NetBSD.
dist special
58 # Populate $DESTDIR with directories needed by NetBSD
60 .if
${MKUNPRIVED} == "no"
66 # postinstall(8) invokes this target to produce the right
67 # /etc/mtree/NetBSD.dist content without duplicating logic from
71 @cat
${.CURDIR
}/NetBSD.
dist.base
${EXTRA_DIST_FILES}
73 distrib-dirs
: .PHONY check_DESTDIR NetBSD.
dist
74 .if
!defined
(DISTRIBUTION_DONE
) # {
75 # Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
76 # INSTALL_DIR would want to write to the metalog, and it can't do that
77 # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
78 ${HOST_INSTALL_DIR} -m
755 ${DESTDIR}
79 # Invoke mtree to create the directories listed in NetBSD.dist;
80 # then invoke mtree again to register those directories in the metalog.
81 ${TOOL_MTREE} -def
${.OBJDIR
}/NetBSD.
dist -N
${.CURDIR
}/.. \
82 -p
${DESTDIR}/ -U
${TOOL_MTREE.unpriv
}
83 .if
${MKUNPRIVED} != "no" # {
84 ${TOOL_MTREE} -def
${.OBJDIR
}/NetBSD.
dist -N
${.CURDIR
}/.. \
85 -p
${DESTDIR}/ -C
-k
all | \
86 ${TOOL_AWK} '/ optional/ {next} // {print}' |
${METALOG.add
}
87 .
endif # MKUNPRIVED # }
88 .
endif # DISTRIBUTION_DONE # }
90 CLEANFILES
+= NetBSD.
dist NetBSD.
dist.tmp
92 .
include <bsd.prog.mk
>