1999-03-10 19:18:59 +00:00
|
|
|
# $NetBSD: Makefile,v 1.94 1999/03/10 19:18:59 scottr Exp $
|
1996-04-13 06:36:15 +00:00
|
|
|
|
|
|
|
.include <bsd.own.mk> # for configuration variables.
|
1993-03-22 08:43:59 +00:00
|
|
|
|
1998-12-22 11:21:09 +00:00
|
|
|
# Configurations variables (can be set either in /etc/mk.conf or
|
|
|
|
# as environement variable
|
1999-02-13 02:54:17 +00:00
|
|
|
# NBUILDJOBS: the number of jobs to start in parallel in a 'make build'.
|
|
|
|
# defaults to 1
|
|
|
|
# MKMAN: if set to no, don't build and install man pages
|
|
|
|
# MKSHARE: if set to no, don't build or install /usr/share stuffs
|
|
|
|
# UPDATE: if set to 1, don't do a 'make cleandir' before compile
|
|
|
|
# DESTDIR: The target directory for installation (default to '/',
|
|
|
|
# which mean the current system is updated).
|
1998-12-22 11:21:09 +00:00
|
|
|
|
1998-07-24 16:48:47 +00:00
|
|
|
HAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo
|
|
|
|
|
1998-12-22 11:21:09 +00:00
|
|
|
.if defined(NBUILDJOBS)
|
|
|
|
_J= -j${NBUILDJOBS}
|
|
|
|
.endif
|
|
|
|
|
1993-03-22 08:43:59 +00:00
|
|
|
# NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW
|
1993-03-21 18:04:42 +00:00
|
|
|
|
1998-05-10 10:37:59 +00:00
|
|
|
SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys
|
1996-08-10 23:29:00 +00:00
|
|
|
|
|
|
|
.if exists(games)
|
|
|
|
SUBDIR+= games
|
|
|
|
.endif
|
|
|
|
|
1993-04-29 12:42:00 +00:00
|
|
|
SUBDIR+= gnu
|
1998-05-10 10:37:59 +00:00
|
|
|
# This is needed for libstdc++ and gen-params.
|
|
|
|
includes-gnu: includes-include includes-sys
|
1993-07-04 14:02:11 +00:00
|
|
|
|
1999-01-29 05:42:35 +00:00
|
|
|
# Descend into the domestic tree if it exists AND
|
|
|
|
# 1) the target is clean, cleandir, or obj, OR
|
1999-03-10 19:10:14 +00:00
|
|
|
# 2) the the target is install or includes AND
|
|
|
|
# NOT compiling only "exportable" code AND
|
|
|
|
# doing it as part of installing a distribution.
|
1999-03-10 19:18:59 +00:00
|
|
|
#
|
|
|
|
# NOTE: due to the use of the make(foo) construct here, using the
|
|
|
|
# clean, cleandir, and obj targets on the command line in conjunction
|
|
|
|
# with any other target may produce unexpected results.
|
1999-01-29 05:42:35 +00:00
|
|
|
|
1999-01-24 07:42:34 +00:00
|
|
|
.if exists(domestic) && \
|
|
|
|
(make(clean) || make(cleandir) || make(obj) || \
|
1999-01-29 05:42:35 +00:00
|
|
|
((make(includes) || make(install)) && \
|
1999-03-10 19:10:14 +00:00
|
|
|
!defined(EXPORTABLE_SYSTEM) && defined(_DISTRIB)))
|
1995-02-19 12:20:06 +00:00
|
|
|
SUBDIR+= domestic
|
|
|
|
.endif
|
|
|
|
|
1993-07-07 12:55:48 +00:00
|
|
|
.if exists(regress)
|
1993-05-22 07:10:28 +00:00
|
|
|
.ifmake !(install)
|
|
|
|
SUBDIR+= regress
|
|
|
|
.endif
|
|
|
|
|
1993-05-22 07:15:13 +00:00
|
|
|
regression-tests:
|
|
|
|
@echo Running regression tests...
|
1995-02-26 01:10:19 +00:00
|
|
|
@(cd ${.CURDIR}/regress && ${MAKE} regress)
|
1993-07-07 12:55:48 +00:00
|
|
|
.endif
|
1993-05-22 07:10:28 +00:00
|
|
|
|
1995-12-09 22:39:46 +00:00
|
|
|
beforeinstall:
|
1998-02-06 23:11:57 +00:00
|
|
|
.ifmake build
|
|
|
|
@echo -n "Build started at: "
|
|
|
|
@date
|
|
|
|
.endif
|
1995-12-09 22:39:46 +00:00
|
|
|
.ifndef DESTDIR
|
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
|
1996-03-18 09:55:25 +00:00
|
|
|
.else
|
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} distrib-dirs)
|
1995-12-09 22:39:46 +00:00
|
|
|
.endif
|
1995-10-06 12:05:36 +00:00
|
|
|
|
1994-02-07 05:08:57 +00:00
|
|
|
afterinstall:
|
1999-02-13 02:54:17 +00:00
|
|
|
.if ${MKMAN} != "no" && !defined(_BUILD)
|
1999-01-28 15:36:48 +00:00
|
|
|
${MAKE} whatis.db
|
1994-06-14 04:40:29 +00:00
|
|
|
.endif
|
1994-02-07 05:08:57 +00:00
|
|
|
|
1999-01-28 15:36:48 +00:00
|
|
|
whatis.db:
|
|
|
|
(cd ${.CURDIR}/share/man && ${MAKE} makedb)
|
|
|
|
|
1999-02-11 14:49:49 +00:00
|
|
|
# wrt info/dir below: It's safe to move this over top of /usr/share/info/dir,
|
|
|
|
# as the build will automatically remove/replace the non-pkg entries there.
|
|
|
|
|
1997-10-27 18:06:39 +00:00
|
|
|
build: beforeinstall
|
1999-02-13 02:54:17 +00:00
|
|
|
.if ${MKSHARE} != "no"
|
1996-04-13 06:36:15 +00:00
|
|
|
(cd ${.CURDIR}/share/mk && ${MAKE} install)
|
1998-02-15 00:33:03 +00:00
|
|
|
(cd ${.CURDIR}/share/tmac && ${MAKE} && ${MAKE} install)
|
1998-09-29 06:59:53 +00:00
|
|
|
.endif
|
1997-03-24 22:22:15 +00:00
|
|
|
.if !defined(UPDATE)
|
1994-02-10 01:47:47 +00:00
|
|
|
${MAKE} cleandir
|
1998-10-16 05:05:09 +00:00
|
|
|
.endif
|
1998-12-12 23:44:22 +00:00
|
|
|
.if empty(HAVE_GCC28)
|
1998-10-16 05:05:09 +00:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
@echo "*** CAPUTE!"
|
1999-02-11 14:49:49 +00:00
|
|
|
@echo " You attempted to compile the world without egcs. You must"
|
1998-10-16 05:05:09 +00:00
|
|
|
@echo " first install a native egcs compiler."
|
1999-02-11 14:49:49 +00:00
|
|
|
@false
|
1998-10-16 05:05:09 +00:00
|
|
|
.else
|
|
|
|
(cd ${.CURDIR}/gnu/usr.bin/egcs && \
|
1999-02-13 02:54:17 +00:00
|
|
|
${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
|
|
|
|
${MAKE} MKMAN=no install && ${MAKE} cleandir)
|
1998-10-16 05:05:09 +00:00
|
|
|
.endif
|
1997-03-24 22:22:15 +00:00
|
|
|
.endif
|
1999-03-10 19:10:14 +00:00
|
|
|
${MAKE} includes
|
1998-07-26 17:28:58 +00:00
|
|
|
(cd ${.CURDIR}/lib/csu && \
|
1999-02-13 02:54:17 +00:00
|
|
|
${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
|
|
|
|
${MAKE} MKMAN=no install)
|
1998-07-26 17:28:58 +00:00
|
|
|
(cd ${.CURDIR}/lib && \
|
1999-02-13 02:54:17 +00:00
|
|
|
${MAKE} depend && ${MAKE} ${_J} MKMAN=no && \
|
|
|
|
${MAKE} MKMAN=no install)
|
1998-07-26 17:28:58 +00:00
|
|
|
(cd ${.CURDIR}/gnu/lib && \
|
1999-02-18 03:19:44 +00:00
|
|
|
${MAKE} depend && ${MAKE} ${_J} MKMAN=no MKINFO=no && \
|
|
|
|
${MAKE} MKMAN=no MKINFO=no install)
|
1999-01-24 19:18:54 +00:00
|
|
|
${MAKE} depend && ${MAKE} ${_J} && ${MAKE} _BUILD= install
|
1996-04-13 06:36:15 +00:00
|
|
|
.if exists(domestic) && !defined(EXPORTABLE_SYSTEM)
|
1999-01-05 07:09:58 +00:00
|
|
|
(cd ${.CURDIR}/domestic && ${MAKE} ${_J} _SLAVE_BUILD= build)
|
1998-02-16 10:07:31 +00:00
|
|
|
.endif
|
1999-01-28 15:36:48 +00:00
|
|
|
${MAKE} whatis.db
|
1998-02-20 01:39:38 +00:00
|
|
|
@echo -n "Build finished at: "
|
|
|
|
@date
|
1994-02-07 05:08:57 +00:00
|
|
|
|
1999-02-16 03:37:26 +00:00
|
|
|
release snapshot: build
|
1999-02-19 23:22:14 +00:00
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release)
|
1999-02-16 03:37:26 +00:00
|
|
|
|
1993-03-21 09:45:37 +00:00
|
|
|
.include <bsd.subdir.mk>
|