Makefile revision 1.22
11.22Sapb# $NetBSD: Makefile,v 1.22 2011/09/10 17:02:46 apb Exp $ 21.6Smrg 31.6Smrg.include <bsd.own.mk> 41.6Smrg 51.6Smrg.if ${MKX11} != "no" 61.6Smrg. if ${X11FLAVOUR} == "Xorg" 71.12SmrgEXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.Xorg 81.6Smrg. else 91.12SmrgEXTRA_DIST_FILES= ${.CURDIR}/NetBSD.dist.XFree86 101.6Smrg. endif 111.6Smrg.endif 121.6Smrg 131.19Smrg# XXX these are only used by compat currently, but they could be used 141.19Smrg# by something else; this may need to be fixed properly in the future. 151.19Smrg.if ${MKCOMPAT} != "no" 161.13Smrg.if exists(NetBSD.dist.${MACHINE_ARCH}) 171.13SmrgEXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.${MACHINE_ARCH} 181.13Smrg.endif 191.19Smrg.endif 201.13Smrg 211.18Snjoly.if ${MKATF} != "no" 221.18SnjolyEXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.tests 231.18Snjoly.endif 241.18Snjoly 251.11Suebayasi.if ${MKEXTSRC} != "no" 261.12SmrgEXTRA_DIST_FILES+= ${.CURDIR}/NetBSD.dist.extsrc 271.11Suebayasi.endif 281.11Suebayasi 291.22SapbNetBSD.dist: NetBSD.dist.tmp 301.22Sapb cmp -s NetBSD.dist.tmp NetBSD.dist || { \ 311.14Suebayasi echo "Updating NetBSD.dist"; \ 321.22Sapb mv NetBSD.dist.tmp NetBSD.dist; \ 331.14Suebayasi } 341.22SapbNetBSD.dist.tmp:: 351.12Smrg ${TOOL_CAT} ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} > \ 361.9Sstacktic ${.TARGET} 371.1Smrg 381.5SlukemCONFIGFILES= NetBSD.dist special 391.1SmrgFILESDIR= /etc/mtree 401.1Smrg 411.6Smrg# distrib-dirs -- 421.6Smrg# Populate $DESTDIR with directories needed by NetBSD 431.6Smrg# 441.6Smrg.if ${MKUNPRIVED} == "no" 451.6SmrgTOOL_MTREE.unpriv= 461.6Smrg.else 471.6SmrgTOOL_MTREE.unpriv= -W 481.6Smrg.endif 491.6Smrg 501.17Sdyoung# postinstall(8) invokes this target to produce the right 511.17Sdyoung# /etc/mtree/NetBSD.dist content without duplicating logic from 521.17Sdyoung# the Makefile. 531.17Sdyoung# 541.16Sdyoungemit_dist_file: 551.17Sdyoung cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} 561.16Sdyoung 571.10Sdrochnerdistrib-dirs: .PHONY check_DESTDIR NetBSD.dist 581.6Smrg.if !defined(DISTRIBUTION_DONE) # { 591.6Smrg# Create DESTDIR using HOST_INSTALL_DIR, not INSTALL_DIR, because 601.6Smrg# INSTALL_DIR would want to write to the metalog, and it can't do that 611.6Smrg# if the metalog is inside DESTDIR but DESTDIR doesn't yet exist. 621.6Smrg ${HOST_INSTALL_DIR} -m 755 ${DESTDIR} 631.20Sjym# Invoke mtree to create the directories listed in NetBSD.dist; 641.6Smrg# then invoke mtree again to register those directories in the metalog. 651.6Smrg ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ 661.6Smrg -p ${DESTDIR}/ -U ${TOOL_MTREE.unpriv} 671.6Smrg.if ${MKUNPRIVED} != "no" # { 681.6Smrg ${TOOL_MTREE} -def ${.OBJDIR}/NetBSD.dist -N ${.CURDIR}/.. \ 691.6Smrg -p ${DESTDIR}/ -C -k all | \ 701.6Smrg ${TOOL_AWK} '/ optional/ {next} // {print}' | ${METALOG.add} 711.6Smrg.endif # MKUNPRIVED # } 721.6Smrg.endif # DISTRIBUTION_DONE # } 731.6Smrg 741.22SapbCLEANFILES+= NetBSD.dist NetBSD.dist.tmp 751.10Sdrochner 761.1Smrg.include <bsd.prog.mk> 77