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.193 retrieving revision 1.208 diff -u -p -r1.193 -r1.208 --- src/Makefile 2002/12/21 16:43:33 1.193 +++ src/Makefile 2003/07/05 04:32:58 1.208 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.193 2002/12/21 16:43:33 lukem Exp $ +# $NetBSD: Makefile,v 1.208 2003/07/05 04:32:58 lukem Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -33,14 +33,29 @@ # # Targets: # build: -# Builds a full release of NetBSD in DESTDIR. If BUILD_DONE is -# set, this is an empty target. +# Builds a full release of NetBSD in DESTDIR, except for the +# /etc configuration files. +# If BUILD_DONE is set, this is an empty target. +# distribution: +# Builds a full release of NetBSD in DESTDIR, including the /etc +# configuration files. +# buildworld: +# As per `make distribution', except that it ensures that DESTDIR +# is not the root directory. +# installworld: +# Install the distribution from DESTDIR to INSTALLWORLDDIR (which +# defaults to the root directory). Ensures that INSTALLWORLDDIR +# is the not root directory if cross compiling. # release: -# Does a `make build,' and then tars up the DESTDIR files -# into RELEASEDIR, in release(7) format. (See etc/Makefile for -# more information on this.) +# Does a `make build', and then tars up the DESTDIR files +# into RELEASEDIR/${MACHINE}, 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} +# sourcesets: +# Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} # # Targets invoked by `make build,' in order: # cleandir: cleans the tree. @@ -48,12 +63,16 @@ # do-tools: builds host toolchain. # do-distrib-dirs: creates the distribution directories. # includes: installs include files. +# do-tools-compat: builds the "libnbcompat" library; needed for some +# random host tool programs in the source tree. +# do-gnu-lib-libgcc: builds and installs prerequisites from gnu/lib/libgcc # do-lib-csu: builds and installs prerequisites from lib/csu. # 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. # do-ld.so: builds and installs prerequisites from libexec/ld.*_so. # do-build: builds and installs the entire system. +# do-obsolete: builds and installs the entire system. # .if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == "" @@ -86,7 +105,7 @@ _SRC_TOP_OBJ_= .endif _SUBDIR= tools lib include gnu bin games libexec sbin usr.bin -_SUBDIR+= usr.sbin share rescue sys etc distrib regress +_SUBDIR+= usr.sbin share rescue sys etc .WAIT distrib regress # # Weed out directories that don't exist. @@ -150,7 +169,12 @@ BUILDTARGETS+= do-distrib-dirs .if !defined(NOINCLUDES) BUILDTARGETS+= includes .endif +BUILDTARGETS+= do-tools-compat +.if ${MKGCC} != "no" +BUILDTARGETS+= do-gnu-lib-libgcc +.endif BUILDTARGETS+= do-lib-csu do-lib-libc do-lib do-gnu-lib do-ld.so do-build +BUILDTARGETS+= do-obsolete # # Enforce proper ordering of some rules. @@ -184,7 +208,8 @@ build: # distribution buildworld: -.if make(buildworld) && (${DESTDIR} == "" || ${DESTDIR} == "/") +.if make(buildworld) && \ + (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") @echo "Won't make ${.TARGET} with DESTDIR=/" @false .endif @@ -206,7 +231,7 @@ HOST_UNAME_S!= uname -s HOST_UNAME_M!= uname -m installworld: -.if (${DESTDIR} == "" || ${DESTDIR} == "/") +.if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") @echo "Can't make ${.TARGET} to DESTDIR=/" @false .endif @@ -229,6 +254,15 @@ installworld: @printf "make ${.TARGET} finished at: " && date # +# Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR +# + +.for tgt in sets sourcesets +${tgt}: + (cd ${.CURDIR}/distrib/sets && ${MAKE} $@) +.endfor + +# # Build a release or snapshot (implies "make build"). Note that # in this case, the set lists will be checked before the tar files # are made. @@ -267,8 +301,8 @@ do-${targ}: ${targ} @true .endfor -.for dir in tools lib/csu lib/libc lib gnu/lib -do-${dir:S/\//-/}: +.for dir in tools tools/compat lib/csu gnu/lib/libgcc lib/libc lib gnu/lib +do-${dir:S/\//-/g}: .for targ in dependall install (cd ${.CURDIR}/${dir} && ${MAKE} ${targ}) .endfor @@ -289,6 +323,9 @@ do-build: (cd ${.CURDIR} && ${MAKE} ${targ} BUILD_tools=no BUILD_lib=no) .endfor +do-obsolete: + (cd ${.CURDIR}/etc && ${MAKE} install-obsolete-lists) + # # Speedup stubs for some subtrees that don't need to run these rules. # (Tells not to recurse for them.)