Makefile revision 1.94
11.94Sscottr# $NetBSD: Makefile,v 1.94 1999/03/10 19:18:59 scottr 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.86Slukem# NBUILDJOBS: the number of jobs to start in parallel in a 'make build'. 81.86Slukem# defaults to 1 91.86Slukem# MKMAN: if set to no, don't build and install man pages 101.86Slukem# MKSHARE: if set to no, don't build or install /usr/share stuffs 111.86Slukem# UPDATE: if set to 1, don't do a 'make cleandir' before compile 121.86Slukem# DESTDIR: The target directory for installation (default to '/', 131.86Slukem# 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.93Sscottr# 2) the the target is install or includes AND 361.93Sscottr# NOT compiling only "exportable" code AND 371.93Sscottr# doing it as part of installing a distribution. 381.94Sscottr# 391.94Sscottr# NOTE: due to the use of the make(foo) construct here, using the 401.94Sscottr# clean, cleandir, and obj targets on the command line in conjunction 411.94Sscottr# with any other target may produce unexpected results. 421.82Sscottr 431.79Sscottr.if exists(domestic) && \ 441.79Sscottr (make(clean) || make(cleandir) || make(obj) || \ 451.82Sscottr ((make(includes) || make(install)) && \ 461.93Sscottr !defined(EXPORTABLE_SYSTEM) && defined(_DISTRIB))) 471.21ScgdSUBDIR+= domestic 481.21Scgd.endif 491.21Scgd 501.13Sbrezak.if exists(regress) 511.9Scgd.ifmake !(install) 521.9ScgdSUBDIR+= regress 531.9Scgd.endif 541.9Scgd 551.10Scgdregression-tests: 561.10Scgd @echo Running regression tests... 571.22Scgd @(cd ${.CURDIR}/regress && ${MAKE} regress) 581.13Sbrezak.endif 591.20Scgd 601.26Stlsbeforeinstall: 611.45Sperry.ifmake build 621.45Sperry @echo -n "Build started at: " 631.45Sperry @date 641.45Sperry.endif 651.26Stls.ifndef DESTDIR 661.26Stls (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) 671.31Stls.else 681.31Stls (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) 691.26Stls.endif 701.15Scgd 711.15Scgdafterinstall: 721.86Slukem.if ${MKMAN} != "no" && !defined(_BUILD) 731.81Sscottr ${MAKE} whatis.db 741.81Sscottr.endif 751.81Sscottr 761.81Sscottrwhatis.db: 771.22Scgd (cd ${.CURDIR}/share/man && ${MAKE} makedb) 781.15Scgd 791.84Stv# wrt info/dir below: It's safe to move this over top of /usr/share/info/dir, 801.84Stv# as the build will automatically remove/replace the non-pkg entries there. 811.84Stv 821.43Sthorpejbuild: beforeinstall 831.86Slukem.if ${MKSHARE} != "no" 841.32Scgd (cd ${.CURDIR}/share/mk && ${MAKE} install) 851.47Sthorpej (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install) 861.68Slukem.endif 871.39Schristos.if !defined(UPDATE) 881.17Scgd ${MAKE} cleandir 891.39Schristos.endif 901.75Stv.if empty(HAVE_GCC28) 911.71Smycroft.if defined(DESTDIR) 921.71Smycroft @echo "*** CAPUTE!" 931.84Stv @echo " You attempted to compile the world without egcs. You must" 941.71Smycroft @echo " first install a native egcs compiler." 951.84Stv @false 961.71Smycroft.else 971.71Smycroft (cd ${.CURDIR}/gnu/usr.bin/egcs && \ 981.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 991.86Slukem ${MAKE} MKMAN=no install && ${MAKE} cleandir) 1001.71Smycroft.endif 1011.71Smycroft.endif 1021.93Sscottr ${MAKE} includes 1031.61Smycroft (cd ${.CURDIR}/lib/csu && \ 1041.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 1051.86Slukem ${MAKE} MKMAN=no install) 1061.61Smycroft (cd ${.CURDIR}/lib && \ 1071.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 1081.86Slukem ${MAKE} MKMAN=no install) 1091.61Smycroft (cd ${.CURDIR}/gnu/lib && \ 1101.89Smellon ${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \ 1111.89Smellon ${MAKE} MKMAN=no MKINFO=no install) 1121.80Sscottr ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install 1131.32Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 1141.78Sscottr (cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build) 1151.49Slukem.endif 1161.81Sscottr ${MAKE} whatis.db 1171.50Smellon @echo -n "Build finished at: " 1181.50Smellon @date 1191.87Scjs 1201.87Scjsrelease snapshot: build 1211.91Sscottr (cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release) 1221.1Scgd 1231.1Scgd.include <bsd.subdir.mk> 124