1 1.78 scottr # $NetBSD: Makefile,v 1.78 1999/01/05 07:09:58 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.76 bouyer # NBUILDJOBS: the number of jobs to start in parallel in a 'make build'. 8 1.76 bouyer # defaults to 1 9 1.76 bouyer # NOMAN: if set to 1, don't build and install man pages 10 1.76 bouyer # NOSHARE: if set to 1, don't build or install /usr/share stuffs 11 1.76 bouyer # UPDATE: if set to 1, don't do a 'make cleandir' before compile 12 1.76 bouyer # DESTDIR: The target directory for installation (default to '/', 13 1.76 bouyer # 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.78 scottr .if exists(domestic) && (make(clean) || make(cleandir) || make(obj)) 34 1.21 cgd SUBDIR+= domestic 35 1.21 cgd .endif 36 1.21 cgd 37 1.13 brezak .if exists(regress) 38 1.9 cgd .ifmake !(install) 39 1.9 cgd SUBDIR+= regress 40 1.9 cgd .endif 41 1.9 cgd 42 1.10 cgd regression-tests: 43 1.10 cgd @echo Running regression tests... 44 1.22 cgd @(cd ${.CURDIR}/regress && ${MAKE} regress) 45 1.13 brezak .endif 46 1.20 cgd 47 1.26 tls beforeinstall: 48 1.45 perry .ifmake build 49 1.45 perry @echo -n "Build started at: " 50 1.45 perry @date 51 1.45 perry .endif 52 1.26 tls .ifndef DESTDIR 53 1.26 tls (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) 54 1.31 tls .else 55 1.31 tls (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) 56 1.26 tls .endif 57 1.15 cgd 58 1.15 cgd afterinstall: 59 1.68 lukem .if !defined(NOMAN) && !defined(NOSHARE) 60 1.22 cgd (cd ${.CURDIR}/share/man && ${MAKE} makedb) 61 1.45 perry .endif 62 1.15 cgd 63 1.43 thorpej build: beforeinstall 64 1.68 lukem .if !defined(NOSHARE) 65 1.32 cgd (cd ${.CURDIR}/share/mk && ${MAKE} install) 66 1.47 thorpej (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install) 67 1.68 lukem .endif 68 1.39 christos .if !defined(UPDATE) 69 1.17 cgd ${MAKE} cleandir 70 1.39 christos .endif 71 1.75 tv .if empty(HAVE_GCC28) 72 1.71 mycroft .if defined(DESTDIR) 73 1.71 mycroft @echo "*** CAPUTE!" 74 1.71 mycroft @echo " You attempted to compile the world with egcs. You must" 75 1.71 mycroft @echo " first install a native egcs compiler." 76 1.71 mycroft false 77 1.71 mycroft .else 78 1.71 mycroft (cd ${.CURDIR}/gnu/usr.bin/egcs && \ 79 1.76 bouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && \ 80 1.76 bouyer ${MAKE} NOMAN= install && ${MAKE} cleandir) 81 1.71 mycroft .endif 82 1.71 mycroft .endif 83 1.51 tv ${MAKE} includes 84 1.61 mycroft (cd ${.CURDIR}/lib/csu && \ 85 1.76 bouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 86 1.61 mycroft (cd ${.CURDIR}/lib && \ 87 1.76 bouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 88 1.61 mycroft (cd ${.CURDIR}/gnu/lib && \ 89 1.76 bouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 90 1.78 scottr ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} install 91 1.32 cgd .if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 92 1.78 scottr (cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build) 93 1.49 lukem .endif 94 1.50 mellon @echo -n "Build finished at: " 95 1.50 mellon @date 96 1.1 cgd 97 1.1 cgd .include <bsd.subdir.mk> 98