1 # $NetBSD: Makefile,v 1.58 1998/07/24 16:48:47 tv Exp $ 2 3 .include <bsd.own.mk> # for configuration variables. 4 5 HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo 6 7 # NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW 8 9 SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys 10 11 .if exists(games) 12 SUBDIR+= games 13 .endif 14 15 SUBDIR+= gnu 16 # This is needed for libstdc++ and gen-params. 17 includes-gnu: includes-include includes-sys 18 19 .if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 20 SUBDIR+= domestic 21 .endif 22 23 .if exists(regress) 24 .ifmake !(install) 25 SUBDIR+= regress 26 .endif 27 28 regression-tests: 29 @echo Running regression tests... 30 @(cd ${.CURDIR}/regress && ${MAKE} regress) 31 .endif 32 33 beforeinstall: 34 .ifmake build 35 @echo -n "Build started at: " 36 @date 37 .endif 38 .ifndef DESTDIR 39 (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) 40 .else 41 (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) 42 .endif 43 44 afterinstall: 45 .ifndef NOMAN 46 (cd ${.CURDIR}/share/man && ${MAKE} makedb) 47 .endif 48 49 build: beforeinstall 50 (cd ${.CURDIR}/share/mk && ${MAKE} install) 51 (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install) 52 .if !defined(UPDATE) 53 ${MAKE} cleandir 54 .endif 55 ${MAKE} includes 56 (cd ${.CURDIR}/lib/csu && ${MAKE} depend && ${MAKE} && ${MAKE} install) 57 (cd ${.CURDIR}/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install) 58 (cd ${.CURDIR}/gnu/lib && ${MAKE} depend && ${MAKE} && ${MAKE} install) 59 (cd ${.CURDIR}/gnu/usr.bin/gcc/libgcc && ${MAKE} depend && ${MAKE} && ${MAKE} install) 60 .if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 61 # libtelnet depends on libdes and libkrb. libkrb depends on 62 # libcom_err. 63 .if exists(domestic/lib/libdes) 64 (cd ${.CURDIR}/domestic/lib/libdes && \ 65 ${MAKE} depend && ${MAKE} && ${MAKE} install) 66 .endif 67 .if exists(domestic/lib/libcom_err) 68 (cd ${.CURDIR}/domestic/lib/libcom_err && \ 69 ${MAKE} depend && ${MAKE} && ${MAKE} install) 70 .endif 71 .if exists(domestic/lib/libkrb) 72 (cd ${.CURDIR}/domestic/lib/libkrb && \ 73 ${MAKE} depend && ${MAKE} && ${MAKE} install) 74 .endif 75 (cd ${.CURDIR}/domestic/lib/ && ${MAKE} depend && ${MAKE} && \ 76 ${MAKE} install) 77 .endif 78 ${MAKE} depend && ${MAKE} && ${MAKE} install 79 .if defined(USE_EGCS) 80 .if defined(DESTDIR) 81 .if (${HAVE_GCC28} == "") 82 @echo '***** WARNING ***** Your system compiler is not GCC 2.8 or higher,' 83 @echo 'and you have built a distribution with GCC 2.8 and DESTDIR set.' 84 @echo 'You will need to rebuild libgcc from gnu/usr.bin/egcs/libgcc' 85 @echo 'in order to have full C++ support in the binary set.' 86 .endif # HAVE_GCC28 87 .else 88 (cd ${.CURDIR}/gnu/usr.bin/egcs/libgcc &&\ 89 ${MAKE} depend && ${MAKE} && ${MAKE} install) 90 .endif # DESTDIR 91 .endif # USE_EGCS 92 @echo -n "Build finished at: " 93 @date 94 95 .include <bsd.subdir.mk> 96