Home | History | Annotate | Line # | Download | only in mtree
Makefile revision 1.9
      1  1.9  stacktic #	$NetBSD: Makefile,v 1.9 2009/11/02 10:23:40 stacktic 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.7        he NETBSD_DIST_X11_FILE=	${.CURDIR}/NetBSD.dist.Xorg
      8  1.6       mrg . else
      9  1.7        he NETBSD_DIST_X11_FILE=	${.CURDIR}/NetBSD.dist.XFree86
     10  1.6       mrg . endif
     11  1.6       mrg .else
     12  1.6       mrg NETBSD_DIST_X11_FILE=
     13  1.6       mrg .endif
     14  1.6       mrg 
     15  1.9  stacktic ${.OBJDIR}/NetBSD.dist:	NetBSD.dist.base ${NETBSD_DIST_X11_FILE}
     16  1.8  stacktic 	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${NETBSD_DIST_X11_FILE} > \
     17  1.9  stacktic 	    ${.TARGET}
     18  1.1       mrg 
     19  1.5     lukem CONFIGFILES=	NetBSD.dist special
     20  1.1       mrg FILESDIR=	/etc/mtree
     21  1.1       mrg 
     22  1.6       mrg # distrib-dirs --
     23  1.6       mrg #	Populate $DESTDIR with directories needed by NetBSD
     24  1.6       mrg #
     25  1.6       mrg .if ${MKUNPRIVED} == "no"
     26  1.6       mrg TOOL_MTREE.unpriv=
     27  1.6       mrg .else
     28  1.6       mrg TOOL_MTREE.unpriv=	-W
     29  1.6       mrg .endif
     30  1.6       mrg 
     31  1.9  stacktic distrib-dirs: .PHONY check_DESTDIR ${.OBJDIR}/NetBSD.dist
     32  1.6       mrg .if !defined(DISTRIBUTION_DONE)						# {
     33  1.6       mrg # Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
     34  1.6       mrg # INSTALL_DIR would want to write to the metalog, and it can't do that
     35  1.6       mrg # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
     36  1.6       mrg 	${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
     37  1.6       mrg # Inkoke mtree to create the directories listed in NetBSD.dist;
     38  1.6       mrg # then invoke mtree again to register those directories in the metalog.
     39  1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     40  1.6       mrg 	    -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
     41  1.6       mrg .if ${MKUNPRIVED} != "no"						# {
     42  1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     43  1.6       mrg 	    -p ${DESTDIR}/ -C -k all | \
     44  1.6       mrg 	    ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
     45  1.6       mrg .endif	# MKUNPRIVED							# }
     46  1.6       mrg .endif	# DISTRIBUTION_DONE						# }
     47  1.6       mrg 
     48  1.1       mrg .include <bsd.prog.mk>
     49