| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.21 2011/09/05 09:57:02 apb Exp $ | | 1 | # $NetBSD: Makefile,v 1.22 2011/09/10 17:02:46 apb Exp $ |
2 | | | 2 | |
3 | .include <bsd.own.mk> | | 3 | .include <bsd.own.mk> |
4 | | | 4 | |
5 | .if ${MKX11} != "no" | | 5 | .if ${MKX11} != "no" |
6 | . if ${X11FLAVOUR} == "Xorg" | | 6 | . if ${X11FLAVOUR} == "Xorg" |
7 | EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg | | 7 | EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg |
8 | . else | | 8 | . else |
9 | EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86 | | 9 | EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86 |
10 | . endif | | 10 | . endif |
11 | .endif | | 11 | .endif |
12 | | | 12 | |
13 | # XXX these are only used by compat currently, but they could be used | | 13 | # XXX these are only used by compat currently, but they could be used |
14 | # by something else; this may need to be fixed properly in the future. | | 14 | # by something else; this may need to be fixed properly in the future. |
| @@ -16,33 +16,32 @@ EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist | | | @@ -16,33 +16,32 @@ EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist |
16 | .if exists(NetBSD.dist.${MACHINE_ARCH}) | | 16 | .if exists(NetBSD.dist.${MACHINE_ARCH}) |
17 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH} | | 17 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH} |
18 | .endif | | 18 | .endif |
19 | .endif | | 19 | .endif |
20 | | | 20 | |
21 | .if ${MKATF} != "no" | | 21 | .if ${MKATF} != "no" |
22 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests | | 22 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests |
23 | .endif | | 23 | .endif |
24 | | | 24 | |
25 | .if ${MKEXTSRC} != "no" | | 25 | .if ${MKEXTSRC} != "no" |
26 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc | | 26 | EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc |
27 | .endif | | 27 | .endif |
28 | | | 28 | |
29 | NetBSD.dist.tmp= ${.OBJDIR}/NetBSD.dist.tmp | | 29 | NetBSD.dist: NetBSD.dist.tmp |
30 | NetBSD.dist: ${NetBSD.dist.tmp} | | 30 | cmp -s NetBSD.dist.tmp NetBSD.dist || { \ |
31 | cmp -s ${NetBSD.dist.tmp} ${.TARGET} || { \ | | | |
32 | echo "Updating NetBSD.dist"; \ | | 31 | echo "Updating NetBSD.dist"; \ |
33 | mv ${NetBSD.dist.tmp} ${.TARGET}; \ | | 32 | mv NetBSD.dist.tmp NetBSD.dist; \ |
34 | } | | 33 | } |
35 | ${NetBSD.dist.tmp}:: | | 34 | NetBSD.dist.tmp:: |
36 | ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \ | | 35 | ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \ |
37 | ${.TARGET} | | 36 | ${.TARGET} |
38 | | | 37 | |
39 | CONFIGFILES= NetBSD.dist special | | 38 | CONFIGFILES= NetBSD.dist special |
40 | FILESDIR= /etc/mtree | | 39 | FILESDIR= /etc/mtree |
41 | | | 40 | |
42 | # distrib-dirs -- | | 41 | # distrib-dirs -- |
43 | # Populate $DESTDIR with directories needed by NetBSD | | 42 | # Populate $DESTDIR with directories needed by NetBSD |
44 | # | | 43 | # |
45 | .if ${MKUNPRIVED} == "no" | | 44 | .if ${MKUNPRIVED} == "no" |
46 | TOOL_MTREE.unpriv= | | 45 | TOOL_MTREE.unpriv= |
47 | .else | | 46 | .else |
48 | TOOL_MTREE.unpriv= -W | | 47 | TOOL_MTREE.unpriv= -W |
| @@ -62,16 +61,16 @@ distrib-dirs: .PHONY check_DESTDIR NetBS | | | @@ -62,16 +61,16 @@ distrib-dirs: .PHONY check_DESTDIR NetBS |
62 | # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist. | | 61 | # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist. |
63 | ${HOST_INSTALL_DIR} -m 755 ${DESTDIR} | | 62 | ${HOST_INSTALL_DIR} -m 755 ${DESTDIR} |
64 | # Invoke mtree to create the directories listed in NetBSD.dist; | | 63 | # Invoke mtree to create the directories listed in NetBSD.dist; |
65 | # then invoke mtree again to register those directories in the metalog. | | 64 | # then invoke mtree again to register those directories in the metalog. |
66 | ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ | | 65 | ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ |
67 | -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv} | | 66 | -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv} |
68 | .if ${MKUNPRIVED} != "no" # { | | 67 | .if ${MKUNPRIVED} != "no" # { |
69 | ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ | | 68 | ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ |
70 | -p ${DESTDIR}/ -C -k all | \ | | 69 | -p ${DESTDIR}/ -C -k all | \ |
71 | ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add} | | 70 | ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add} |
72 | .endif # MKUNPRIVED # } | | 71 | .endif # MKUNPRIVED # } |
73 | .endif # DISTRIBUTION_DONE # } | | 72 | .endif # DISTRIBUTION_DONE # } |
74 | | | 73 | |
75 | CLEANFILES+= NetBSD.dist ${NetBSD.dist.tmp} | | 74 | CLEANFILES+= NetBSD.dist NetBSD.dist.tmp |
76 | | | 75 | |
77 | .include <bsd.prog.mk> | | 76 | .include <bsd.prog.mk> |