[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/Makefile between version 1.124 and 1.145

version 1.124, 2001/06/10 13:12:32 version 1.145, 2001/10/30 17:59:10
Line 24 
Line 24 
 #   MKSHARE, if set to `no', will prevent building and installing  #   MKSHARE, if set to `no', will prevent building and installing
 #       anything in /usr/share.  #       anything in /usr/share.
 #   NBUILDJOBS is the number of jobs to start in parallel during a  #   NBUILDJOBS is the number of jobs to start in parallel during a
 #       'make build'. It defaults to 1.  #       `make build'. It defaults to 1.
 #   UPDATE will avoid a `make cleandir' at the start of `make build',  #   UPDATE, if defined, will avoid a `make cleandir' at the start of
 #       as well as having the effects listed in /usr/share/mk/bsd.README.  #     `make build', as well as having the effects listed in
 #   NOCLEANDIR will avoid a `make cleandir' at the start of `make build',  #     /usr/share/mk/bsd.README.
 #       but without having the effects listed in /usr/share/mk/bsd.README.  #   NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
   #     of the `make build'.
 #   NOINCLUDES will avoid the `make includes' usually done by `make build'.  #   NOINCLUDES will avoid the `make includes' usually done by `make build'.
 #  #
 # Targets:  # Targets:
 #   build: builds a full release of netbsd in DESTDIR. If BUILD_DONE is  #   build:
   #       Builds a full release of NetBSD in DESTDIR.  If BUILD_DONE is
 #       set, this is an empty target.  #       set, this is an empty target.
 #   release: does a `make build,' and then tars up the DESTDIR files  #   release:
   #       Does a `make build,' and then tars up the DESTDIR files
 #       into RELEASEDIR, in release(7) format. (See etc/Makefile for  #       into RELEASEDIR, in release(7) format. (See etc/Makefile for
 #       more information on this.)  #       more information on this.)
 #   snapshot: a synonym for release.  #   regression-tests:
   #       Runs the regression tests in "regress" on this host.
 #  #
 # Sub targets of `make build,' in order:  # Targets invoked by `make build,' in order:
 #   buildstartmsg: displays the start time of the build.  #   obj:             creates object directories.
 #   beforeinstall: creates the distribution directories.  #   cleandir:        cleans the tree.
 #   do-force-domestic: check's that FORCE_DOMESTIC isn't set (deprecated.)  #   do-make-tools:   builds host toolchain.
 #   do-share-mk: installs /usr/share/mk files.  #   do-distrib-dirs: creates the distribution directories.
 #   do-cleandir: clean's the tree.  #   includes:        installs include files.
 #   do-make-obj: create's object directories if required.  #   do-lib-csu:      builds and installs prerequisites from lib/csu.
 #   do-check-egcs: check's that we have a modern enough compiler (deprecated.)  #   do-lib:          builds and installs prerequisites from lib.
 #   do-make-includes: install include files.  #   do-gnu-lib:      builds and installs prerequisites from gnu/lib.
 #   do-lib-csu: build & install startup object files.  #   do-build:        builds and installs the entire system.
 #   do-lib: build & install system libraries.  
 #   do-gnu-lib: build & install gnu system libraries.  .include "${.CURDIR}/share/mk/bsd.own.mk"
 #   do-dependall: builds & install the entire system.  
 #   do-domestic: build & install the domestic tree (deprecated.)  # Sanity check: make sure that "make build" is not invoked simultaneously
 #   do-whatisdb: build & install the `whatis.db' man database.  # with a standard recursive target.
 #   buildendmsg: displays the end time of the build.  
   .if make(build) || make(release) || make(snapshot)
 .include <bsd.own.mk>  .for targ in ${TARGETS:Nobj:Ncleandir}
   .if make(${targ}) && !target(.BEGIN)
 MKOBJDIRS ?= no  .BEGIN:
 HAVE_EGCS!=     ${CXX} --version | egrep "^(2\.[89]|egcs)" ; echo          @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.'
           @false
   .endif
   .endfor
   .endif
   
 .if defined(NBUILDJOBS)  .if defined(NBUILDJOBS)
 _J= -j${NBUILDJOBS}  _J=             -j${NBUILDJOBS}
 .endif  .endif
   
 .if defined(DESTDIR)  .if ${USETOOLS} == "yes"
 _M=-m ${DESTDIR}/usr/share/mk  _SUBDIR+=       tools
 .endif  .endif
   _SUBDIR+=       lib include gnu bin games libexec sbin usr.bin \
                   usr.sbin share sys etc distrib regress
   
 # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW  # Weed out directories that don't exist.
   
 SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys  .for dir in ${_SUBDIR}
 .if make(cleandir) || make(obj)  .if exists(${dir}/Makefile)
 SUBDIR+= distrib  SUBDIR+=        ${dir}
 .ifdef MAKEOBJDIRPREFIX  
 SUBDIR+= etc  
 .endif  
 .endif  .endif
   .endfor
   
 includes-lib: includes-include includes-sys  .if exists(regress)
   regression-tests:
           @echo Running regression tests...
           @cd ${.CURDIR}/regress && ${MAKE} ${_M} regress
   .endif
   
 .if exists(games)  .if ${MKMAN} != "no"
 SUBDIR+= games  afterinstall: whatis.db
   whatis.db:
           cd ${.CURDIR}/share/man && ${MAKE} ${_M} makedb
 .endif  .endif
   
 SUBDIR+= gnu  # Targets (in order!) called by "make build".
 # This is needed for libstdc++ and gen-params.  
 includes-gnu: includes-include includes-sys  
   
 .if exists(regress)  .if ${MKOBJDIRS:Uno} != "no"
 .ifmake !(install)  BUILDTARGETS+=  obj
 SUBDIR+= regress  
 .endif  .endif
   .if !defined(UPDATE) && !defined(NOCLEANDIR)
 regression-tests:  BUILDTARGETS+=  cleandir
         @echo Running regression tests...  
         @(cd ${.CURDIR}/regress && ${MAKE} ${_M} regress)  
 .endif  .endif
   .if ${USETOOLS} == "yes"
 buildstartmsg:  BUILDTARGETS+=  do-make-tools
         @echo -n "Build started at: "  
         @date  
   
 buildendmsg:  
         @echo -n "Build finished at: "  
         @date  
   
 # If sharesrc is around, use its share/mk files to bootstrap until the  
 # mk files are installed (first step of make build).  If installing to  
 # DESTDIR, don't bother, since the build will fail later on anyway.  
   
 beforeinstall:  
 .ifndef NODISTRIBDIRS  
 .ifndef DESTDIR  
 .if exists(share/mk)  
         (cd ${.CURDIR}/etc && ${MAKE} -m ${.CURDIR}/share/mk DESTDIR=/ distrib-dirs)  
 .else  
         (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)  
 .endif  .endif
 .else  .if !defined(NODISTRIBDIRS)
         (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)  BUILDTARGETS+=  do-distrib-dirs
 .endif  .endif
   .if !defined(NOINCLUDES)
   BUILDTARGETS+=  includes
 .endif  .endif
   BUILDTARGETS+=  do-lib-csu do-lib do-gnu-lib do-build
   
 afterinstall:  # Enforce proper ordering of some rules.
 .if ${MKMAN} != "no" && !defined(_BUILD)  
         ${MAKE} ${_M} whatis.db  
 .endif  
   
 whatis.db:  .ORDER:         ${BUILDTARGETS}
         (cd ${.CURDIR}/share/man && ${MAKE} ${_M} makedb)  includes-lib:   includes-include includes-sys
   includes-gnu:   includes-lib
   
 # wrt info/dir below:  It's safe to move this over top of /usr/share/info/dir,  # Build the system and install into DESTDIR.
 # as the build will automatically remove/replace the non-pkg entries there.  
   
 .if defined(BUILD_DONE)  
 build:  build:
         @echo "Build installed into ${DESTDIR}"  .if defined(BUILD_DONE)
           @echo "Build already installed into ${DESTDIR}"
 .else  .else
 build:          @echo -n "Build started at: " && date
         @${MAKE} ${_M} buildstartmsg  .for tgt in ${BUILDTARGETS}
         @${MAKE} ${_M} beforeinstall          ${MAKE} ${_J} ${_M} ${tgt}
         @${MAKE} ${_M} do-force-domestic  .endfor
         @${MAKE} ${_M} do-share-mk          @echo -n "Build finished at: " && date
         @${MAKE} ${_M} do-cleandir  
         @${MAKE} ${_M} do-make-obj  
         @${MAKE} ${_M} do-check-egcs  
         @${MAKE} ${_M} do-make-includes  
         @${MAKE} ${_M} do-lib-csu  
         @${MAKE} ${_M} do-lib  
         @${MAKE} ${_M} do-gnu-lib  
         @${MAKE} ${_M} do-dependall  
         @${MAKE} ${_M} do-domestic  
         @${MAKE} ${_M} do-whatisdb  
         @${MAKE} ${_M} buildendmsg  
 .endif  
   
 do-force-domestic:  
 .if defined(FORCE_DOMESTIC)  
         @echo '*** CAPUTE!'  
         @echo '    The FORCE_DOMESTIC flag is not compatible with "make build".'  
         @echo '    Please correct the problem and try again.'  
         @false  
 .endif  .endif
   
 do-share-mk:  # Build a release or snapshot (implies "make build").
 .if ${MKSHARE} != "no"  
         (cd ${.CURDIR}/share/mk && ${MAKE} install)  
 .endif  
   
 do-cleandir:  release snapshot: build
 .if !defined(UPDATE) && !defined(NOCLEANDIR)          cd ${.CURDIR}/etc && ${MAKE} ${_M} INSTALL_DONE=1 release
         ${MAKE} ${_J} ${_M} cleandir  
 .endif  
   
 do-make-obj:  # Special components of the "make build" process.
 .if ${MKOBJDIRS} != "no"  
         ${MAKE} ${_J} ${_M} obj  
 .endif  
   
 do-check-egcs:  do-make-tools:
 .if empty(HAVE_EGCS)          cd ${.CURDIR}/tools && ${MAKE} ${_M} build
 .if defined(DESTDIR)  
         @echo "*** CAPUTE!"  
         @echo "    You attempted to compile the world without egcs.  You must"  
         @echo "    first install a native egcs compiler."  
         @false  
 .else  
         (cd ${.CURDIR}/gnu/usr.bin/egcs && \  
             ${MAKE} ${_M} ${_J} dependall MKMAN=no && \  
             ${MAKE} ${_M} MKMAN=no install && ${MAKE} ${_M} cleandir)  
 .endif  
 .endif  
   
 do-make-includes:  do-distrib-dirs:
 .if !defined(NOINCLUDES)          cd ${.CURDIR}/etc && ${MAKE} ${_M} DESTDIR=${DESTDIR} distrib-dirs
         ${MAKE} ${_M} includes  
 .endif  
   
 do-lib-csu:  .for dir in lib/csu lib gnu/lib
         (cd ${.CURDIR}/lib/csu && \  do-${dir:S/\//-/}:
             ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \  .for targ in dependall install
             ${MAKE} ${_M} MKSHARE=no install)          cd ${.CURDIR}/${dir} && \
                   ${MAKE} ${_M} ${_J} MKSHARE=no MKLINT=no ${targ}
   .endfor
   .endfor
   
 do-lib:  do-build:
         (cd ${.CURDIR}/lib && \          ${MAKE} ${_M} ${_J} dependall
             ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \          ${MAKE} ${_M} ${_J} install
             ${MAKE} ${_M} MKSHARE=no install)  
   
 do-gnu-lib:  # Speedup stubs for some subtrees that don't need to run these rules.
         (cd ${.CURDIR}/gnu/lib && \  # (Tells <bsd.subdir.mk> not to recurse for them.)
             ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \  
             ${MAKE} ${_M} MKSHARE=no install)  
   
 do-dependall:  includes-bin includes-games includes-libexec includes-regress \
         ${MAKE} ${_M} ${_J} dependall && ${MAKE} ${_M} _BUILD= install  includes-sbin includes-usr.sbin includes-tools \
   dependall-tools depend-tools all-tools install-tools install-regress \
   dependall-distrib depend-distrib all-distrib install-distrib includes-distrib:
           @true
   
 do-domestic:  .include "${.CURDIR}/share/mk/bsd.subdir.mk"
 .if defined(DOMESTIC) && !defined(EXPORTABLE_SYSTEM)  
         (cd ${.CURDIR}/${DOMESTIC} && ${MAKE} ${_M} ${_J} _SLAVE_BUILD= build)  
 .endif  
   
 do-whatisdb:  _M:=    -m ${.CURDIR}/share/mk
         ${MAKE} ${_M} whatis.db  
   
 release snapshot: build  # Rules for building the BUILDING.* documentation files.
         (cd ${.CURDIR}/etc && ${MAKE} ${_M} INSTALL_DONE=1 release)  
   build-docs: ${.CURDIR}/BUILDING.txt ${.CURDIR}/BUILDING.html
   
   .SUFFIXES: .mdoc .html .txt
   
   .mdoc.html: ${.CURDIR}/Makefile
           groff -mdoc2html -Tlatin1 -P-b -P-u -P-o -ww -mtty-char $< >$@
   
 .include <bsd.subdir.mk>  # The awk expression changes line endings from LF to CR-LF to make
   # this readable on many more platforms than just Un*x.
   .mdoc.txt: ${.CURDIR}/Makefile
           groff -mdoc -Tascii -P-b -P-u -P-o $< | \
                   awk 'BEGIN{ORS="\r\n"}{print}' >$@

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.145

CVSweb <webmaster@jp.NetBSD.org>