Home | History | Annotate | Line # | Download | only in src
Makefile revision 1.87
      1  1.87       cjs #	$NetBSD: Makefile,v 1.87 1999/02/16 03:37:26 cjs Exp $
      2  1.32       cgd 
      3  1.32       cgd .include <bsd.own.mk>			# for configuration variables.
      4   1.4       cgd 
      5  1.76    bouyer # Configurations variables (can be set either in /etc/mk.conf or
      6  1.76    bouyer # as environement variable
      7  1.86     lukem # NBUILDJOBS:	the number of jobs to start in parallel in a 'make build'.
      8  1.86     lukem #		defaults to 1
      9  1.86     lukem # MKMAN:	if set to no, don't build and install man pages
     10  1.86     lukem # MKSHARE:	if set to no, don't build or install /usr/share stuffs
     11  1.86     lukem # UPDATE:	if set to 1, don't do a 'make cleandir' before compile
     12  1.86     lukem # DESTDIR:	The target directory for installation (default to '/',
     13  1.86     lukem #		which mean the current system is updated).
     14  1.76    bouyer 
     15  1.58        tv HAVE_GCC28!=	${CXX} --version | egrep "^(2\.8|egcs)" ; echo
     16  1.58        tv 
     17  1.76    bouyer .if defined(NBUILDJOBS)
     18  1.76    bouyer _J= -j${NBUILDJOBS}
     19  1.76    bouyer .endif
     20  1.76    bouyer 
     21   1.4       cgd # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
     22   1.2       cgd 
     23  1.52   mycroft SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
     24  1.36  explorer 
     25  1.36  explorer .if exists(games)
     26  1.36  explorer SUBDIR+= games
     27  1.36  explorer .endif
     28  1.36  explorer 
     29   1.8       cgd SUBDIR+= gnu
     30  1.52   mycroft # This is needed for libstdc++ and gen-params.
     31  1.52   mycroft includes-gnu: includes-include includes-sys
     32   1.9       cgd 
     33  1.82    scottr # Descend into the domestic tree if it exists AND
     34  1.82    scottr #  1) the target is clean, cleandir, or obj, OR
     35  1.82    scottr #  2) the the target is install or includes AND NOT
     36  1.82    scottr #    a) compiling only "exportable" code OR
     37  1.82    scottr #    b) doing it as part of build.
     38  1.82    scottr 
     39  1.79    scottr .if exists(domestic) && \
     40  1.79    scottr     (make(clean) || make(cleandir) || make(obj) || \
     41  1.82    scottr     ((make(includes) || make(install)) && \
     42  1.82    scottr     !(defined(EXPORTABLE_SYSTEM) || defined(_BUILD))))
     43  1.21       cgd SUBDIR+= domestic
     44  1.21       cgd .endif
     45  1.21       cgd 
     46  1.13    brezak .if exists(regress)
     47   1.9       cgd .ifmake !(install)
     48   1.9       cgd SUBDIR+= regress
     49   1.9       cgd .endif
     50   1.9       cgd 
     51  1.10       cgd regression-tests:
     52  1.10       cgd 	@echo Running regression tests...
     53  1.22       cgd 	@(cd ${.CURDIR}/regress && ${MAKE} regress)
     54  1.13    brezak .endif
     55  1.20       cgd 
     56  1.26       tls beforeinstall:
     57  1.45     perry .ifmake build
     58  1.45     perry 	@echo -n "Build started at: "
     59  1.45     perry 	@date
     60  1.45     perry .endif
     61  1.26       tls .ifndef DESTDIR
     62  1.26       tls 	(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
     63  1.31       tls .else
     64  1.31       tls 	(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
     65  1.26       tls .endif
     66  1.15       cgd 
     67  1.15       cgd afterinstall:
     68  1.86     lukem .if ${MKMAN} != "no" && !defined(_BUILD)
     69  1.81    scottr 	${MAKE} whatis.db
     70  1.81    scottr .endif
     71  1.81    scottr 
     72  1.81    scottr whatis.db:
     73  1.22       cgd 	(cd ${.CURDIR}/share/man && ${MAKE} makedb)
     74  1.15       cgd 
     75  1.84        tv # wrt info/dir below:  It's safe to move this over top of /usr/share/info/dir,
     76  1.84        tv # as the build will automatically remove/replace the non-pkg entries there.
     77  1.84        tv 
     78  1.43   thorpej build: beforeinstall
     79  1.86     lukem .if ${MKSHARE} != "no"
     80  1.32       cgd 	(cd ${.CURDIR}/share/mk && ${MAKE} install)
     81  1.47   thorpej 	(cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
     82  1.68     lukem .endif
     83  1.39  christos .if !defined(UPDATE)
     84  1.17       cgd 	${MAKE} cleandir
     85  1.39  christos .endif
     86  1.75        tv .if empty(HAVE_GCC28)
     87  1.71   mycroft .if defined(DESTDIR)
     88  1.71   mycroft 	@echo "*** CAPUTE!"
     89  1.84        tv 	@echo "    You attempted to compile the world without egcs.  You must"
     90  1.71   mycroft 	@echo "    first install a native egcs compiler."
     91  1.84        tv 	@false
     92  1.71   mycroft .else
     93  1.71   mycroft 	(cd ${.CURDIR}/gnu/usr.bin/egcs && \
     94  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
     95  1.86     lukem 	    ${MAKE} MKMAN=no install && ${MAKE} cleandir)
     96  1.71   mycroft .endif
     97  1.71   mycroft .endif
     98  1.80    scottr 	${MAKE} _BUILD= includes
     99  1.61   mycroft 	(cd ${.CURDIR}/lib/csu && \
    100  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    101  1.86     lukem 	    ${MAKE} MKMAN=no install)
    102  1.61   mycroft 	(cd ${.CURDIR}/lib && \
    103  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    104  1.86     lukem 	    ${MAKE} MKMAN=no install)
    105  1.61   mycroft 	(cd ${.CURDIR}/gnu/lib && \
    106  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    107  1.86     lukem 	    ${MAKE} MKMAN=no install)
    108  1.83  christos .if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
    109  1.83  christos 	(cd ${.CURDIR}/domestic/lib && \
    110  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    111  1.86     lukem 	    ${MAKE} MKMAN=no install)
    112  1.83  christos .endif
    113  1.80    scottr 	${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install
    114  1.32       cgd .if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
    115  1.78    scottr 	(cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build)
    116  1.49     lukem .endif
    117  1.81    scottr 	${MAKE} whatis.db
    118  1.50    mellon 	@echo -n "Build finished at: "
    119  1.50    mellon 	@date
    120  1.87       cjs 
    121  1.87       cjs release snapshot: build
    122  1.87       cjs 	(cd ${.CURDIR}/etc && make INSTALL_DONE=1 release)
    123   1.1       cgd 
    124   1.1       cgd .include <bsd.subdir.mk>
    125