Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/Makefile,v rcsdiff: /ftp/cvs/cvsroot/src/Makefile,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.238.2.4 retrieving revision 1.247.4.3 diff -u -p -r1.238.2.4 -r1.247.4.3 --- src/Makefile 2005/09/02 20:40:23 1.238.2.4 +++ src/Makefile 2008/03/23 00:12:06 1.247.4.3 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.238.2.4 2005/09/02 20:40:23 tron Exp $ +# Makefile,v 1.247.4.2 2008/01/09 01:19:18 matt Exp # # This is the top-level makefile for building NetBSD. For an outline of @@ -51,14 +51,26 @@ # is the not root directory if cross compiling. # release: # Does a `make distribution', and then tars up the DESTDIR files -# into RELEASEDIR/${MACHINE}, in release(7) format. +# into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format. # (See etc/Makefile for more information on this.) # regression-tests: # Runs the regression tests in "regress" on this host. # sets: -# Populate ${RELEASEDIR}/${MACHINE}/binary/sets from ${DESTDIR} +# Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets +# from ${DESTDIR} # sourcesets: # Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} +# syspkgs: +# Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs +# from ${DESTDIR} +# iso-image: +# Create CD-ROM image in RELEASEDIR/iso. +# RELEASEDIR must already have been populated by `make release' +# or equivalent. +# iso-image-source: +# Create CD-ROM image with source in RELEASEDIR/iso. +# RELEASEDIR must already have been populated by +# `make release sourcesets' or equivalent. # # Targets invoked by `make build,' in order: # cleandir: cleans the tree. @@ -69,9 +81,9 @@ # do-tools-compat: builds the "libnbcompat" library; needed for some # random host tool programs in the source tree. # do-lib-csu: builds and installs prerequisites from lib/csu. -# do-gnu-lib-crtstuff3: builds and installs prerequisites from -# gnu/lib/crtstuff3 -# do-gnu-lib-libgcc3: builds and installs prerequisites from gnu/lib/libgcc3 +# do-libgcc: builds and installs prerequisites from +# gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and +# gnu/lib/libgcc${LIBGCC_EXT}. # do-lib-libc: builds and installs prerequisites from lib/libc. # do-lib: builds and installs prerequisites from lib. # do-gnu-lib: builds and installs prerequisites from gnu/lib. @@ -111,20 +123,20 @@ _SRC_TOP_OBJ_= .endif _SUBDIR= tools lib include gnu bin games libexec sbin usr.bin -_SUBDIR+= usr.sbin share rescue sys etc .WAIT distrib regress +_SUBDIR+= usr.sbin share rescue sys etc tests .WAIT distrib regress # # Weed out directories that don't exist. # .for dir in ${_SUBDIR} -.if exists(${dir}/Makefile) && (${BUILD_${dir}:Uyes} != "no") +.if ("${dir}" == ".WAIT") || exists(${dir}/Makefile) && (${BUILD_${dir}:Uyes} != "no") SUBDIR+= ${dir} .endif .endfor .if exists(regress) -regression-tests: .PHONY +regression-tests: .PHONY .MAKE @echo Running regression tests... ${MAKEDIRTARGET} regress regress .endif @@ -133,7 +145,7 @@ regression-tests: .PHONY NOPOSTINSTALL= # defined .endif -afterinstall: .PHONY +afterinstall: .PHONY .MAKE .if ${MKMAN} != "no" ${MAKEDIRTARGET} share/man makedb .endif @@ -148,7 +160,7 @@ _POSTINSTALL= ${.CURDIR}/usr.sbin/postin postinstall-check: .PHONY @echo " === Post installation checks ===" - ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check + ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi @echo " ================================" postinstall-fix: .NOTMAIN .PHONY @@ -165,10 +177,10 @@ postinstall-fix-obsolete: .NOTMAIN .PHON # # Targets (in order!) called by "make build". # -.if ${USE_TOOLS_TOOLCHAIN} == "no" +.if ${HAVE_GCC} == "3" LIBGCC_EXT=3 .else -LIBGCC_EXT= +LIBGCC_EXT=4 .endif BUILDTARGETS+= check-tools @@ -190,10 +202,7 @@ BUILDTARGETS+= includes BUILDTARGETS+= do-tools-compat BUILDTARGETS+= do-lib-csu .if ${MKGCC} != "no" -.if ${HAVE_GCC3} != "no" -BUILDTARGETS+= do-gnu-lib-crtstuff${LIBGCC_EXT} -.endif -BUILDTARGETS+= do-gnu-lib-libgcc${LIBGCC_EXT} +BUILDTARGETS+= do-libgcc .endif BUILDTARGETS+= do-lib-libc BUILDTARGETS+= do-lib do-gnu-lib @@ -218,7 +227,7 @@ includes-gnu: .PHONY includes-lib START_TIME!= date -build: .PHONY +build: .PHONY .MAKE .if defined(BUILD_DONE) @echo "Build already installed into ${DESTDIR}" .else @@ -236,7 +245,7 @@ build: .PHONY # ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != / # -distribution buildworld: .PHONY +distribution buildworld: .PHONY .MAKE .if make(buildworld) && \ (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") @echo "Won't make ${.TARGET} with DESTDIR=/" @@ -260,7 +269,7 @@ distribution buildworld: .PHONY HOST_UNAME_S!= uname -s HOST_UNAME_M!= uname -m -installworld: .PHONY +installworld: .PHONY .MAKE .if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") @echo "Can't make ${.TARGET} to DESTDIR=/" @false @@ -286,8 +295,8 @@ installworld: .PHONY # Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR # -.for tgt in sets sourcesets -${tgt}: .PHONY +.for tgt in sets sourcesets syspkgs +${tgt}: .PHONY .MAKE ${MAKEDIRTARGET} distrib/sets ${tgt} .endfor @@ -297,13 +306,29 @@ ${tgt}: .PHONY # are made. # -release snapshot: .PHONY +release snapshot: .PHONY .MAKE ${MAKEDIRTARGET} . distribution ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1 @echo "make ${.TARGET} started at: ${START_TIME}" @printf "make ${.TARGET} finished at: " && date # +# Create a CD-ROM image. +# + +iso-image: .PHONY + ${MAKEDIRTARGET} distrib iso_image + ${MAKEDIRTARGET} etc iso-image + @echo "make ${.TARGET} started at: ${START_TIME}" + @printf "make ${.TARGET} finished at: " && date + +iso-image-source: .PHONY + ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true + ${MAKEDIRTARGET} etc iso-image + @echo "make ${.TARGET} started at: ${START_TIME}" + @printf "make ${.TARGET} finished at: " && date + +# # Special components of the "make build" process. # @@ -318,7 +343,7 @@ check-tools: .PHONY @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!' .endif -do-distrib-dirs: .PHONY +do-distrib-dirs: .PHONY .MAKE .if !defined(DESTDIR) || ${DESTDIR} == "" ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/ .else @@ -331,13 +356,21 @@ do-${targ}: .PHONY ${targ} .endfor .for dir in tools tools/compat lib/csu gnu/lib/crtstuff${LIBGCC_EXT} gnu/lib/libgcc${LIBGCC_EXT} lib/libc lib/libdes lib gnu/lib -do-${dir:S/\//-/g}: .PHONY +do-${dir:S/\//-/g}: .PHONY .MAKE .for targ in dependall install ${MAKEDIRTARGET} ${dir} ${targ} .endfor .endfor -do-ld.so: .PHONY +do-libgcc: .PHONY .MAKE +.if ${MKGCC} != "no" +.if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4") + ${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT} +.endif + ${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT} +.endif + +do-ld.so: .PHONY .MAKE .for targ in dependall install .if (${OBJECT_FMT} == "a.out") ${MAKEDIRTARGET} libexec/ld.aout_so ${targ} @@ -347,15 +380,15 @@ do-ld.so: .PHONY .endif .endfor -do-build: .PHONY +do-build: .PHONY .MAKE .for targ in dependall install ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no .endfor -do-x11: .PHONY +do-x11: .PHONY .MAKE ${MAKEDIRTARGET} x11 build -do-obsolete: .PHONY +do-obsolete: .PHONY .MAKE ${MAKEDIRTARGET} etc install-obsolete-lists # @@ -393,5 +426,5 @@ ${.CURDIR}/BUILDING: doc/BUILDING.mdoc # # Display current make(1) parameters # -params: .PHONY +params: .PHONY .MAKE ${MAKEDIRTARGET} etc params