Makefile revision 1.13
1# $NetBSD: Makefile,v 1.13 2009/12/13 01:02:25 mrg Exp $ 2 3.include <bsd.own.mk> 4 5.if ${MKX11} != "no" 6. if ${X11FLAVOUR} == "Xorg" 7EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg 8. else 9EXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86 10. endif 11.endif 12 13.if exists(NetBSD.dist.${MACHINE_ARCH}) 14EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH} 15.endif 16 17.if ${MKEXTSRC} != "no" 18EXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc 19.endif 20 21NetBSD.dist: NetBSD.dist.base ${EXTRA_DIST_FILES} 22 ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \ 23 ${.TARGET} 24 25CONFIGFILES= NetBSD.dist special 26FILESDIR= /etc/mtree 27 28# distrib-dirs -- 29# Populate $DESTDIR with directories needed by NetBSD 30# 31.if ${MKUNPRIVED} == "no" 32TOOL_MTREE.unpriv= 33.else 34TOOL_MTREE.unpriv= -W 35.endif 36 37distrib-dirs: .PHONY check_DESTDIR NetBSD.dist 38.if !defined(DISTRIBUTION_DONE) # { 39# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because 40# INSTALL_DIR would want to write to the metalog, and it can't do that 41# if the metalog is inside DESTDIR but DESTDIR doesn't yet exist. 42 ${HOST_INSTALL_DIR} -m 755 ${DESTDIR} 43# Inkoke mtree to create the directories listed in NetBSD.dist; 44# then invoke mtree again to register those directories in the metalog. 45 ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ 46 -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv} 47.if ${MKUNPRIVED} != "no" # { 48 ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ 49 -p ${DESTDIR}/ -C -k all | \ 50 ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add} 51.endif # MKUNPRIVED # } 52.endif # DISTRIBUTION_DONE # } 53 54CLEANFILES+= NetBSD.dist 55 56.include <bsd.prog.mk> 57