Makefile revision 1.71
11.71Smycroft#	$NetBSD: Makefile,v 1.71 1998/10/16 05:05:09 mycroft Exp $
21.32Scgd
31.32Scgd.include <bsd.own.mk>			# for configuration variables.
41.4Scgd
51.58StvHAVE_GCC28!=	${CXX} --version | egrep "^(2\.8|egcs)" ; echo
61.58Stv
71.4Scgd# NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
81.2Scgd
91.52SmycroftSUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
101.36Sexplorer
111.36Sexplorer.if exists(games)
121.36SexplorerSUBDIR+= games
131.36Sexplorer.endif
141.36Sexplorer
151.8ScgdSUBDIR+= gnu
161.52Smycroft# This is needed for libstdc++ and gen-params.
171.52Smycroftincludes-gnu: includes-include includes-sys
181.9Scgd
191.21Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
201.21ScgdSUBDIR+= domestic
211.21Scgd.endif
221.21Scgd
231.13Sbrezak.if exists(regress)
241.9Scgd.ifmake !(install)
251.9ScgdSUBDIR+= regress
261.9Scgd.endif
271.9Scgd
281.10Scgdregression-tests:
291.10Scgd	@echo Running regression tests...
301.22Scgd	@(cd ${.CURDIR}/regress && ${MAKE} regress)
311.13Sbrezak.endif
321.20Scgd
331.26Stlsbeforeinstall:
341.45Sperry.ifmake build
351.45Sperry	@echo -n "Build started at: "
361.45Sperry	@date
371.45Sperry.endif
381.26Stls.ifndef DESTDIR
391.26Stls	(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
401.31Stls.else
411.31Stls	(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
421.26Stls.endif
431.15Scgd
441.15Scgdafterinstall:
451.68Slukem.if !defined(NOMAN) && !defined(NOSHARE)
461.22Scgd	(cd ${.CURDIR}/share/man && ${MAKE} makedb)
471.45Sperry.endif
481.15Scgd
491.43Sthorpejbuild: beforeinstall
501.68Slukem.if !defined(NOSHARE)
511.32Scgd	(cd ${.CURDIR}/share/mk && ${MAKE} install)
521.47Sthorpej	(cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
531.68Slukem.endif
541.39Schristos.if !defined(UPDATE)
551.17Scgd	${MAKE} cleandir
561.39Schristos.endif
571.71Smycroft.if defined(USE_EGCS) && empty(HAVE_GCC28)
581.71Smycroft.if defined(DESTDIR)
591.71Smycroft	@echo "*** CAPUTE!"
601.71Smycroft	@echo "    You attempted to compile the world with egcs.  You must"
611.71Smycroft	@echo "    first install a native egcs compiler."
621.71Smycroft	false
631.71Smycroft.else
641.71Smycroft	(cd ${.CURDIR}/gnu/usr.bin/egcs && \
651.71Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install && \
661.71Smycroft	    ${MAKE} cleandir)
671.71Smycroft.endif
681.71Smycroft.endif
691.51Stv	${MAKE} includes
701.61Smycroft	(cd ${.CURDIR}/lib/csu && \
711.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
721.61Smycroft	(cd ${.CURDIR}/lib && \
731.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
741.61Smycroft	(cd ${.CURDIR}/gnu/lib && \
751.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
761.71Smycroft.if !defined(USE_EGCS)
771.69Stv.if	(${MACHINE_ARCH} != "alpha") && \
781.69Stv	(${MACHINE_ARCH} != "powerpc")
791.60Smycroft	(cd ${.CURDIR}/gnu/usr.bin/gcc/libgcc && \
801.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
811.62Sthorpej.endif
821.60Smycroft.endif
831.32Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
841.46Sthorpej# libtelnet depends on libdes and libkrb.  libkrb depends on
851.46Sthorpej# libcom_err.
861.49Slukem.if exists(domestic/lib/libdes)
871.46Sthorpej	(cd ${.CURDIR}/domestic/lib/libdes && \
881.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
891.49Slukem.endif
901.49Slukem.if exists(domestic/lib/libcom_err)
911.46Sthorpej	(cd ${.CURDIR}/domestic/lib/libcom_err && \
921.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
931.49Slukem.endif
941.49Slukem.if exists(domestic/lib/libkrb)
951.44Smellon	(cd ${.CURDIR}/domestic/lib/libkrb && \
961.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
971.49Slukem.endif
981.60Smycroft	(cd ${.CURDIR}/domestic/lib && \
991.61Smycroft	    ${MAKE} depend && NOMAN= ${MAKE} && NOMAN= ${MAKE} install)
1001.70Smycroft.endif
1011.70Smycroft.if !defined(DESTDIR)
1021.70Smycroft	ldconfig -m /usr/lib
1031.21Scgd.endif
1041.17Scgd	${MAKE} depend && ${MAKE} && ${MAKE} install
1051.50Smellon	@echo -n "Build finished at: "
1061.50Smellon	@date
1071.1Scgd
1081.1Scgd.include <bsd.subdir.mk>
109