tools/llvm: Do not build with symbols
[minix3.git] / etc / mtree / Makefile
blob04264c572dde74f9a5ec52a47798e37eacdb7f4e
1 # $NetBSD: Makefile,v 1.24 2013/10/16 14:50:43 christos Exp $
3 .include <bsd.own.mk>
5 .if ${MKX11} != "no"
6 . if ${X11FLAVOUR} == "Xorg"
7 EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg
8 . else
9 EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86
10 . endif
11 .endif
13 .if defined(__MINIX)
14 .if ${MKLIBSTDCXX} == "yes"
15 EXTRA_DIST_FILES+= ${.CURDIR}/Minix.libstdcxx
16 .endif
18 .if ${MKLIBCXX} == "yes"
19 EXTRA_DIST_FILES+= ${.CURDIR}/Minix.libcxx
20 .endif
22 .if ${MKBITCODE} == "yes"
23 EXTRA_DIST_FILES+= ${.CURDIR}/Minix.bitcode
24 .endif
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
34 .endif
35 .endif
37 .if ${MKATF} != "no"
38 EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests
39 .endif
41 .if ${MKEXTSRC} != "no"
42 EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc
43 .endif
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; \
50 NetBSD.dist.tmp::
51 ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
52 ${.TARGET}
54 CONFIGFILES= NetBSD.dist special
55 FILESDIR= /etc/mtree
57 # distrib-dirs --
58 # Populate $DESTDIR with directories needed by NetBSD
60 .if ${MKUNPRIVED} == "no"
61 TOOL_MTREE.unpriv=
62 .else
63 TOOL_MTREE.unpriv= -W
64 .endif
66 # postinstall(8) invokes this target to produce the right
67 # /etc/mtree/NetBSD.dist content without duplicating logic from
68 # the Makefile.
70 emit_dist_file:
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>