Makefile revision 1.83
11.83Schristos# $NetBSD: Makefile,v 1.83 1999/02/09 19:52:50 christos 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.82Sscottr# Descend into the domestic tree if it exists AND 341.82Sscottr# 1) the target is clean, cleandir, or obj, OR 351.82Sscottr# 2) the the target is install or includes AND NOT 361.82Sscottr# a) compiling only "exportable" code OR 371.82Sscottr# b) doing it as part of build. 381.82Sscottr 391.79Sscottr.if exists(domestic) && \ 401.79Sscottr (make(clean) || make(cleandir) || make(obj) || \ 411.82Sscottr ((make(includes) || make(install)) && \ 421.82Sscottr !(defined(EXPORTABLE_SYSTEM) || defined(_BUILD)))) 431.21ScgdSUBDIR+= domestic 441.21Scgd.endif 451.21Scgd 461.13Sbrezak.if exists(regress) 471.9Scgd.ifmake !(install) 481.9ScgdSUBDIR+= regress 491.9Scgd.endif 501.9Scgd 511.10Scgdregression-tests: 521.10Scgd @echo Running regression tests... 531.22Scgd @(cd ${.CURDIR}/regress && ${MAKE} regress) 541.13Sbrezak.endif 551.20Scgd 561.26Stlsbeforeinstall: 571.45Sperry.ifmake build 581.45Sperry @echo -n "Build started at: " 591.45Sperry @date 601.45Sperry.endif 611.26Stls.ifndef DESTDIR 621.26Stls (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) 631.31Stls.else 641.31Stls (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) 651.26Stls.endif 661.15Scgd 671.15Scgdafterinstall: 681.81Sscottr.if !defined(NOMAN) && !defined(NOSHARE) && !defined(_BUILD) 691.81Sscottr ${MAKE} whatis.db 701.81Sscottr.endif 711.81Sscottr 721.81Sscottrwhatis.db: 731.22Scgd (cd ${.CURDIR}/share/man && ${MAKE} makedb) 741.15Scgd 751.43Sthorpejbuild: beforeinstall 761.68Slukem.if !defined(NOSHARE) 771.32Scgd (cd ${.CURDIR}/share/mk && ${MAKE} install) 781.47Sthorpej (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install) 791.68Slukem.endif 801.39Schristos.if !defined(UPDATE) 811.17Scgd ${MAKE} cleandir 821.39Schristos.endif 831.75Stv.if empty(HAVE_GCC28) 841.71Smycroft.if defined(DESTDIR) 851.71Smycroft @echo "*** CAPUTE!" 861.71Smycroft @echo " You attempted to compile the world with egcs. You must" 871.71Smycroft @echo " first install a native egcs compiler." 881.71Smycroft false 891.71Smycroft.else 901.71Smycroft (cd ${.CURDIR}/gnu/usr.bin/egcs && \ 911.76Sbouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && \ 921.76Sbouyer ${MAKE} NOMAN= install && ${MAKE} cleandir) 931.71Smycroft.endif 941.71Smycroft.endif 951.80Sscottr ${MAKE} _BUILD= includes 961.61Smycroft (cd ${.CURDIR}/lib/csu && \ 971.76Sbouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 981.61Smycroft (cd ${.CURDIR}/lib && \ 991.76Sbouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 1001.61Smycroft (cd ${.CURDIR}/gnu/lib && \ 1011.76Sbouyer ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 1021.83Schristos.if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 1031.83Schristos (cd ${.CURDIR}/domestic/lib && \ 1041.83Schristos ${MAKE} depend && ${MAKE} ${_J} NOMAN= && ${MAKE} NOMAN= install) 1051.83Schristos.endif 1061.80Sscottr ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install 1071.32Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 1081.78Sscottr (cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build) 1091.49Slukem.endif 1101.81Sscottr ${MAKE} whatis.db 1111.50Smellon @echo -n "Build finished at: " 1121.50Smellon @date 1131.1Scgd 1141.1Scgd.include <bsd.subdir.mk> 115