2007-09-07 08:20:44 +04:00
|
|
|
# $NetBSD: Makefile,v 1.249 2007/09/07 04:20:44 lukem Exp $
|
1999-04-01 06:49:12 +04:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
1999-04-01 06:49:12 +04:00
|
|
|
# This is the top-level makefile for building NetBSD. For an outline of
|
|
|
|
# how to build a snapshot or release, as well as other release engineering
|
2003-07-26 21:06:22 +04:00
|
|
|
# information, see http://www.NetBSD.org/developers/releng/index.html
|
1999-04-01 06:49:12 +04:00
|
|
|
#
|
|
|
|
# Not everything you can set or do is documented in this makefile. In
|
|
|
|
# particular, you should review the files in /usr/share/mk (especially
|
|
|
|
# bsd.README) for general information on building programs and writing
|
|
|
|
# Makefiles within this structure, and see the comments in src/etc/Makefile
|
|
|
|
# for further information on installation and release set options.
|
|
|
|
#
|
|
|
|
# Variables listed below can be set on the make command line (highest
|
|
|
|
# priority), in /etc/mk.conf (middle priority), or in the environment
|
|
|
|
# (lowest priority).
|
|
|
|
#
|
|
|
|
# Variables:
|
1999-11-30 20:48:11 +03:00
|
|
|
# DESTDIR is the target directory for installation of the compiled
|
|
|
|
# software. It defaults to /. Note that programs are built against
|
|
|
|
# libraries installed in DESTDIR.
|
2003-07-18 12:26:01 +04:00
|
|
|
# MKMAN, if `no', will prevent building of manual pages.
|
|
|
|
# MKOBJDIRS, if not `no', will build object directories at
|
1999-11-30 20:48:11 +03:00
|
|
|
# an appropriate point in a build.
|
2003-07-18 12:26:01 +04:00
|
|
|
# MKSHARE, if `no', will prevent building and installing
|
1999-04-01 06:49:12 +04:00
|
|
|
# anything in /usr/share.
|
2003-07-18 12:26:01 +04:00
|
|
|
# MKUPDATE, if not `no', will avoid a `make cleandir' at the start of
|
2002-06-20 12:21:59 +04:00
|
|
|
# `make build', as well as having the effects listed in
|
|
|
|
# /usr/share/mk/bsd.README.
|
2001-06-10 17:15:29 +04:00
|
|
|
# NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
|
2002-06-20 12:21:59 +04:00
|
|
|
# of the `make build'.
|
2000-08-05 14:17:35 +04:00
|
|
|
# NOINCLUDES will avoid the `make includes' usually done by `make build'.
|
1999-04-01 06:49:12 +04:00
|
|
|
#
|
2003-07-18 12:26:01 +04:00
|
|
|
# See mk.conf(5) for more details.
|
|
|
|
#
|
|
|
|
#
|
1999-04-01 06:49:12 +04:00
|
|
|
# Targets:
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# build:
|
2003-01-03 18:34:30 +03:00
|
|
|
# Builds a full release of NetBSD in DESTDIR, except for the
|
|
|
|
# /etc configuration files.
|
|
|
|
# If BUILD_DONE is set, this is an empty target.
|
|
|
|
# distribution:
|
|
|
|
# Builds a full release of NetBSD in DESTDIR, including the /etc
|
|
|
|
# configuration files.
|
|
|
|
# buildworld:
|
|
|
|
# As per `make distribution', except that it ensures that DESTDIR
|
|
|
|
# is not the root directory.
|
|
|
|
# installworld:
|
|
|
|
# Install the distribution from DESTDIR to INSTALLWORLDDIR (which
|
|
|
|
# defaults to the root directory). Ensures that INSTALLWORLDDIR
|
|
|
|
# is the not root directory if cross compiling.
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# release:
|
2005-08-25 06:04:39 +04:00
|
|
|
# Does a `make distribution', and then tars up the DESTDIR files
|
2003-01-03 18:34:30 +03:00
|
|
|
# into RELEASEDIR/${MACHINE}, in release(7) format.
|
|
|
|
# (See etc/Makefile for more information on this.)
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# regression-tests:
|
|
|
|
# Runs the regression tests in "regress" on this host.
|
2003-05-10 11:12:37 +04:00
|
|
|
# sets:
|
|
|
|
# Populate ${RELEASEDIR}/${MACHINE}/binary/sets from ${DESTDIR}
|
|
|
|
# sourcesets:
|
|
|
|
# Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR}
|
2006-01-04 18:30:02 +03:00
|
|
|
# syspkgs:
|
|
|
|
# Populate ${RELEASEDIR}/${MACHINE}/binary/syspkgs from ${DESTDIR}
|
2006-01-29 00:34:07 +03:00
|
|
|
# iso-image:
|
2007-08-30 09:30:02 +04:00
|
|
|
# Create CD-ROM image in RELEASEDIR/iso.
|
2006-01-29 00:34:07 +03:00
|
|
|
# RELEASEDIR must already have been populated by `make release'
|
|
|
|
# or equivalent.
|
2007-08-30 09:30:02 +04:00
|
|
|
# iso-image-source:
|
|
|
|
# Create CD-ROM image with source in RELEASEDIR/iso.
|
|
|
|
# RELEASEDIR must already have been populated by
|
|
|
|
# `make release sourcesets' or equivalent.
|
2001-06-10 17:02:54 +04:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Targets invoked by `make build,' in order:
|
|
|
|
# cleandir: cleans the tree.
|
2001-11-13 20:47:16 +03:00
|
|
|
# obj: creates object directories.
|
2001-11-13 02:16:17 +03:00
|
|
|
# do-tools: builds host toolchain.
|
2001-09-22 16:30:13 +04:00
|
|
|
# do-distrib-dirs: creates the distribution directories.
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# includes: installs include files.
|
2003-07-05 08:32:58 +04:00
|
|
|
# do-tools-compat: builds the "libnbcompat" library; needed for some
|
|
|
|
# random host tool programs in the source tree.
|
2005-01-01 13:32:39 +03:00
|
|
|
# do-lib-csu: builds and installs prerequisites from lib/csu.
|
2007-09-07 08:20:44 +04:00
|
|
|
# do-libgcc: builds and installs prerequisites from
|
|
|
|
# gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and
|
|
|
|
# gnu/lib/libgcc${LIBGCC_EXT}.
|
2002-09-14 20:46:24 +04:00
|
|
|
# do-lib-libc: builds and installs prerequisites from lib/libc.
|
2001-10-24 07:21:20 +04:00
|
|
|
# do-lib: builds and installs prerequisites from lib.
|
|
|
|
# do-gnu-lib: builds and installs prerequisites from gnu/lib.
|
2002-11-12 17:33:48 +03:00
|
|
|
# do-ld.so: builds and installs prerequisites from libexec/ld.*_so.
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# do-build: builds and installs the entire system.
|
2004-01-08 10:01:06 +03:00
|
|
|
# do-x11: builds and installs X11R6 from src/x11 if ${MKX11} != "no"
|
2003-12-06 01:33:01 +03:00
|
|
|
# do-obsolete: installs the obsolete sets (for the postinstall-* targets).
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
1996-04-13 10:36:15 +04:00
|
|
|
|
2001-10-31 04:20:09 +03:00
|
|
|
.if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == ""
|
|
|
|
.MAKEFLAGS: -m ${.CURDIR}/share/mk
|
|
|
|
.endif
|
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2002-02-28 05:22:59 +03:00
|
|
|
# If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
|
|
|
|
# not be the top level objdir, because "make obj" can happen in the *middle*
|
|
|
|
# of "make build" (long after <bsd.own.mk> is calculated it). So, pre-set
|
|
|
|
# _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2002-02-28 05:22:59 +03:00
|
|
|
_SRC_TOP_OBJ_=
|
|
|
|
|
2001-10-31 04:20:09 +03:00
|
|
|
.include <bsd.own.mk>
|
1993-03-22 11:43:59 +03:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Sanity check: make sure that "make build" is not invoked simultaneously
|
|
|
|
# with a standard recursive target.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
1998-07-24 20:48:47 +04:00
|
|
|
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.if make(build) || make(release) || make(snapshot)
|
|
|
|
.for targ in ${TARGETS:Nobj:Ncleandir}
|
|
|
|
.if make(${targ}) && !target(.BEGIN)
|
|
|
|
.BEGIN:
|
|
|
|
@echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.'
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
.endfor
|
1998-12-22 14:21:09 +03:00
|
|
|
.endif
|
|
|
|
|
2002-03-11 10:49:24 +03:00
|
|
|
_SUBDIR= tools lib include gnu bin games libexec sbin usr.bin
|
2003-04-18 23:14:39 +04:00
|
|
|
_SUBDIR+= usr.sbin share rescue sys etc .WAIT distrib regress
|
1996-08-11 03:29:00 +04:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Weed out directories that don't exist.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2000-02-01 04:22:05 +03:00
|
|
|
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.for dir in ${_SUBDIR}
|
2006-09-07 07:51:44 +04:00
|
|
|
.if ("${dir}" == ".WAIT") || exists(${dir}/Makefile) && (${BUILD_${dir}:Uyes} != "no")
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
SUBDIR+= ${dir}
|
1996-08-11 03:29:00 +04:00
|
|
|
.endif
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.endfor
|
1993-07-04 18:02:11 +04:00
|
|
|
|
1993-07-07 16:55:48 +04:00
|
|
|
.if exists(regress)
|
2006-01-21 22:01:15 +03:00
|
|
|
regression-tests: .PHONY .MAKE
|
1993-05-22 11:15:13 +04:00
|
|
|
@echo Running regression tests...
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} regress regress
|
1994-06-14 08:40:29 +04:00
|
|
|
.endif
|
1994-02-07 08:08:57 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUNPRIVED} != "no"
|
2002-06-26 04:10:16 +04:00
|
|
|
NOPOSTINSTALL= # defined
|
|
|
|
.endif
|
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
afterinstall: .PHONY .MAKE
|
2001-11-25 00:53:16 +03:00
|
|
|
.if ${MKMAN} != "no"
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} share/man makedb
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.endif
|
2003-07-18 12:26:01 +04:00
|
|
|
.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no")
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} gnu/usr.bin/texinfo/install-info infodir-meta
|
2001-11-25 00:53:16 +03:00
|
|
|
.endif
|
2002-06-26 04:10:16 +04:00
|
|
|
.if !defined(NOPOSTINSTALL)
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . postinstall-check
|
2002-06-19 04:17:11 +04:00
|
|
|
.endif
|
2002-04-29 16:09:13 +04:00
|
|
|
|
2005-04-17 19:18:34 +04:00
|
|
|
_POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall
|
|
|
|
|
2004-01-27 04:45:07 +03:00
|
|
|
postinstall-check: .PHONY
|
2002-04-27 12:11:53 +04:00
|
|
|
@echo " === Post installation checks ==="
|
2005-04-17 19:18:34 +04:00
|
|
|
${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check
|
2002-04-27 12:11:53 +04:00
|
|
|
@echo " ================================"
|
|
|
|
|
2004-01-27 04:45:07 +03:00
|
|
|
postinstall-fix: .NOTMAIN .PHONY
|
2002-04-29 16:14:36 +04:00
|
|
|
@echo " === Post installation fixes ==="
|
2005-04-17 19:18:34 +04:00
|
|
|
${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix
|
2003-07-17 11:46:11 +04:00
|
|
|
@echo " ==============================="
|
|
|
|
|
2004-01-27 04:45:07 +03:00
|
|
|
postinstall-fix-obsolete: .NOTMAIN .PHONY
|
2003-07-17 11:46:11 +04:00
|
|
|
@echo " === Removing obsolete files ==="
|
2005-04-17 19:18:34 +04:00
|
|
|
${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete
|
2003-07-17 11:46:11 +04:00
|
|
|
@echo " ==============================="
|
2002-04-29 16:14:36 +04:00
|
|
|
|
2001-11-25 00:53:16 +03:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Targets (in order!) called by "make build".
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2006-06-03 02:16:18 +04:00
|
|
|
.if ${HAVE_GCC} == "3"
|
2003-07-25 23:20:47 +04:00
|
|
|
LIBGCC_EXT=3
|
|
|
|
.else
|
2006-06-03 02:16:18 +04:00
|
|
|
LIBGCC_EXT=4
|
2003-07-25 23:20:47 +04:00
|
|
|
.endif
|
1999-02-11 17:49:49 +03:00
|
|
|
|
2001-11-15 22:32:19 +03:00
|
|
|
BUILDTARGETS+= check-tools
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR)
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
BUILDTARGETS+= cleandir
|
2001-09-22 16:30:13 +04:00
|
|
|
.endif
|
2001-11-13 20:47:16 +03:00
|
|
|
.if ${MKOBJDIRS} != "no"
|
|
|
|
BUILDTARGETS+= obj
|
|
|
|
.endif
|
2001-10-19 07:19:01 +04:00
|
|
|
.if ${USETOOLS} == "yes"
|
2001-11-13 02:16:17 +03:00
|
|
|
BUILDTARGETS+= do-tools
|
2001-10-01 21:19:17 +04:00
|
|
|
.endif
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.if !defined(NODISTRIBDIRS)
|
|
|
|
BUILDTARGETS+= do-distrib-dirs
|
2001-09-22 16:30:13 +04:00
|
|
|
.endif
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.if !defined(NOINCLUDES)
|
|
|
|
BUILDTARGETS+= includes
|
2001-09-22 16:30:13 +04:00
|
|
|
.endif
|
2003-04-04 05:06:00 +04:00
|
|
|
BUILDTARGETS+= do-tools-compat
|
2004-02-15 22:52:27 +03:00
|
|
|
BUILDTARGETS+= do-lib-csu
|
2003-06-26 21:46:56 +04:00
|
|
|
.if ${MKGCC} != "no"
|
2007-09-07 08:20:44 +04:00
|
|
|
BUILDTARGETS+= do-libgcc
|
2003-06-26 21:46:56 +04:00
|
|
|
.endif
|
2004-02-15 22:52:27 +03:00
|
|
|
BUILDTARGETS+= do-lib-libc
|
2004-01-04 03:27:15 +03:00
|
|
|
BUILDTARGETS+= do-lib do-gnu-lib
|
|
|
|
BUILDTARGETS+= do-ld.so
|
|
|
|
BUILDTARGETS+= do-build
|
2004-01-08 10:01:06 +03:00
|
|
|
.if ${MKX11} != "no"
|
|
|
|
BUILDTARGETS+= do-x11
|
|
|
|
.endif
|
2003-02-22 06:20:45 +03:00
|
|
|
BUILDTARGETS+= do-obsolete
|
2001-09-22 16:30:13 +04:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Enforce proper ordering of some rules.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-06-10 17:02:54 +04:00
|
|
|
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.ORDER: ${BUILDTARGETS}
|
2004-01-27 04:45:07 +03:00
|
|
|
includes-lib: .PHONY includes-include includes-sys
|
|
|
|
includes-gnu: .PHONY includes-lib
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Build the system and install into DESTDIR.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-08-14 18:04:35 +04:00
|
|
|
|
2002-12-02 11:23:41 +03:00
|
|
|
START_TIME!= date
|
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
build: .PHONY .MAKE
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.if defined(BUILD_DONE)
|
|
|
|
@echo "Build already installed into ${DESTDIR}"
|
|
|
|
.else
|
2002-12-02 11:23:41 +03:00
|
|
|
@echo "Build started at: ${START_TIME}"
|
2001-10-30 20:59:10 +03:00
|
|
|
.for tgt in ${BUILDTARGETS}
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . ${tgt}
|
2001-10-30 20:59:10 +03:00
|
|
|
.endfor
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} etc install-etc-release
|
2002-12-02 11:23:41 +03:00
|
|
|
@echo "Build started at: ${START_TIME}"
|
2002-05-02 20:36:21 +04:00
|
|
|
@printf "Build finished at: " && date
|
1997-03-25 01:22:15 +03:00
|
|
|
.endif
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-11-25 21:31:12 +03:00
|
|
|
# Build a full distribution, but not a release (i.e. no sets into
|
2002-12-21 19:43:33 +03:00
|
|
|
# ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != /
|
|
|
|
#
|
2001-11-25 21:31:12 +03:00
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
distribution buildworld: .PHONY .MAKE
|
2002-12-26 15:01:48 +03:00
|
|
|
.if make(buildworld) && \
|
|
|
|
(!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
|
2002-12-21 19:43:33 +03:00
|
|
|
@echo "Won't make ${.TARGET} with DESTDIR=/"
|
|
|
|
@false
|
|
|
|
.endif
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . build NOPOSTINSTALL=1
|
|
|
|
${MAKEDIRTARGET} etc distribution INSTALL_DONE=1
|
2002-07-10 22:55:20 +04:00
|
|
|
.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/"
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . postinstall-fix-obsolete
|
|
|
|
${MAKEDIRTARGET} distrib/sets checkflist
|
2002-07-10 22:55:20 +04:00
|
|
|
.endif
|
2002-12-02 11:27:03 +03:00
|
|
|
@echo "make ${.TARGET} started at: ${START_TIME}"
|
2002-08-30 10:30:33 +04:00
|
|
|
@printf "make ${.TARGET} finished at: " && date
|
2001-11-25 21:31:12 +03:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
|
|
|
# Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/')
|
|
|
|
# If installing to /, ensures that the host's operating system is NetBSD and
|
|
|
|
# the host's `uname -m` == ${MACHINE}.
|
|
|
|
#
|
|
|
|
|
|
|
|
HOST_UNAME_S!= uname -s
|
|
|
|
HOST_UNAME_M!= uname -m
|
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
installworld: .PHONY .MAKE
|
2002-12-26 15:01:48 +03:00
|
|
|
.if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/")
|
2002-12-21 19:43:33 +03:00
|
|
|
@echo "Can't make ${.TARGET} to DESTDIR=/"
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
.if !defined(INSTALLWORLDDIR) || \
|
|
|
|
${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/"
|
|
|
|
.if (${HOST_UNAME_S} != "NetBSD")
|
|
|
|
@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/"
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
.if (${HOST_UNAME_M} != ${MACHINE})
|
|
|
|
@echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/"
|
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
.endif
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} distrib/sets installsets \
|
|
|
|
INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS=
|
|
|
|
${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR}
|
2002-12-21 19:43:33 +03:00
|
|
|
@echo "make ${.TARGET} started at: ${START_TIME}"
|
|
|
|
@printf "make ${.TARGET} finished at: " && date
|
|
|
|
|
2003-01-26 09:19:12 +03:00
|
|
|
#
|
2003-05-10 11:12:37 +04:00
|
|
|
# Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR
|
2003-01-26 09:19:12 +03:00
|
|
|
#
|
|
|
|
|
2006-01-04 18:30:02 +03:00
|
|
|
.for tgt in sets sourcesets syspkgs
|
2006-01-21 22:01:15 +03:00
|
|
|
${tgt}: .PHONY .MAKE
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} distrib/sets ${tgt}
|
2003-05-10 11:12:37 +04:00
|
|
|
.endfor
|
2003-01-26 09:19:12 +03:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2005-08-25 06:04:39 +04:00
|
|
|
# Build a release or snapshot (implies "make distribution"). Note that
|
2002-07-10 22:55:20 +04:00
|
|
|
# in this case, the set lists will be checked before the tar files
|
|
|
|
# are made.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
release snapshot: .PHONY .MAKE
|
2005-08-25 06:04:39 +04:00
|
|
|
${MAKEDIRTARGET} . distribution
|
|
|
|
${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1
|
2002-12-02 11:27:03 +03:00
|
|
|
@echo "make ${.TARGET} started at: ${START_TIME}"
|
2002-08-30 10:30:33 +04:00
|
|
|
@printf "make ${.TARGET} finished at: " && date
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2006-01-29 00:34:07 +03:00
|
|
|
#
|
|
|
|
# Create a CD-ROM image.
|
|
|
|
#
|
|
|
|
|
|
|
|
iso-image: .PHONY
|
Add an iso_image target (iso-image as a target name doesn't play well with
bsd.subdirs.mk) in distrib/makefile, which builds an iso image for $MACHINE
with binary sets, stored in ${RELEASEDIR}/iso. The image is bootable for:
alpha, amd64, cats, i386, pmax, sgimips, sparc, sparc64, sun3, vax.
mac68k/macppc no there yet because of missing feature in makefs.
call iso_image in distrib/ for iso-image in the top Makefile.
2007-03-07 00:56:47 +03:00
|
|
|
${MAKEDIRTARGET} distrib iso_image
|
2006-01-29 00:34:07 +03:00
|
|
|
${MAKEDIRTARGET} etc iso-image
|
|
|
|
@echo "make ${.TARGET} started at: ${START_TIME}"
|
|
|
|
@printf "make ${.TARGET} finished at: " && date
|
|
|
|
|
2007-08-30 09:30:02 +04:00
|
|
|
iso-image-source: .PHONY
|
|
|
|
${MAKEDIRTARGET} distrib iso_image CDSOURCE=true
|
|
|
|
${MAKEDIRTARGET} etc iso-image
|
|
|
|
@echo "make ${.TARGET} started at: ${START_TIME}"
|
|
|
|
@printf "make ${.TARGET} finished at: " && date
|
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Special components of the "make build" process.
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2004-01-27 04:45:07 +03:00
|
|
|
check-tools: .PHONY
|
2004-01-03 17:04:27 +03:00
|
|
|
.if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN)
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
@echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.'
|
|
|
|
@echo '*** May result in a failed build or corrupt binaries!'
|
|
|
|
.elif defined(EXTERNAL_TOOLCHAIN)
|
|
|
|
@echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
|
2001-11-15 22:32:19 +03:00
|
|
|
.endif
|
2002-05-03 02:13:30 +04:00
|
|
|
.if defined(NBUILDJOBS)
|
|
|
|
@echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
|
|
|
|
.endif
|
2001-11-15 22:32:19 +03:00
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
do-distrib-dirs: .PHONY .MAKE
|
2001-10-31 22:41:54 +03:00
|
|
|
.if !defined(DESTDIR) || ${DESTDIR} == ""
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/
|
2001-10-31 22:41:54 +03:00
|
|
|
.else
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR}
|
2001-10-31 22:41:54 +03:00
|
|
|
.endif
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2002-11-30 02:48:37 +03:00
|
|
|
.for targ in cleandir obj includes
|
2004-01-27 04:45:07 +03:00
|
|
|
do-${targ}: .PHONY ${targ}
|
2002-11-30 02:48:37 +03:00
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
|
2004-08-28 04:18:38 +04:00
|
|
|
.for dir in tools tools/compat lib/csu gnu/lib/crtstuff${LIBGCC_EXT} gnu/lib/libgcc${LIBGCC_EXT} lib/libc lib/libdes lib gnu/lib
|
2006-01-21 22:01:15 +03:00
|
|
|
do-${dir:S/\//-/g}: .PHONY .MAKE
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.for targ in dependall install
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} ${dir} ${targ}
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
.endfor
|
|
|
|
.endfor
|
2001-10-24 07:21:20 +04:00
|
|
|
|
2007-09-07 08:20:44 +04:00
|
|
|
do-libgcc: .PHONY .MAKE
|
|
|
|
.if ${MKGCC} != "no"
|
|
|
|
.if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4")
|
|
|
|
${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT}
|
|
|
|
.endif
|
|
|
|
${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT}
|
|
|
|
.endif
|
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
do-ld.so: .PHONY .MAKE
|
2002-08-26 08:40:20 +04:00
|
|
|
.for targ in dependall install
|
2002-11-12 17:33:48 +03:00
|
|
|
.if (${OBJECT_FMT} == "a.out")
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} libexec/ld.aout_so ${targ}
|
2002-11-12 17:33:48 +03:00
|
|
|
.endif
|
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} libexec/ld.elf_so ${targ}
|
2002-11-12 17:33:48 +03:00
|
|
|
.endif
|
2002-08-26 08:40:20 +04:00
|
|
|
.endfor
|
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
do-build: .PHONY .MAKE
|
2001-11-13 18:56:28 +03:00
|
|
|
.for targ in dependall install
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no
|
2001-11-13 18:56:28 +03:00
|
|
|
.endfor
|
1994-02-07 08:08:57 +03:00
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
do-x11: .PHONY .MAKE
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} x11 build
|
2004-01-08 10:01:06 +03:00
|
|
|
|
2006-01-21 22:01:15 +03:00
|
|
|
do-obsolete: .PHONY .MAKE
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} etc install-obsolete-lists
|
2003-02-22 06:20:45 +03:00
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
2001-10-19 06:35:45 +04:00
|
|
|
# Speedup stubs for some subtrees that don't need to run these rules.
|
|
|
|
# (Tells <bsd.subdir.mk> not to recurse for them.)
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
1999-02-16 06:37:26 +03:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.for dir in bin etc distrib games libexec regress sbin usr.sbin tools
|
2004-01-27 04:45:07 +03:00
|
|
|
includes-${dir}: .PHONY
|
2001-11-13 02:16:17 +03:00
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
.for dir in etc distrib regress
|
2004-01-27 04:45:07 +03:00
|
|
|
install-${dir}: .PHONY
|
2001-11-13 02:16:17 +03:00
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
|
2002-12-21 19:43:33 +03:00
|
|
|
#
|
2001-11-13 02:16:17 +03:00
|
|
|
# XXX this needs to change when distrib Makefiles are recursion compliant
|
2002-12-21 19:43:33 +03:00
|
|
|
# XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first...
|
|
|
|
#
|
2004-01-27 04:45:07 +03:00
|
|
|
dependall-distrib depend-distrib all-distrib: .PHONY
|
2001-10-13 01:05:08 +04:00
|
|
|
@true
|
2001-09-22 01:01:13 +04:00
|
|
|
|
2003-07-10 14:33:58 +04:00
|
|
|
.include <bsd.sys.mk>
|
2001-11-12 01:40:42 +03:00
|
|
|
.include <bsd.obj.mk>
|
2003-07-06 17:04:01 +04:00
|
|
|
.include <bsd.kernobj.mk>
|
2001-10-31 04:20:09 +03:00
|
|
|
.include <bsd.subdir.mk>
|
2001-10-29 22:48:35 +03:00
|
|
|
|
2004-01-27 04:45:07 +03:00
|
|
|
build-docs: .PHONY ${.CURDIR}/BUILDING
|
2002-09-21 12:19:27 +04:00
|
|
|
${.CURDIR}/BUILDING: doc/BUILDING.mdoc
|
2004-02-07 02:12:56 +03:00
|
|
|
${_MKMSG_CREATE} ${.TARGET}
|
2003-07-20 17:08:43 +04:00
|
|
|
${TOOL_GROFF} -mdoc -Tascii -P-bou $> >$@
|
2003-07-06 17:04:01 +04:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Display current make(1) parameters
|
|
|
|
#
|
2006-01-21 22:01:15 +03:00
|
|
|
params: .PHONY .MAKE
|
2004-04-13 16:43:12 +04:00
|
|
|
${MAKEDIRTARGET} etc params
|