Home | History | Annotate | Line # | Download | only in mtree
Makefile revision 1.17
      1  1.17    dyoung #	$NetBSD: Makefile,v 1.17 2010/04/27 03:01:25 dyoung 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.13       mrg .if exists(NetBSD.dist.${MACHINE_ARCH})
     14  1.13       mrg EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.${MACHINE_ARCH}
     15  1.13       mrg .endif
     16  1.13       mrg 
     17  1.11  uebayasi .if ${MKEXTSRC} != "no"
     18  1.12       mrg EXTRA_DIST_FILES+=	${.CURDIR}/NetBSD.dist.extsrc
     19  1.11  uebayasi .endif
     20  1.11  uebayasi 
     21  1.14  uebayasi NetBSD.dist:	NetBSD.dist.tmp
     22  1.14  uebayasi 	cmp -s NetBSD.dist.tmp NetBSD.dist || { \
     23  1.14  uebayasi 		echo "Updating NetBSD.dist"; \
     24  1.14  uebayasi 		mv NetBSD.dist.tmp NetBSD.dist; \
     25  1.14  uebayasi 	}
     26  1.14  uebayasi NetBSD.dist.tmp::
     27  1.12       mrg 	${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \
     28   1.9  stacktic 	    ${.TARGET}
     29   1.1       mrg 
     30   1.5     lukem CONFIGFILES=	NetBSD.dist special
     31   1.1       mrg FILESDIR=	/etc/mtree
     32   1.1       mrg 
     33   1.6       mrg # distrib-dirs --
     34   1.6       mrg #	Populate $DESTDIR with directories needed by NetBSD
     35   1.6       mrg #
     36   1.6       mrg .if ${MKUNPRIVED} == "no"
     37   1.6       mrg TOOL_MTREE.unpriv=
     38   1.6       mrg .else
     39   1.6       mrg TOOL_MTREE.unpriv=	-W
     40   1.6       mrg .endif
     41   1.6       mrg 
     42  1.17    dyoung # postinstall(8) invokes this target to produce the right
     43  1.17    dyoung # /etc/mtree/NetBSD.dist content without duplicating logic from
     44  1.17    dyoung # the Makefile.
     45  1.17    dyoung #
     46  1.16    dyoung emit_dist_file:
     47  1.17    dyoung 	cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES}
     48  1.16    dyoung 
     49  1.10  drochner distrib-dirs: .PHONY check_DESTDIR NetBSD.dist
     50   1.6       mrg .if !defined(DISTRIBUTION_DONE)						# {
     51   1.6       mrg # Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because
     52   1.6       mrg # INSTALL_DIR would want to write to the metalog, and it can't do that
     53   1.6       mrg # if the metalog is inside DESTDIR but DESTDIR doesn't yet exist.
     54   1.6       mrg 	${HOST_INSTALL_DIR} -m 755 ${DESTDIR}
     55   1.6       mrg # Inkoke mtree to create the directories listed in NetBSD.dist;
     56   1.6       mrg # then invoke mtree again to register those directories in the metalog.
     57   1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     58   1.6       mrg 	    -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv}
     59   1.6       mrg .if ${MKUNPRIVED} != "no"						# {
     60   1.6       mrg 	${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \
     61   1.6       mrg 	    -p ${DESTDIR}/ -C -k all | \
     62   1.6       mrg 	    ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add}
     63   1.6       mrg .endif	# MKUNPRIVED							# }
     64   1.6       mrg .endif	# DISTRIBUTION_DONE						# }
     65   1.6       mrg 
     66  1.15    plunky CLEANFILES+=	NetBSD.dist NetBSD.dist.tmp
     67  1.10  drochner 
     68   1.1       mrg .include <bsd.prog.mk>
     69