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

Annotation of src/Makefile, Revision 1.119

1.119   ! toddpw      1: #      $NetBSD: Makefile,v 1.118 2000/06/20 06:00:24 thorpej Exp $
1.95      cjs         2:
                      3: # This is the top-level makefile for building NetBSD. For an outline of
                      4: # how to build a snapshot or release, as well as other release engineering
                      5: # information, see http://www.netbsd.org/developers/releng/index.html
                      6: #
                      7: # Not everything you can set or do is documented in this makefile. In
                      8: # particular, you should review the files in /usr/share/mk (especially
                      9: # bsd.README) for general information on building programs and writing
                     10: # Makefiles within this structure, and see the comments in src/etc/Makefile
                     11: # for further information on installation and release set options.
                     12: #
                     13: # Variables listed below can be set on the make command line (highest
                     14: # priority), in /etc/mk.conf (middle priority), or in the environment
                     15: # (lowest priority).
                     16: #
                     17: # Variables:
1.101     sommerfe   18: #   DESTDIR is the target directory for installation of the compiled
                     19: #      software. It defaults to /. Note that programs are built against
                     20: #      libraries installed in DESTDIR.
1.95      cjs        21: #   MKMAN, if set to `no', will prevent building of manual pages.
1.101     sommerfe   22: #   MKOBJDIRS, if not set to `no', will build object directories at
                     23: #      an appropriate point in a build.
1.95      cjs        24: #   MKSHARE, if set to `no', will prevent building and installing
                     25: #      anything in /usr/share.
1.101     sommerfe   26: #   NBUILDJOBS is the number of jobs to start in parallel during a
                     27: #      'make build'. It defaults to 1.
1.95      cjs        28: #   UPDATE will avoid a `make cleandir' at the start of `make build',
                     29: #      as well as having the effects listed in /usr/share/mk/bsd.README.
1.119   ! toddpw     30: #   NOCLEANDIR will avoid a `make cleandir' at the start of `make build',
        !            31: #      but without having the effects listed in /usr/share/mk/bsd.README.
        !            32: #   NOINCLUDES will avoid the `make includes' usually done by `make build'.
1.95      cjs        33: #
                     34: # Targets:
1.110     jlam       35: #   build: builds a full release of netbsd in DESTDIR. If BUILD_DONE is
                     36: #      set, this is an empty target.
1.95      cjs        37: #   release: does a `make build,' and then tars up the DESTDIR files
                     38: #      into RELEASEDIR, in release(7) format. (See etc/Makefile for
                     39: #      more information on this.)
                     40: #   snapshot: a synonym for release.
1.32      cgd        41:
1.118     thorpej    42: .include <bsd.own.mk>
1.4       cgd        43:
1.100     sommerfe   44: MKOBJDIRS ?= no
1.115     thorpej    45: HAVE_EGCS!=    ${CXX} --version | egrep "^(2\.[89]|egcs)" ; echo
1.58      tv         46:
1.76      bouyer     47: .if defined(NBUILDJOBS)
                     48: _J= -j${NBUILDJOBS}
                     49: .endif
                     50:
1.112     mrg        51: .if defined(DESTDIR)
                     52: _M=-m ${DESTDIR}/usr/share/mk
                     53: .endif
                     54:
1.4       cgd        55: # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
1.2       cgd        56:
1.52      mycroft    57: SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
1.109     cjs        58: .if make(obj)
                     59: SUBDIR+= distrib
1.114     sjg        60: .ifdef MAKEOBJDIRPREFIX
                     61: SUBDIR+= etc
                     62: .endif
1.109     cjs        63: .endif
1.105     assar      64:
                     65: includes-lib: includes-include includes-sys
1.36      explorer   66:
                     67: .if exists(games)
                     68: SUBDIR+= games
                     69: .endif
                     70:
1.8       cgd        71: SUBDIR+= gnu
1.52      mycroft    72: # This is needed for libstdc++ and gen-params.
                     73: includes-gnu: includes-include includes-sys
1.21      cgd        74:
1.13      brezak     75: .if exists(regress)
1.9       cgd        76: .ifmake !(install)
                     77: SUBDIR+= regress
                     78: .endif
                     79:
1.10      cgd        80: regression-tests:
                     81:        @echo Running regression tests...
1.112     mrg        82:        @(cd ${.CURDIR}/regress && ${MAKE} ${_M} regress)
1.13      brezak     83: .endif
1.20      cgd        84:
1.108     erh        85: buildmsg:
1.45      perry      86:        @echo -n "Build started at: "
                     87:        @date
1.108     erh        88:
                     89: beforeinstall:
1.112     mrg        90: .ifndef NODISTRIBDIRS
1.26      tls        91: .ifndef DESTDIR
                     92:        (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
1.31      tls        93: .else
1.117     mrg        94:        (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
1.26      tls        95: .endif
1.112     mrg        96: .endif
1.15      cgd        97:
                     98: afterinstall:
1.86      lukem      99: .if ${MKMAN} != "no" && !defined(_BUILD)
1.112     mrg       100:        ${MAKE} ${_M} whatis.db
1.81      scottr    101: .endif
                    102:
                    103: whatis.db:
1.112     mrg       104:        (cd ${.CURDIR}/share/man && ${MAKE} ${_M} makedb)
1.15      cgd       105:
1.84      tv        106: # wrt info/dir below:  It's safe to move this over top of /usr/share/info/dir,
                    107: # as the build will automatically remove/replace the non-pkg entries there.
                    108:
1.110     jlam      109: .if defined(BUILD_DONE)
                    110: build:
                    111:        @echo "Build installed into ${DESTDIR}"
                    112: .else
1.108     erh       113: build: buildmsg beforeinstall
1.96      scottr    114: .if defined(FORCE_DOMESTIC)
                    115:        @echo '*** CAPUTE!'
                    116:        @echo '    The FORCE_DOMESTIC flag is not compatible with "make build".'
                    117:        @echo '    Please correct the problem and try again.'
                    118:        @false
                    119: .endif
1.86      lukem     120: .if ${MKSHARE} != "no"
1.117     mrg       121:        (cd ${.CURDIR}/share/mk && ${MAKE} install)
1.68      lukem     122: .endif
1.112     mrg       123: .if !defined(UPDATE) && !defined(NOCLEANDIR)
1.117     mrg       124:        ${MAKE} ${_J} ${_M} cleandir
1.39      christos  125: .endif
1.103     simonb    126: .if ${MKOBJDIRS} != "no"
1.116     thorpej   127:        ${MAKE} ${_M} obj
1.103     simonb    128: .endif
1.115     thorpej   129: .if empty(HAVE_EGCS)
1.71      mycroft   130: .if defined(DESTDIR)
                    131:        @echo "*** CAPUTE!"
1.84      tv        132:        @echo "    You attempted to compile the world without egcs.  You must"
1.71      mycroft   133:        @echo "    first install a native egcs compiler."
1.84      tv        134:        @false
1.71      mycroft   135: .else
                    136:        (cd ${.CURDIR}/gnu/usr.bin/egcs && \
1.112     mrg       137:            ${MAKE} ${_M} ${_J} dependall MKMAN=no && \
                    138:            ${MAKE} ${_M} MKMAN=no install && ${MAKE} ${_M} cleandir)
                    139: .endif
1.71      mycroft   140: .endif
1.112     mrg       141: .if !defined(NOINCLUDES)
                    142:        ${MAKE} ${_M} includes
1.71      mycroft   143: .endif
1.61      mycroft   144:        (cd ${.CURDIR}/lib/csu && \
1.113     mrg       145:            ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \
                    146:            ${MAKE} ${_M} MKSHARE=no install)
1.61      mycroft   147:        (cd ${.CURDIR}/lib && \
1.113     mrg       148:            ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \
                    149:            ${MAKE} ${_M} MKSHARE=no install)
1.61      mycroft   150:        (cd ${.CURDIR}/gnu/lib && \
1.113     mrg       151:            ${MAKE} ${_M} ${_J} MKSHARE=no dependall && \
                    152:            ${MAKE} ${_M} MKSHARE=no install)
1.112     mrg       153:        ${MAKE} ${_M} ${_J} dependall && ${MAKE} ${_M} _BUILD= install
1.97      christos  154: .if defined(DOMESTIC) && !defined(EXPORTABLE_SYSTEM)
1.112     mrg       155:        (cd ${.CURDIR}/${DOMESTIC} && ${MAKE} ${_M} ${_J} _SLAVE_BUILD= build)
1.49      lukem     156: .endif
1.112     mrg       157:        ${MAKE} ${_M} whatis.db
1.50      mellon    158:        @echo -n "Build finished at: "
                    159:        @date
1.110     jlam      160: .endif
1.87      cjs       161:
                    162: release snapshot: build
1.112     mrg       163:        (cd ${.CURDIR}/etc && ${MAKE} ${_M} INSTALL_DONE=1 release)
1.1       cgd       164:
                    165: .include <bsd.subdir.mk>

CVSweb <webmaster@jp.NetBSD.org>