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