Makefile revision 1.91
11.91Sscottr# $NetBSD: Makefile,v 1.91 1999/02/19 23:22:14 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.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.86Slukem.if ${MKMAN} != "no" && !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.84Stv# wrt info/dir below: It's safe to move this over top of /usr/share/info/dir, 761.84Stv# as the build will automatically remove/replace the non-pkg entries there. 771.84Stv 781.43Sthorpejbuild: beforeinstall 791.86Slukem.if ${MKSHARE} != "no" 801.32Scgd (cd ${.CURDIR}/share/mk && ${MAKE} install) 811.47Sthorpej (cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install) 821.68Slukem.endif 831.39Schristos.if !defined(UPDATE) 841.17Scgd ${MAKE} cleandir 851.39Schristos.endif 861.75Stv.if empty(HAVE_GCC28) 871.71Smycroft.if defined(DESTDIR) 881.71Smycroft @echo "*** CAPUTE!" 891.84Stv @echo " You attempted to compile the world without egcs. You must" 901.71Smycroft @echo " first install a native egcs compiler." 911.84Stv @false 921.71Smycroft.else 931.71Smycroft (cd ${.CURDIR}/gnu/usr.bin/egcs && \ 941.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 951.86Slukem ${MAKE} MKMAN=no install && ${MAKE} cleandir) 961.71Smycroft.endif 971.71Smycroft.endif 981.80Sscottr ${MAKE} _BUILD= includes 991.61Smycroft (cd ${.CURDIR}/lib/csu && \ 1001.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 1011.86Slukem ${MAKE} MKMAN=no install) 1021.61Smycroft (cd ${.CURDIR}/lib && \ 1031.86Slukem ${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \ 1041.86Slukem ${MAKE} MKMAN=no install) 1051.61Smycroft (cd ${.CURDIR}/gnu/lib && \ 1061.90Smellon ${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \ 1071.90Smellon ${MAKE} MKMAN=no MKINFO=no install) 1081.90Smellon (cd ${.CURDIR}/gnu/usr.bin/texinfo && \ 1091.89Smellon ${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \ 1101.89Smellon ${MAKE} MKMAN=no MKINFO=no install) 1111.80Sscottr ${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install 1121.32Scgd.if exists(domestic) && !defined(EXPORTABLE_SYSTEM) 1131.78Sscottr (cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build) 1141.49Slukem.endif 1151.81Sscottr ${MAKE} whatis.db 1161.50Smellon @echo -n "Build finished at: " 1171.50Smellon @date 1181.87Scjs 1191.87Scjsrelease snapshot: build 1201.91Sscottr (cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release) 1211.1Scgd 1221.1Scgd.include <bsd.subdir.mk> 123