Home | History | Annotate | Line # | Download | only in src
Makefile revision 1.94
      1  1.94    scottr #	$NetBSD: Makefile,v 1.94 1999/03/10 19:18:59 scottr 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.93    scottr #  2) the the target is install or includes AND
     36  1.93    scottr #    NOT compiling only "exportable" code AND
     37  1.93    scottr #    doing it as part of installing a distribution.
     38  1.94    scottr #
     39  1.94    scottr # NOTE:  due to the use of the make(foo) construct here, using the
     40  1.94    scottr # clean, cleandir, and obj targets on the command line in conjunction
     41  1.94    scottr # with any other target may produce unexpected results.
     42  1.82    scottr 
     43  1.79    scottr .if exists(domestic) && \
     44  1.79    scottr     (make(clean) || make(cleandir) || make(obj) || \
     45  1.82    scottr     ((make(includes) || make(install)) && \
     46  1.93    scottr     !defined(EXPORTABLE_SYSTEM) && defined(_DISTRIB)))
     47  1.21       cgd SUBDIR+= domestic
     48  1.21       cgd .endif
     49  1.21       cgd 
     50  1.13    brezak .if exists(regress)
     51   1.9       cgd .ifmake !(install)
     52   1.9       cgd SUBDIR+= regress
     53   1.9       cgd .endif
     54   1.9       cgd 
     55  1.10       cgd regression-tests:
     56  1.10       cgd 	@echo Running regression tests...
     57  1.22       cgd 	@(cd ${.CURDIR}/regress && ${MAKE} regress)
     58  1.13    brezak .endif
     59  1.20       cgd 
     60  1.26       tls beforeinstall:
     61  1.45     perry .ifmake build
     62  1.45     perry 	@echo -n "Build started at: "
     63  1.45     perry 	@date
     64  1.45     perry .endif
     65  1.26       tls .ifndef DESTDIR
     66  1.26       tls 	(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
     67  1.31       tls .else
     68  1.31       tls 	(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
     69  1.26       tls .endif
     70  1.15       cgd 
     71  1.15       cgd afterinstall:
     72  1.86     lukem .if ${MKMAN} != "no" && !defined(_BUILD)
     73  1.81    scottr 	${MAKE} whatis.db
     74  1.81    scottr .endif
     75  1.81    scottr 
     76  1.81    scottr whatis.db:
     77  1.22       cgd 	(cd ${.CURDIR}/share/man && ${MAKE} makedb)
     78  1.15       cgd 
     79  1.84        tv # wrt info/dir below:  It's safe to move this over top of /usr/share/info/dir,
     80  1.84        tv # as the build will automatically remove/replace the non-pkg entries there.
     81  1.84        tv 
     82  1.43   thorpej build: beforeinstall
     83  1.86     lukem .if ${MKSHARE} != "no"
     84  1.32       cgd 	(cd ${.CURDIR}/share/mk && ${MAKE} install)
     85  1.47   thorpej 	(cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
     86  1.68     lukem .endif
     87  1.39  christos .if !defined(UPDATE)
     88  1.17       cgd 	${MAKE} cleandir
     89  1.39  christos .endif
     90  1.75        tv .if empty(HAVE_GCC28)
     91  1.71   mycroft .if defined(DESTDIR)
     92  1.71   mycroft 	@echo "*** CAPUTE!"
     93  1.84        tv 	@echo "    You attempted to compile the world without egcs.  You must"
     94  1.71   mycroft 	@echo "    first install a native egcs compiler."
     95  1.84        tv 	@false
     96  1.71   mycroft .else
     97  1.71   mycroft 	(cd ${.CURDIR}/gnu/usr.bin/egcs && \
     98  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
     99  1.86     lukem 	    ${MAKE} MKMAN=no install && ${MAKE} cleandir)
    100  1.71   mycroft .endif
    101  1.71   mycroft .endif
    102  1.93    scottr 	${MAKE} includes
    103  1.61   mycroft 	(cd ${.CURDIR}/lib/csu && \
    104  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    105  1.86     lukem 	    ${MAKE} MKMAN=no install)
    106  1.61   mycroft 	(cd ${.CURDIR}/lib && \
    107  1.86     lukem 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
    108  1.86     lukem 	    ${MAKE} MKMAN=no install)
    109  1.61   mycroft 	(cd ${.CURDIR}/gnu/lib && \
    110  1.89    mellon 	    ${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \
    111  1.89    mellon 	    ${MAKE} MKMAN=no MKINFO=no install)
    112  1.80    scottr 	${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install
    113  1.32       cgd .if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
    114  1.78    scottr 	(cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build)
    115  1.49     lukem .endif
    116  1.81    scottr 	${MAKE} whatis.db
    117  1.50    mellon 	@echo -n "Build finished at: "
    118  1.50    mellon 	@date
    119  1.87       cjs 
    120  1.87       cjs release snapshot: build
    121  1.91    scottr 	(cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release)
    122   1.1       cgd 
    123   1.1       cgd .include <bsd.subdir.mk>
    124