Makefile revision 1.78
11.78Sscottr#	$NetBSD: Makefile,v 1.78 1999/01/05 07:09:58 scottr Exp $
21.32Scgd
31.32Scgd.include <bsd.own.mk>			# for configuration variables.
41.4Scgd
51.76Sbouyer# Configurations variables (can be set either in /etc/mk.conf or
61.76Sbouyer# as environement variable
71.76Sbouyer# NBUILDJOBS: the number of jobs to start in parallel in a 'make build'.
81.76Sbouyer#             defaults to 1
91.76Sbouyer# NOMAN: if set to 1, don't build and install man pages
101.76Sbouyer# NOSHARE: if set to 1, don't build or install /usr/share stuffs
111.76Sbouyer# UPDATE: if set to 1, don't do a 'make cleandir' before compile
121.76Sbouyer# DESTDIR: The target directory for installation (default to '/',
131.76Sbouyer#          which mean the current system is updated).
141.76Sbouyer
151.58StvHAVE_GCC28!=	${CXX} --version | egrep "^(2\.8|egcs)" ; echo
161.58Stv
171.76Sbouyer.if defined(NBUILDJOBS)
181.76Sbouyer_J= -j${NBUILDJOBS}
191.76Sbouyer.endif
201.76Sbouyer
211.4Scgd# NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
221.2Scgd
231.52SmycroftSUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
241.36Sexplorer
251.36Sexplorer.if exists(games)
261.36SexplorerSUBDIR+= games
271.36Sexplorer.endif
281.36Sexplorer
291.8ScgdSUBDIR+= gnu
301.52Smycroft# This is needed for libstdc++ and gen-params.
311.52Smycroftincludes-gnu: includes-include includes-sys
321.9Scgd
331.78Sscottr.if exists(domestic) && (make(clean) || make(cleandir) || make(obj))
341.21ScgdSUBDIR+= domestic
351.21Scgd.endif
361.21Scgd
371.13Sbrezak.if exists(regress)
381.9Scgd.ifmake !(install)
391.9ScgdSUBDIR+= regress
401.9Scgd.endif
411.9Scgd
421.10Scgdregression-tests:
431.10Scgd	@echo Running regression tests...
441.22Scgd	@(cd ${.CURDIR}/regress && ${MAKE} regress)
451.13Sbrezak.endif
461.20Scgd
471.26Stlsbeforeinstall:
481.45Sperry.ifmake build
491.45Sperry	@echo -n "Build started at: "
501.45Sperry	@date
511.45Sperry.endif
521.26Stls.ifndef DESTDIR
531.26Stls	(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
541.31Stls.else
551.31Stls	(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
561.26Stls.endif
571.15Scgd
581.15Scgdafterinstall:
591.68Slukem.if !defined(NOMAN) && !defined(NOSHARE)
601.22Scgd	(cd ${.CURDIR}/share/man && ${MAKE} makedb)
611.45Sperry.endif
621.15Scgd
631.43Sthorpejbuild: beforeinstall
641.68Slukem.if !defined(NOSHARE)
651.32Scgd	(cd ${.CURDIR}/share/mk && ${MAKE} install)
661.47Sthorpej	(cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
671.68Slukem.endif
681.39Schristos.if !defined(UPDATE)
691.17Scgd	${MAKE} cleandir
701.39Schristos.endif
711.75Stv.if empty(HAVE_GCC28)
721.71Smycroft.if defined(DESTDIR)
731.71Smycroft	@echo "*** CAPUTE!"
741.71Smycroft	@echo "    You attempted to compile the world with egcs.  You must"
751.71Smycroft	@echo "    first install a native egcs compiler."
761.71Smycroft	false
771.71Smycroft.else
781.71Smycroft	(cd ${.CURDIR}/gnu/usr.bin/egcs && \
791.76Sbouyer	    ${MAKE} depend && ${MAKE} ${_J} NOMAN= && \
801.76Sbouyer	    ${MAKE} NOMAN= install && ${MAKE} cleandir)
811.71Smycroft.endif
821.71Smycroft.endif
831.51Stv	${MAKE} includes
841.61Smycroft	(cd ${.CURDIR}/lib/csu && \
851.76Sbouyer	    ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
861.61Smycroft	(cd ${.CURDIR}/lib && \
871.76Sbouyer	    ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
881.61Smycroft	(cd ${.CURDIR}/gnu/lib && \
891.76Sbouyer	    ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install)
901.78Sscottr	${MAKE} depend && ${MAKE} ${_J} && ${MAKE} install
911.32Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
921.78Sscottr	(cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build)
931.49Slukem.endif
941.50Smellon	@echo -n "Build finished at: "
951.50Smellon	@date
961.1Scgd
971.1Scgd.include <bsd.subdir.mk>
98