2001-11-13 06:17:12 +03:00
|
|
|
# $NetBSD: Makefile,v 1.153 2001/11/13 03:17:12 tv Exp $
|
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
|
|
|
|
# information, see http://www.netbsd.org/developers/releng/index.html
|
|
|
|
#
|
|
|
|
# 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.
|
1999-04-01 06:49:12 +04:00
|
|
|
# MKMAN, if set to `no', will prevent building of manual pages.
|
1999-11-30 20:48:11 +03:00
|
|
|
# MKOBJDIRS, if not set to `no', will build object directories at
|
|
|
|
# an appropriate point in a build.
|
1999-04-01 06:49:12 +04:00
|
|
|
# MKSHARE, if set to `no', will prevent building and installing
|
|
|
|
# anything in /usr/share.
|
1999-11-30 20:48:11 +03:00
|
|
|
# NBUILDJOBS is the number of jobs to start in parallel during a
|
2001-08-14 18:04:35 +04:00
|
|
|
# `make build'. It defaults to 1.
|
2001-06-10 17:15:29 +04:00
|
|
|
# UPDATE, if defined, will avoid a `make cleandir' at the start of
|
|
|
|
# `make build', as well as having the effects listed in
|
|
|
|
# /usr/share/mk/bsd.README.
|
|
|
|
# NOCLEANDIR, if defined, will avoid a `make cleandir' at the start
|
|
|
|
# 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
|
|
|
#
|
|
|
|
# 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:
|
|
|
|
# Builds a full release of NetBSD in DESTDIR. If BUILD_DONE is
|
2000-03-11 03:10:20 +03:00
|
|
|
# set, this is an empty target.
|
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:
|
|
|
|
# Does a `make build,' and then tars up the DESTDIR files
|
1999-04-01 06:49:12 +04:00
|
|
|
# into RELEASEDIR, 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.
|
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:
|
|
|
|
# obj: creates object directories.
|
|
|
|
# cleandir: cleans the tree.
|
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.
|
2001-10-24 07:21:20 +04:00
|
|
|
# do-lib-csu: builds and installs prerequisites from lib/csu.
|
|
|
|
# do-lib: builds and installs prerequisites from lib.
|
|
|
|
# do-gnu-lib: builds and installs prerequisites from gnu/lib.
|
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.
|
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
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
1993-03-22 11:43:59 +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.
|
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
|
|
|
|
|
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(NBUILDJOBS)
|
|
|
|
_J= -j${NBUILDJOBS}
|
|
|
|
.endif
|
1993-03-21 21:04:42 +03:00
|
|
|
|
2001-10-31 04:20:09 +03:00
|
|
|
_SUBDIR= tools lib include gnu bin games libexec sbin usr.bin \
|
2001-10-24 05:07:13 +04:00
|
|
|
usr.sbin share sys etc distrib regress
|
1996-08-11 03:29:00 +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
|
|
|
# Weed out directories that don't exist.
|
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}
|
|
|
|
.if exists(${dir}/Makefile)
|
|
|
|
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)
|
1993-05-22 11:15:13 +04:00
|
|
|
regression-tests:
|
|
|
|
@echo Running regression tests...
|
2001-11-13 02:16:17 +03:00
|
|
|
@(cd ${.CURDIR}/regress && ${MAKE} regress)
|
1994-06-14 08:40:29 +04:00
|
|
|
.endif
|
1994-02-07 08:08:57 +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
|
|
|
.if ${MKMAN} != "no"
|
|
|
|
afterinstall: whatis.db
|
1999-01-28 18:36:48 +03:00
|
|
|
whatis.db:
|
2001-11-13 02:16:17 +03:00
|
|
|
(cd ${.CURDIR}/share/man && ${MAKE} 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
|
1999-01-28 18:36:48 +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".
|
1999-02-11 17:49:49 +03:00
|
|
|
|
2001-11-01 19:30:53 +03:00
|
|
|
.if ${MKOBJDIRS} != "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
|
|
|
BUILDTARGETS+= obj
|
2001-06-10 17:02:54 +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(UPDATE) && !defined(NOCLEANDIR)
|
|
|
|
BUILDTARGETS+= cleandir
|
2001-09-22 16:30:13 +04:00
|
|
|
.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
|
2001-10-24 07:21:20 +04:00
|
|
|
BUILDTARGETS+= do-lib-csu do-lib do-gnu-lib do-build
|
2001-09-22 16:30:13 +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
|
|
|
# Enforce proper ordering of some rules.
|
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}
|
|
|
|
includes-lib: includes-include includes-sys
|
|
|
|
includes-gnu: includes-lib
|
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
|
|
|
# Build the system and install into DESTDIR.
|
2001-08-14 18:04:35 +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
|
|
|
build:
|
|
|
|
.if defined(BUILD_DONE)
|
|
|
|
@echo "Build already installed into ${DESTDIR}"
|
|
|
|
.else
|
|
|
|
@echo -n "Build started at: " && date
|
2001-10-30 20:59:10 +03:00
|
|
|
.for tgt in ${BUILDTARGETS}
|
2001-11-13 06:17:12 +03:00
|
|
|
(cd ${.CURDIR} && ${MAKE} ${_J} ${tgt})
|
2001-10-30 20:59:10 +03:00
|
|
|
.endfor
|
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
|
|
|
@echo -n "Build finished at: " && date
|
1997-03-25 01:22:15 +03:00
|
|
|
.endif
|
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
|
|
|
# Build a release or snapshot (implies "make build").
|
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
|
|
|
release snapshot: build
|
2001-11-13 02:16:17 +03:00
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release)
|
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
|
|
|
# Special components of the "make build" process.
|
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
|
|
|
do-distrib-dirs:
|
2001-10-31 22:41:54 +03:00
|
|
|
.if !defined(DESTDIR) || ${DESTDIR} == ""
|
2001-11-13 02:16:17 +03:00
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs)
|
2001-10-31 22:41:54 +03:00
|
|
|
.else
|
2001-11-13 02:16:17 +03:00
|
|
|
(cd ${.CURDIR}/etc && ${MAKE} DESTDIR=${DESTDIR} distrib-dirs)
|
2001-10-31 22:41:54 +03:00
|
|
|
.endif
|
2001-06-10 17:02:54 +04:00
|
|
|
|
2001-11-13 02:16:17 +03:00
|
|
|
.for dir in tools lib/csu lib gnu/lib
|
2001-10-24 07:21:20 +04:00
|
|
|
do-${dir:S/\//-/}:
|
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
|
2001-11-13 02:16:17 +03:00
|
|
|
(cd ${.CURDIR}/${dir} && ${MAKE} ${_J} MKSHARE=no MKLINT=no ${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
|
|
|
|
|
|
|
do-build:
|
2001-11-13 06:17:12 +03:00
|
|
|
(cd ${.CURDIR} && ${MAKE} ${_J} dependall)
|
|
|
|
(cd ${.CURDIR} && ${MAKE} ${_J} install)
|
1994-02-07 08:08:57 +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.)
|
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
|
|
|
|
includes-${dir}:
|
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
.for dir in etc distrib regress
|
|
|
|
install-${dir}:
|
|
|
|
@true
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
# XXX this needs to change when distrib Makefiles are recursion compliant
|
|
|
|
dependall-distrib depend-distrib all-distrib:
|
2001-10-13 01:05:08 +04:00
|
|
|
@true
|
2001-09-22 01:01:13 +04:00
|
|
|
|
2001-11-12 01:40:42 +03:00
|
|
|
.include <bsd.obj.mk>
|
2001-10-31 04:20:09 +03:00
|
|
|
.include <bsd.subdir.mk>
|
2001-10-29 22:48:35 +03:00
|
|
|
|
2001-11-01 19:34:21 +03:00
|
|
|
build-docs: ${.CURDIR}/BUILDING
|
|
|
|
${.CURDIR}/BUILDING: BUILDING.mdoc
|
|
|
|
groff -mdoc -Tascii -P-b -P-u -P-o $> >$@
|