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

Annotation of src/Makefile, Revision 1.95.2.1

1.95.2.1! he          1: #      $NetBSD: Makefile,v 1.95 1999/04/01 02:49:12 cjs 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
1.95.2.1! he          5: .PHONY: release
        !             6:
        !             7: TARGETS+=      release
        !             8:
1.95      cjs         9: # information, see http://www.netbsd.org/developers/releng/index.html
                     10: #
                     11: # Not everything you can set or do is documented in this makefile. In
                     12: # particular, you should review the files in /usr/share/mk (especially
                     13: # bsd.README) for general information on building programs and writing
                     14: # Makefiles within this structure, and see the comments in src/etc/Makefile
                     15: # for further information on installation and release set options.
                     16: #
                     17: # Variables listed below can be set on the make command line (highest
                     18: # priority), in /etc/mk.conf (middle priority), or in the environment
                     19: # (lowest priority).
                     20: #
                     21: # Variables:
                     22: #   NBUILDJOBS is the number of jobs to start in parallel during a
                     23: #      'make build'. It defaults to 1.
                     24: #   MKMAN, if set to `no', will prevent building of manual pages.
                     25: #   MKSHARE, if set to `no', will prevent building and installing
                     26: #      anything in /usr/share.
                     27: #   UPDATE will avoid a `make cleandir' at the start of `make build',
                     28: #      as well as having the effects listed in /usr/share/mk/bsd.README.
                     29: #   DESTDIR is the target directory for installation of the compiled
                     30: #      software. It defaults to /. Note that programs are built against
                     31: #      libraries installed in DESTDIR.
                     32: #
                     33: # Targets:
                     34: #   build: builds a full release of netbsd in DESTDIR.
                     35: #   release: does a `make build,' and then tars up the DESTDIR files
                     36: #      into RELEASEDIR, in release(7) format. (See etc/Makefile for
                     37: #      more information on this.)
                     38: #   snapshot: a synonym for release.
1.32      cgd        39:
                     40: .include <bsd.own.mk>                  # for configuration variables.
1.4       cgd        41:
1.76      bouyer     42:
1.58      tv         43: HAVE_GCC28!=   ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
                     44:
1.76      bouyer     45: .if defined(NBUILDJOBS)
                     46: _J= -j${NBUILDJOBS}
                     47: .endif
                     48:
1.4       cgd        49: # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
1.2       cgd        50:
1.52      mycroft    51: SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
1.95.2.1! he         52:
        !            53: .if make(cleandir) || make(obj)
        !            54: SUBDIR+= distrib
        !            55: .endif
1.36      explorer   56:
                     57: .if exists(games)
                     58: SUBDIR+= games
                     59: .endif
                     60:
1.8       cgd        61: SUBDIR+= gnu
1.52      mycroft    62: # This is needed for libstdc++ and gen-params.
                     63: includes-gnu: includes-include includes-sys
1.9       cgd        64:
1.82      scottr     65: # Descend into the domestic tree if it exists AND
                     66: #  1) the target is clean, cleandir, or obj, OR
1.93      scottr     67: #  2) the the target is install or includes AND
                     68: #    NOT compiling only "exportable" code AND
                     69: #    doing it as part of installing a distribution.
1.94      scottr     70: #
                     71: # NOTE:  due to the use of the make(foo) construct here, using the
                     72: # clean, cleandir, and obj targets on the command line in conjunction
                     73: # with any other target may produce unexpected results.
1.82      scottr     74:
1.79      scottr     75: .if exists(domestic) && \
                     76:     (make(clean) || make(cleandir) || make(obj) || \
1.82      scottr     77:     ((make(includes) || make(install)) && \
1.93      scottr     78:     !defined(EXPORTABLE_SYSTEM) && defined(_DISTRIB)))
1.21      cgd        79: SUBDIR+= domestic
                     80: .endif
                     81:
1.13      brezak     82: .if exists(regress)
1.9       cgd        83: .ifmake !(install)
                     84: SUBDIR+= regress
                     85: .endif
                     86:
1.10      cgd        87: regression-tests:
                     88:        @echo Running regression tests...
1.22      cgd        89:        @(cd ${.CURDIR}/regress && ${MAKE} regress)
1.13      brezak     90: .endif
1.20      cgd        91:
1.26      tls        92: beforeinstall:
1.45      perry      93: .ifmake build
                     94:        @echo -n "Build started at: "
                     95:        @date
                     96: .endif
1.26      tls        97: .ifndef DESTDIR
                     98:        (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
1.31      tls        99: .else
                    100:        (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
1.26      tls       101: .endif
1.15      cgd       102:
                    103: afterinstall:
1.86      lukem     104: .if ${MKMAN} != "no" && !defined(_BUILD)
1.81      scottr    105:        ${MAKE} whatis.db
                    106: .endif
                    107:
                    108: whatis.db:
1.22      cgd       109:        (cd ${.CURDIR}/share/man && ${MAKE} makedb)
1.15      cgd       110:
1.84      tv        111: # wrt info/dir below:  It's safe to move this over top of /usr/share/info/dir,
                    112: # as the build will automatically remove/replace the non-pkg entries there.
                    113:
1.43      thorpej   114: build: beforeinstall
1.86      lukem     115: .if ${MKSHARE} != "no"
1.32      cgd       116:        (cd ${.CURDIR}/share/mk && ${MAKE} install)
1.47      thorpej   117:        (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
1.68      lukem     118: .endif
1.39      christos  119: .if !defined(UPDATE)
1.17      cgd       120:        ${MAKE} cleandir
1.39      christos  121: .endif
1.75      tv        122: .if empty(HAVE_GCC28)
1.71      mycroft   123: .if defined(DESTDIR)
                    124:        @echo "*** CAPUTE!"
1.84      tv        125:        @echo "    You attempted to compile the world without egcs.  You must"
1.71      mycroft   126:        @echo "    first install a native egcs compiler."
1.84      tv        127:        @false
1.71      mycroft   128: .else
                    129:        (cd ${.CURDIR}/gnu/usr.bin/egcs && \
1.86      lukem     130:            ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
                    131:            ${MAKE} MKMAN=no install && ${MAKE} cleandir)
1.71      mycroft   132: .endif
                    133: .endif
1.93      scottr    134:        ${MAKE} includes
1.61      mycroft   135:        (cd ${.CURDIR}/lib/csu && \
1.86      lukem     136:            ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
                    137:            ${MAKE} MKMAN=no install)
1.61      mycroft   138:        (cd ${.CURDIR}/lib && \
1.86      lukem     139:            ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
                    140:            ${MAKE} MKMAN=no install)
1.61      mycroft   141:        (cd ${.CURDIR}/gnu/lib && \
1.89      mellon    142:            ${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \
                    143:            ${MAKE} MKMAN=no MKINFO=no install)
1.80      scottr    144:        ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install
1.32      cgd       145: .if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
1.78      scottr    146:        (cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build)
1.49      lukem     147: .endif
1.81      scottr    148:        ${MAKE} whatis.db
1.50      mellon    149:        @echo -n "Build finished at: "
                    150:        @date
1.87      cjs       151:
                    152: release snapshot: build
1.91      scottr    153:        (cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release)
1.1       cgd       154:
                    155: .include <bsd.subdir.mk>

CVSweb <webmaster@jp.NetBSD.org>