Home | History | Annotate | Line # | Download | only in mtree
Makefile revision 1.22.8.1
      1  1.22.8.1       tls #	$NetBSD: Makefile,v 1.22.8.1 2013/06/23 06:26:21 tls Exp $
      2       1.6       mrg 
      3       1.6       mrg .include <bsd.own.mk>
      4       1.6       mrg 
      5       1.6       mrg .if ${MKX11} != "no"
      6       1.6       mrg . if ${X11FLAVOUR} == "Xorg"
      7      1.12       mrg EXTRA_DIST_FILES=	${.CURDIR}/NetBSD.dist.Xorg
      8       1.6       mrg . else
      9      1.12       mrg EXTRA_DIST_FILES=	${.CURDIR}/NetBSD.dist.XFree86
     10       1.6       mrg . endif
     11       1.6       mrg .endif
     12       1.6       mrg 
     13      1.19       mrg # XXX these are only used by compat currently, but they could be used
     14      1.19       mrg # by something else; this may need to be fixed properly in the future.
     15      1.19       mrg .if ${MKCOMPAT} != "no"
     16      1.13       mrg .if exists(NetBSD.dist.${MACHINE_ARCH})
     17      1.13       mrg EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
     18  1.22.8.1       tls .elif !empty(MACHINE_ARCH:Mearm*)
     19  1.22.8.1       tls EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.earm
     20      1.13       mrg .endif
     21      1.19       mrg .endif
     22      1.13       mrg 
     23      1.18     njoly .if ${MKATF} != "no"
     24      1.18     njoly EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.tests
     25      1.18     njoly .endif
     26      1.18     njoly 
     27      1.11  uebayasi .if ${MKEXTSRC} != "no"
     28      1.12       mrg EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.extsrc
     29      1.11  uebayasi .endif
     30      1.11  uebayasi 
     31      1.22       apb NetBSD.dist:	NetBSD.dist.tmp
     32      1.22       apb 	cmp -s NetBSD.dist.tmp NetBSD.dist || { \
     33      1.14  uebayasi 		echo "Updating NetBSD.dist"; \
     34      1.22       apb 		mv NetBSD.dist.tmp NetBSD.dist; \
     35      1.14  uebayasi 	}
     36      1.22       apb NetBSD.dist.tmp::
     37      1.12       mrg 	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
     38       1.9  stacktic 	    ${.TARGET}
     39       1.1       mrg 
     40       1.5     lukem CONFIGFILES=	NetBSD.dist special
     41       1.1       mrg FILESDIR=	/etc/mtree
     42       1.1       mrg 
     43       1.6       mrg # distrib-dirs --
     44       1.6       mrg #	Populate $DESTDIR with directories needed by NetBSD
     45       1.6       mrg #
     46       1.6       mrg .if ${MKUNPRIVED} == "no"
     47       1.6       mrg TOOL_MTREE.unpriv=
     48       1.6       mrg .else
     49       1.6       mrg TOOL_MTREE.unpriv=	-W
     50       1.6       mrg .endif
     51       1.6       mrg 
     52      1.17    dyoung # postinstall(8) invokes this target to produce the right
     53      1.17    dyoung # /etc/mtree/NetBSD.dist content without duplicating logic from
     54      1.17    dyoung # the Makefile.
     55      1.17    dyoung #
     56      1.16    dyoung emit_dist_file:
     57      1.17    dyoung 	cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
     58      1.16    dyoung 
     59      1.10  drochner distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
     60       1.6       mrg .if !defined(DISTRIBUTION_DONE)						# {
     61       1.6       mrg # Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
     62       1.6       mrg # INSTALL_DIR would want to write to the metalog, and it can't do that
     63       1.6       mrg # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
     64       1.6       mrg 	${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
     65      1.20       jym # Invoke mtree to create the directories listed in NetBSD.dist;
     66       1.6       mrg # then invoke mtree again to register those directories in the metalog.
     67       1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     68       1.6       mrg 	    -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
     69       1.6       mrg .if ${MKUNPRIVED} != "no"						# {
     70       1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     71       1.6       mrg 	    -p ${DESTDIR}/ -C -k all | \
     72       1.6       mrg 	    ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
     73       1.6       mrg .endif	# MKUNPRIVED							# }
     74       1.6       mrg .endif	# DISTRIBUTION_DONE						# }
     75       1.6       mrg 
     76      1.22       apb CLEANFILES+=	NetBSD.dist NetBSD.dist.tmp
     77      1.10  drochner 
     78       1.1       mrg .include <bsd.prog.mk>
     79