Makefile revision 1.12
1#	$NetBSD: Makefile,v 1.12 2009/12/12 01:32:10 mrg Exp $
2
3.include <bsd.own.mk>
4
5.if ${MKX11} != "no"
6. if ${X11FLAVOUR} == "Xorg"
7EXTRA_DIST_FILES=	${.CURDIR}/NetBSD.dist.Xorg
8. else
9EXTRA_DIST_FILES=	${.CURDIR}/NetBSD.dist.XFree86
10. endif
11.endif
12
13.if ${MKEXTSRC} != "no"
14EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.extsrc
15.endif
16
17NetBSD.dist:	NetBSD.dist.base ${EXTRA_DIST_FILES}
18	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
19	    ${.TARGET}
20
21CONFIGFILES=	NetBSD.dist special
22FILESDIR=	/etc/mtree
23
24# distrib-dirs --
25#	Populate $DESTDIR with directories needed by NetBSD
26#
27.if ${MKUNPRIVED} == "no"
28TOOL_MTREE.unpriv=
29.else
30TOOL_MTREE.unpriv=	-W
31.endif
32
33distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
34.if !defined(DISTRIBUTION_DONE)						# {
35# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
36# INSTALL_DIR would want to write to the metalog, and it can't do that
37# if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
38	${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
39# Inkoke mtree to create the directories listed in NetBSD.dist;
40# then invoke mtree again to register those directories in the metalog.
41	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
42	    -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
43.if ${MKUNPRIVED} != "no"						# {
44	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
45	    -p ${DESTDIR}/ -C -k all | \
46	    ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
47.endif	# MKUNPRIVED							# }
48.endif	# DISTRIBUTION_DONE						# }
49
50CLEANFILES+=	NetBSD.dist
51
52.include <bsd.prog.mk>
53