History log of /freebsd-10.0-release/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 255784 22-Sep-2013 andrew

Remove the armv6eb architecture as it is unused, and almost certainly
broken. None of our kernels can boot armv6eb. The little-endian kernels do
not have the required code to be able to switch endian when running a
big-endian executable.

Approved by: re (gjb)


# 255713 19-Sep-2013 emaste

Further refinement to bmake bootstrapping

Include PROGNAME and DESTDIR in ${MMAKE} so that it doesn't need to be
passed to each make invocation.

Suggested by: hrs
Reviewed by: hrs
Approved by: re (gjb)


# 255484 11-Sep-2013 emaste

Fix make bootstrapping with WITH_DEBUG_FILES=

A HEAD buildworld on 9.x first bootstraps bmake, but this failed when
building with standalone debug. Pass in the PROGNAME override to the
'make all' stage as well as 'make install' so that the .debug file is
created with the correct name.

Reviewed by: sjg
Sponsored by: The FreeBSD Foundation
Approved by: re (rodrigc)


# 255286 06-Sep-2013 sjg

During universe/tinderbox export MAKE_JOB_ERROR_TOKEN=no
This avoids aborting everything when one kernel fails.

Reviewed by: obrien


# 254437 17-Aug-2013 sjg

Don't let user specified DESTDIR, break building our chosen make.


# 254417 16-Aug-2013 sjg

When we need to build using the in-tree make,
switch at the earliest opportunity.
In the case of fmake vs bmake, this helps ensure correct load handling.

Reviewed by: obrien


# 253616 24-Jul-2013 sjg

Fix bug in universe where if upgrade_checks wants a new make,
it gets built 16 times in parallel in the same location.
While we are at it, until we finish getting rid of fmake,
be explicit about the make we want to use, thus avoid the problem
of the temp make being the wrong version.

Reviewed by: obrien


# 253003 07-Jul-2013 alfred

Correct typo specifying jflags.


# 253002 07-Jul-2013 alfred

Document tip on how to build all kernels quickly.


# 251750 14-Jun-2013 sjg

Flag recursive make targets with .MAKE
so that job token pipe is passed to them.
To avoid surprising anyone, only add .MAKE to ${TGTS} when -n
has not been specified (at least for Makefile).

Reviewed by: obrien


# 251352 03-Jun-2013 sjg

bmake does not like universe_${target}_prologue in the .ORDER
when there is an explicit dependency for it anyway.
Remove it so both bmake and fmake do the same thing.

Reviewed by: OBrien


# 251107 29-May-2013 crees

Make the instruction order for buildworld agree with UPDATING and the
Handbook.

Reviewed by: imp, bdrewery, netchild
Approved by: gjb (mentor)


# 250719 16-May-2013 sjg

Reverse the sense of the test wrt bmake, and guard against
MK_BMAKE not being defined.


# 249395 11-Apr-2013 sjg

If doing buildworld -DWITH_BMAKE make sure bmake does the build.


# 249316 09-Apr-2013 dim

Ensure make -j N universe works correctly, by checking for an up-to-date
make before starting the universe targets themselves. Otherwise, all of
the targets would attempt to build make simultaneously, overwriting each
other's copies of the make object files and executable. This could lead
to strange errors, for example when partially-written make executables
are invoked.

Also amend r216620, to make the rest of universe wait properly until the
upgrade_checks target is finished, by adding universe_${target}_prologue
to the .ORDER target. Otherwise, make will be too smart for its own
good, and start building the universe targets simultaneously with the
prologues anyway.

MFC after: 1 week


# 248937 31-Mar-2013 andrew

When building universe ensure the required worlds are finished before
starting the kernels. Before this the kernels would be built as part of the
last architecture universe target. There can cause problems when this world
finishes before the other worlds as the host compiler may be picked up
rather than the target compiler.

The solution is to add a target to build the universe kernels that depends
on all the world targets finishing. As we may not be building a world only
depend on it when MAKE_JUST_KERNELS is undefined.


# 242522 03-Nov-2012 marcel

Add the buildLINT convenience target, handy for build automation.
The automation can set TARGET_ARCH and TARGET and then make various
top-level targets, including buildLINT and buildkernel (with
KERNCONF=LINT). Previously there was no way to generate the LINT
kernel configuration without having to do something exceptionally
painful.


# 241298 06-Oct-2012 marcel

Add support for bmake. This includes:
1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
there's a bootstrap complication in ths respect. Avoid it. Make the
necessary changes to have upgrade_checks work wth bmake anyway.
2. Remove the use of -E. It's not needed in our build because we use ?= for
the respective variables, which means that we'll take the environment
value (if any) anyway.
3. Properly declare phony targets as phony as bmake is a lot smarter (and
thus agressive) about build avoidance.
4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
smarter about build avoidance and should not find files we generate in
the source tree. We should not have files in the repository we want to
generate, but this is an easier way to cross this hurdle.
5. Have behavior under bmake the same as it is under make with respect to
halting when sub-commands fail. Add "set -e" to compound commands so
that bmake is informed when sub-commands fail.
6. Make sure crunchgen uses the same make as the rest of the build. This
is important when the make utility isn't called make (but bmake for
example).
7. While here, add support for using MAKEOBJDIR to set the object tree
location. It's the second alternative bmake looks for when determining
the actual object directory (= .OBJDIR).

Submitted by: Simon Gerraty <sjg@juniper.net>
Submitted by: John Van Horne <jvanhorne@juniper.net>


# 240403 12-Sep-2012 obrien

Not all Pmake derivatives silently handle empty shell output, so ensure there
is something for make(1) to consume. Bmake gives output such as:
"warning: Couldn't read shell's output for "/bin/sh -c true"
Note we parted from traditional Pmake behavior in r18864 / r18255.


# 239272 15-Aug-2012 gonzo

Merging of projects/armv6, part 3

r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions. In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
* GCC to default to arm1176jz-s
* GCC to predefine __FreeBSD_ARCH_armv6__
* gas to default to ARM_ARCH_V6K
* uname -p to return 'armv6'
* make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by: Tim Kientzle <kientzle@freebsd.org>


# 238051 03-Jul-2012 obrien

Add "hier" as an alternate spelling of "hierarchy" to match hier(9).


# 233644 29-Mar-2012 jmallett

Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software. MIPS builds which are little-endian
should require and exhibit no changes. Big-endian TARGET_ARCHes must be
changed:
From: To:
mipseb mips
mipsn32eb mipsn32
mips64eb mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.


# 232907 12-Mar-2012 jmallett

Add a kernel-toolchains target like the toolchains target, but building only
the parts of the toolchain necessary to build kernels.


# 231821 16-Feb-2012 pluknet

delete-old does not have delete-old-libs dependency.
Reflect this in the comment.

PR: conf/163993
Submitted by: Eugen Konkov <kes-kes at yandex ru>
MFC after: 3 days


# 227771 20-Nov-2011 gjb

Replace 'chflags' with 'file flags' in a comment, since 'chflags'
is a command, not a flag itself.

While here, wrap a line for readability.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: 227769, 227770


# 227770 20-Nov-2011 gjb

Fix the note in r227769 to be less specific to the immutable flag.

Submitted by: arundel
MFC after: 3 days
X-MFC-With: r227769


# 227769 20-Nov-2011 gjb

Add a note to src/Makefile that explains that 'rm' runs twice because the
second invocation only needs to operate on files with the immutable flag
set.

Submitted by: arundel (via private email) (original version)
Discussed on: -toolchain@
MFC after: 3 days


# 223148 16-Jun-2011 ru

It's a bit odd, but "make update" in src/ can also update the ports/,
doc/, and now www/ trees, but only using the "cvsup" transport.

When "make update" is run using a tree's makefile, it can also use
"cvs" (except for www/) and "svn" (only src/).

Clean up documentation and code regarding "make update":

- Increase oddness by adding support for WWWSUPFILE and NO_WWWUPDATE to
Makefile.inc1 (analogous to PORTSSUPFILE/NO_PORTSUPDATE and
DOCSUPFILE/NO_DOCUPDATE; WWWSUPFILE already supported by www/Makefile).

- Document all trees that support CVS_UPDATE.

- Document all trees that support SUP_UPDATE.

- Document SVN_UPDATE.

- Document NO_WWWUPDATE.

- make.conf(5) mistakenly said that *SUPFILE* had defaults.

- Add an example entry for WWWSUPFILE.


# 221869 14-May-2011 attilio

Disconnect sun4v architecture from the three.

Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by: marius
Tested by: sbruno
Approved by: re


# 221216 29-Apr-2011 jhb

Add the mipsn32eb TARGET_ARCH to the list of mips targets for the
XLRN32 kernel config.

Reviewed by: imp, jmallet


# 220556 12-Apr-2011 bz

If building (custom) FreeBSD images people tend to patch param.h. In case
this happens just before the build is started (within the same second)
CHECK_TIME actually triggers thinking param.h is in the future (see f_Xtime,
c_Xtime logi in find(1) sources for the details in !F_EXACTTIME case).
Using the -mtime -0s (seconds, rather than no unit) avoids this 1s race.

Submitted by: ed (2009-05-03)
Reviewed by: cperciva (2009-05-03), emaste
Tested by: bz (for almost two years)
MFC after: 4 days


# 220512 10-Apr-2011 dougb

Update recommendation for mergemaster. The -a and -i options are exclusive.

PR: docs/156271
Submitted by: Fedor Dikarev <fedor.dikarev@gmail.com>


# 219177 02-Mar-2011 nwhitehorn

Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without
preparing its environment first and installs games into its distribution
using the regular make distribute logic instead of post-processing with
a script.

Also add two new targets, packageworld and packagekernel, that tar up the
results of distributeworld and distributekernel (also new), respectively.


# 219137 01-Mar-2011 jhb

Fully honor KERNSRCDIR for 'make universe' if it is set.

MFC after: 1 week


# 218524 10-Feb-2011 jhb

- Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set,
then that target is invoked for each architecture rather than the
default action of building world and kernels for each architecture.
- Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build
toolchains for all architectures.
- Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for
'make universe'.

Reviewed by: bz
MFC after: 1 week


# 218206 02-Feb-2011 imp

Setting TARGET and TARGET_ARCH needs to be done in _MAKE, not in the
TGTS rule as _MAKE is used elsewhere. This should fix make world.


# 218130 31-Jan-2011 imp

Move the architecture guessing from Makefile.inc1 to Makefile. We
need to do this because variables specified on the command line
override those specified in the Makefile. This is why we also moved
from TARGET to _TARGET in Makefile, and then set TARGET on the command
line when we fork a submake with Makefile.inc1.

This makes mips/mips work again, even without the workaround committed to
lib/libc/Makefile.


# 217815 25-Jan-2011 bz

Back out r217734. [1]

Properly document what `make targets` is supposed to list to avoid
further confusion given the place the target sits. Should have happened
with r217125.

Requested by: imp [1]
Reviewed by: rwatson


# 217754 23-Jan-2011 bz

For `make tinderbox` there is no need to print the extra commands.

MFC after: 5 days


# 217735 22-Jan-2011 bz

Make `make tinderbox` work with MAKEOBJDIRPREFIX set (or in possibly other
combinations) by forcing FAILFILE into .CURDIR as we do for all other
universe output files. [1] Similarly make FAILFILE start with "_." as well.

Reviewed by: silence-on-src [1]
MFC after: 6 days


# 217734 22-Jan-2011 bz

In `make targets` print the make variable TARGETS as we expect it rather
than the grammatically better sounding variant without the 'S'. This
allows copy and paste and is less confusing.


# 217733 22-Jan-2011 bz

Properly document what the top-level `make tinderbox` does.

Reviewed by: jmallett
MFC After: 3 days
X-MFC: build.7 only


# 217297 12-Jan-2011 imp

Provide up-to-date estimates that are pessimal today...


# 217294 11-Jan-2011 imp

Proving once again, I can't typo: fix a type.


# 217273 11-Jan-2011 imp

Minor improvements in the wording of a comment. Document tinderbox target.


# 217125 07-Jan-2011 imp

make targets

This produces a list of currently supported targets. Here "supported"
means "built in make universe" on the theory that those targets are
more supported than any that might work in 'make buildworld TARGET=x
TARGET_ARCH=y' since the latter are less tested.

Suggested by: rwatson


# 217123 07-Jan-2011 imp

Retire TARGET_ABI.

Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could. Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.


# 216934 03-Jan-2011 imp

When TARGET_ARCH_${kernel} gets set, it is using the host's config,
not the one we build as part of make world. This means that make
universe will fail if building on a too-old current or any stable
system prior to a few days ago in weird ways (parse errors from
shell). This copes with these old systems in two ways:

(1) Works around the WARNING: issue by filtering all warnings that
sneak onto stdout.

(2) if TARGET_ARCH_${kernel} winds up being empty, then we error out
immediately with a semi-useful error message. This usually comes from
config not groking -m.

Ideally, we'd use a buildworld's config here, but that's tricky, so
I'll leave that detail to others to fix (it has to be done post make
world for the arch rather than at the top level makefile). This
should make 'make universe' usable from recent 8-stable systems
(recent == last few months or so) for building -current. They have
-m, but spewed warnings out stdout. Older systems will now at least
get a firm error early rather than a confusing error late.


# 216685 24-Dec-2010 imp

Redirect stderr from config to /dev/null. config -m is printing lots
of annoying warnings when dealing with arm. The arm config files need
to be fixed, but this restricts the output to a more useful place.


# 216520 18-Dec-2010 nwhitehorn

Reconnect arm to the universe build, and connect big-endian MIPS and ARM
and powerpc64 to universe for the first time. In general, provide
(slightly hacky) knowledge of multi-architecture TARGETs to universe as
well as the ability to distinguish the correct toolchain for a given
kernel using config -m.


# 216487 16-Dec-2010 jhb

Pass JFLAG as JFLAG from tinderbox to universe. This gives the same
semantics for JFLAG with tinderbox as for universe. Previously doing
'make JFLAG=-j4 tinderbox' was equivalent to 'make -j4 universe'
(i.e. 4 worlds in parallel) rather than 'make JFLAG=-j4 universe'
(i.e. worlds in sequence, each built with -j4).

MFC after: 1 month


# 215271 13-Nov-2010 imp

Add mips back to universe


# 215082 10-Nov-2010 imp

Complete the integration of tbemd branch into head.

TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming. Any remaining rough edges
will be hammered out in -current.


# 209128 13-Jun-2010 raj

Connect FDT infrastructure to the build system.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation


# 205290 18-Mar-2010 dougb

For those of us mere mortals who do not aspire to the lofty heights
of kernel hackery, add MAKE_JUST_WORLDS so that we can take part in
the 'make universe' goodnes without using unecessary time and resources.


# 204661 03-Mar-2010 imp

Give make kernel-toolchain a one-liner here. Although documented in
build(7), many people look here for a quick reminder...


# 202629 19-Jan-2010 ed

Back out the change to Makefile made in r202628.

It was just a local modification to build the i386 and amd64 more
quickly.


# 202628 19-Jan-2010 ed

Recommit r193732:

Remove __gnu89_inline.

Now that we use C99 almost everywhere, just use C99-style in the pmap
code. Since the pmap code is the only consumer of __gnu89_inline, remove
it from cdefs.h as well. Because the flag was only introduced 17 months
ago, I don't expect any problems.

Reviewed by: alc

It was backed out, because it prevented us from building kernels using a
7.x compiler. Now that most people use 8.x, there is nothing that holds
us back. Even if people run 7.x, they should be able to build a kernel
if they run `make kernel-toolchain' or `make buildworld' first.


# 202095 11-Jan-2010 bz

Rather than using an extra variable, only call uname if really needed and
then directly assign the result.

Submitted by: jmallett
MFC after: 24 days
X-MFC with: r201815


# 201960 09-Jan-2010 bz

Use uname -m [1] and rename BUILD_ARCH to XMACHINE[2].

Submitted by: nyan[1], imp[2]
MFC after: 27 days
X-MFC with: r201815


# 201815 08-Jan-2010 bz

To avoid hardcoding further kernel configuration names for
make universe, split the logic into two parts:
- 1st to build worlds and generate kernel configs like LINT.
- 2nd to build kernels for a given TARGET architecture correctly
finding all newly generated configs, not knowing anything about
LINT anymore. (*)

(*) If you know better/cleaner/... ways to do this, let me know.

Discussed on/with: arch, jhb, rwatson
MFC after: 1 month


# 190628 01-Apr-2009 bz

Add a new world named 'mips' to our universe.

Discussed with: imp


# 189760 13-Mar-2009 imp

Implement the xdev target. When you define XDEV=arch XDEV_ARCH=arch,
you can build the cross development tools and install them as
$XDEV-freebsd-xxx for each tool. This allows one to use autoconf to
find the tools for cross building scenarios.


# 186519 27-Dec-2008 bz

Permit digits at the beginning and end of kernel config file names for
`make universe'. This catches a few more arm and, once enabled, mips
configs and permits having local configs named like NOINET6.

Reviewed by: phk
MFC after: 4 weeks


# 185499 30-Nov-2008 alfred

Provide a 'tinderbox' target that compiles enough of FreeBSD that
a developer can rest reasonably assured that the tinderbox will not
be broken. This target leverages most of 'universe' but will exit
non-zero and output a summary at the end.

"make tinderbox"


# 185250 24-Nov-2008 des

Change the universe target to warn the user for every world or kernel that
fails. The error message includes a reference to the relevant log file.

Approved by: phk
MFC after: 1 week


# 179845 17-Jun-2008 bz

Back out rev. 1.352 (SVN rev 179842) as phk pointed out that
SRCCONF was omitted here to be able to build non standard trees
with universe as well.


# 179842 17-Jun-2008 bz

For make universe, in addition to make.conf, also ignore a
src.conf with possibe non-default options.

Reviewed by: ru
MFC after: 10 days


# 179309 25-May-2008 jb

Backout the change to remove sun4v.

Note that sun4v is currently broken on T2000 hardware so it's pretty
much a lame duck at this point.


# 179299 25-May-2008 jb

Remove sun4v from the list of arches in 'make universe'. There has been
no active development on it for over a year now and it isn't
reliable under a simple buildworld. Developers can't be expected to
test code targeted for it.


# 179232 23-May-2008 jb

Add a knob to allow just the kernels to be built during a 'make universe'.
This is useful when wanting to retry a broken build using NOCLEAN and the
buildworlds are known to have completed.


# 178653 29-Apr-2008 rwatson

Mention -U and -ai arguments to mergemaster in a comment for the
general mergemaster line.

MFC after: 3 days
Suggested by: Ben Laurie


# 177794 31-Mar-2008 pav

Double up the necessary size of /usr/obj to 800MB

PR: misc/99735
Reported by: Philip M. Gollucci <pgollucci@p6m7g8.com>,
Maxim Konovalov <maxim@macomnet.ru>


# 177609 25-Mar-2008 ru

Add code that should catch the most common case when date/time is
set incorrectly.


# 175833 30-Jan-2008 jhb

Add a note pointing to build(7) for more info.

MFC after: 1 week
Reviewed by: ru


# 174564 12-Dec-2007 imp

We don't need to invent BSDMAKE. ${MAKE} is sufficient.

Submitted by: jmallet@


# 174539 11-Dec-2007 imp

Don't assume that make(1) is a bsd-like make program. It might not be. This
only matters in the early stages of bootstrapping, of course, but gnu make can't
handle bsd make Makefiles at all if they use any of the 'dot' directives, which
src/Makefile has in abudnance.


# 172744 18-Oct-2007 delphij

Do not bail out for cleanworld target just because
chflags is failed.


# 169597 16-May-2007 des

Expose all of {check,delete}-old{,-dirs,-files,-libs}.

MFC after: 3 weeks


# 168280 02-Apr-2007 marcel

Introduce a variable TARGETS that can be set on the make command line
and that controls which platforms are being built as part of a "make
universe". By default TARGETS is set to the 8 platforms currently
being built. This variable is useful for running or re-running a
"make universe" with only a selected set of platforms. This makes the
universe target slightly more useful in cases the universe is limited
to a developer's scope or objectives. For example, when a universe
failed for a particular platform and fixes need to be tested for that
particular platform then a developer can restart the universe for
only that platform, even if the initial universe is still building
other platforms.


# 164709 27-Nov-2006 ru

Add arm to universe.


# 164470 21-Nov-2006 jb

Remove the NO_CTF option. It would have been required to support
DTrace.


# 163862 01-Nov-2006 jb

When building an upgraded make, don't worry about processing it for
use with DTrace because the normal buildworld will do that when the
tools are built.


# 163447 16-Oct-2006 jb

Add sun4v to the 'universe'.


# 162147 08-Sep-2006 ru

In "make universe", utilize simplified cross-build synopsis,
"make TARGET=<machine> build*", now that it actually works.

Prompted by: imp


# 159862 22-Jun-2006 imp

Per weak consensus on this topic, remove suggestion to set
HISTORICAL_MAKE_WORLD from the text that's output. This was committed
against the previous consensus. Leave the documentation in this file
as a compromose. The HISTORICAL_MAKE_WORLD knob is intentionally
obfuscated and we only trust people smart enough to read the Makefile
to use it. All others have no business using it due to its danger,
unless DESTDIR is set.

Dissentors: grog, obrien, trhodes


# 159831 21-Jun-2006 obrien

Note a short-cut in the build procedure.


# 159363 07-Jun-2006 trhodes

Simply running ``make world'' will bomb unless you dig up the
undocumented HISTORICAL_MAKE_WORLD variable and set it. Note it
here so the blow up will not really be a surprise to people who
read.

Link the buildingworld chapter of our handbook in the README
while I'm here.


# 159349 06-Jun-2006 imp

Create a new target 'buildenvvars'. This target reports the build
environment for cross building (the same one you'd get interactively
in make buildenv). This cannot be a simple

make -f Makefile.inc1 -V WMAKEENV

because in PATH is not set correctly unless one takes a trip through
the Makefile/Makefile.inc1 indirection, the logic of which is too
large to reproduce outside of Makefiles.


# 158962 26-May-2006 netchild

Connect the kernel subsystem API documentation generation framework to
the build infrastructure: "make doxygen"

Changes to the man pages will be made when some defaults are revisited.

Requested by: gnn


# 158453 11-May-2006 jhb

Disconnect Alpha from 'make universe'.


# 156840 18-Mar-2006 ru

Add the new "showconfig" target that displays build configuration.

Suggested by: phk


# 156740 15-Mar-2006 ru

Make ${SUBDIR_TARGETS} work at the uppermost level as well.


# 156145 01-Mar-2006 yar

Do not discard the current value of __MAKE_CONF when testing
whether MAKEOBJDIRPREFIX is set at a wrong place.

Reviewed by: ru
MFC after: 3 days


# 152880 28-Nov-2005 ru

Fix a bug in previous revision: skip LINT if it exists, not NOTES
(the source for LINT), as I initially intended.


# 152879 28-Nov-2005 ru

universe: don't attempt to compile DEFAULTS and don't compile LINT twice.


# 148545 29-Jul-2005 netchild

Forced commit [1] to add another design goal which I forgot to mention in
the initial commit of the delete-old feature:

One of the design goals of the recently committed way of removing obsolete
files was to *not* remove a file which we never had in the base system (I'm
not sure I mentioned this in the commit log). So if an administrator decides
to move something to somewhere in the base system (for whatever reason), it
will stay where it is (and this is good, since this move was done with a
specific purpose).

Suggested by: Jeremie Le Hen <jeremie@le-hen.org> [1]
Approved by: mentor (joerg; implicit)


# 148330 23-Jul-2005 netchild

Add delete-old and delete-old-libs targets:
- removes obsolete files/dirs or libraries.
- works in interactive (default) and batch mode
- respects DISTDIR
- documented in UPDATING and build(7)

The head of the file ObsoleteFiles.inc contains instructions how to add
obsolete files/dirs/libs to the list. Obviously one should add obsolete
files to this list, when he removes a file/dir/lib from the basesystem.

Additionally add check-old target:
- allows re@ to check if a file on the obsolete list resurfaces

Design goals:
- allows full control by the user (default interactive mode)
- possibility of scripted removal of obsolete files (batch mode)
- opt-in removal of files (explicit list of files)
- seperate removal of libs (2 delete targets)

Important design decissions:
- structured list of files to remove instead of a plain text file:
* allows to remove additional files if a NO_foo knob is specified
without the need to change the targets (no NO_foo knob is respected
yet)
- not using mtree like NetBSD does:
* mtree doesn't has an interactive mode

Discussed on: arch (long ago), current (this year)
Additional input from: re (hrs)
Approved by: mentor (joerg)


# 148154 19-Jul-2005 ru

- Embed the "buildkernels" target into the "universe" target so that
the "make -n universe" output looks more builder (human) friendly.

- Wrap the "universe" target into a ".if make(universe)"; it's only
intended to be called directly so it should be safe to do it.


# 148051 15-Jul-2005 ru

Make the `distrib-dirs' target official and working properly
when cross-building (installing). (This is useful for NFS
installing world/kernel to another architecture machine.)


# 147425 16-Jun-2005 ru

Provide 32-bit runtime support on amd64 as a separate distribution, lib32.

Prodded by: obrien
Nodded by: peter
Approved by: re


# 143032 02-Mar-2005 harti

Repo-copy tools/regression/usr.bin/make to tools/build/make_check
and adjust the path in the Makefile for the upgrade_checks target.
These checks are really feature upgrade checks that should be fast
and just find out whether we need to build a new make before
proceeding with other targets like buildworld. This makes the
place free for a real regression test suite in the old place.


# 142644 27-Feb-2005 ru

Added the convenience "distribution" target which calls the
target of the same name from src/etc/Makefile with a proper
environment, suitable to be used during upgrades and cross-
builds.


# 142585 26-Feb-2005 ru

Added the "buildenv" target, for developers only!

CAVEAT: if you run tcsh(1) from within this target, this will
reset your PATH making this target mostly useless. Careful!

Submitted by: jmg, ru


# 139112 21-Dec-2004 ru

NOSHARED -> NO_SHARED


# 139103 21-Dec-2004 ru

Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by: core


# 138921 16-Dec-2004 ru

Previous revision didn't fix all cases. For example,
testing for variables that are always defined (e.g.,
"make -V CC") would still print a false warning. Fix
this by only passing a submake the MAKEOBJDIRPREFIX=*
argument if it was present. As a result, we loose
the check for -DMAKEOBJDIRPREFIX, or an esoteric
"MAKEOBJDIRPREFIX = foo" (with embedded spaces), but
these are unorthodox enough to not care about them.

The make(1) bug mentioned in the previous revision
was just fixed in make/main.c,v 1.109.


# 138768 12-Dec-2004 marcel

Unbreak the MAKEOBJDIRPREFIX variable check by avoiding bugs in make(1).
When make flags are passed to make in the environment, the string is
chopped up in an (argc,argv) vector. This happens in brk_string() and
the chopped up string is stored in static buffer. When this includes
something like "-V BINMAKE", then a pointer into the static buffer is
put on the variables list for evaluation later. However, brk_string()
is used for more than just chopping up the MAKEFLAGS env. variable, so
it's very likely that the static buffer is clobbered. In fact, this is
exactly what happens.
The result is that _MAKEOBJDIRPREFIX gets assigned whatever garbage
the child make happens to emit, causing the test to fail. Like this:

pluto2% cd /usr/src
pluto2% make -V BINMAKE
"/q/6.x/src/Makefile", line 94: MAKEOBJDIRPREFIX can only be set in environment, not as a global (in /etc/make.conf) or command-line variable.
pluto2% make -dv -V BINMAKE | & grep _MAKEOBJDIRPREFIX
Global:_MAKEOBJDIRPREFIX = }

The fix is to not use MAKEFLAGS for this, but simple pass the flags
as arguments. Ideally make(1) should be fixed but that's beyond the
scope of my attention span.

This fixes release.


# 138515 07-Dec-2004 harti

Fix builds with a read-only directory and a make upgrade. This is done
by forcing the creation of an object directory for the make regression
tests. Let make handle the tracking of the dependency and installation
of test_shell script.

Submitted by: ru


# 137288 06-Nov-2004 peter

Convert tools/lib32/build.sh into world connectable hooks. This still
rates pretty high on the "hack!" scale, but it works for me. Adding
-DWANT_LIB32 to the world build command line, or 'WANT_LIB32=yes' to
/etc/make.conf will include the 32 bit libraries with the build.

I have not made this default behavior. Cross compiling this stuff is an
adventure I have not investigated.

This is still a WIP. We needed this at work so that we could install from
a readonly obj tree - lib32/build.sh wasn't up to that.


# 136671 18-Oct-2004 ru

Fixed MAKEOBJDIRPREFIX variable type check in case the env(1)
binary is not in PATH, as is the case with installworld, etc.


# 133945 18-Aug-2004 ru

My take at improving the universe: allow the worlds to be
built in parallel. Examples:

make universe
Build worlds sequentially, each world sequentially.

make universe JFLAG=-j4
Build worlds sequentially, each world in parallel.

make -j4 universe
make -j4 universe JFLAG=-j2
Build four worlds in parallel, each world will be
built in parallel too. World parallelization is
set to four in the first synopsis, and to two in
the second.

make -j4 universe JFLAG=-B
Build worlds in parallel, each world sequentially.

("world" == buildworld followed by buildkernels.)

Prayers: obrien, phk


# 133942 18-Aug-2004 ru

Moved the MAKEOBJDIRPREFIX check from Makefile.inc1 to Makefile,
to suppress warnings with installworld and distributeworld when
env(1) cannot be found in the PATH.


# 133376 09-Aug-2004 harti

Make make recurse into sub-directories and sub-makes when given
two -n flags. If only one -n flag is given the old behaviour
is retained (POLA). In order to make this working for installworld
change the IMAKEENV in this case so that the tools are found
(we have no temporary installation environment in this case).

Submitted by: ru (IMAKEENV part)


# 132588 23-Jul-2004 kensmith

The doc team reworked the section of the handbook describing how to
rebuild things, further discouraging 'make world'. The title of
that section is now changed...


# 132358 18-Jul-2004 markm

Rename a preposterously long name with one that might look a bit
more professional. While here, write a few lines of explanatory
text to explain what its for.

Discussed with: rwatson
With hat: core


# 132324 17-Jul-2004 obrien

Add an "out" to the now required BS of defining DESTDIR.


# 132312 17-Jul-2004 marcel

Properly terminate a quoted string in the previous commit. Oddly
enough this only seems to cause problems with -jX so went unnoticed
until now.


# 132234 16-Jul-2004 marcel

As per discussions on current@, protect unsuspecting users from
trying to upgrade their system with make world instead of following
the preferred and suggested sequence of commands. The fact remains
that make world does not upgrade the kernel.
Allow make world when DESTDIR has been specified, including when
DESTDIR specifies the root file system. Otherwise, print a useful
warning and fail.

Reviewed, tested and scrutinized by: gad@


# 131876 09-Jul-2004 phk

Add a JFLAG which can be used to speed up universe:
make universe JFLAG=-j12


# 128189 13-Apr-2004 des

Add a kernel-toolchain target which only builds the bits required to build
a kernel. This is essentially the same as the toolchain target, except
that it does not build headers and libraries.

Submitted by: ru


# 127360 24-Mar-2004 ru

Added the `toolchain' top-level target, which builds enough of
buildworld, up to and including libraries, except for actually
building the world.

Requested by: many


# 126485 02-Mar-2004 ru

Protect shell expansions.


# 126403 29-Feb-2004 johan

Add amd64 to universe.

Approved by: peter


# 126031 20-Feb-2004 gad

Change the 'realclean' target name to be 'cleanworld', to match other
targets like buildworld, installworld.

Suggested by: obrien


# 126024 19-Feb-2004 gad

Improvements on the 'make realclean' target. Some are style improvements,
but the biggest issue is that there are situatons when
${.OBJDIR} == ${.SRCDIR}, and in those situations the previous version
would happily remove all your /usr/src while it was cleaning out the objects.
Not that *you* would be happy about it... Thanks to bde for immediately
noticing this serious possibility.

More improvements will be made to this target, but I wanted to commit this
safer version right now, before anyone lost their /usr/src due to it.

Reviewed by: bde
MFC after: 10 days


# 125885 16-Feb-2004 gad

Add a 'realclean' target, which simply and quickly removes everything
that was built in previous 'make buildworld' and 'make buildkernel'. The
target knows enough to run a 'chflags -R 0' and a second 'rm' if the first
'rm' ran into any errors while removing files.

Suggested by: email with Richard Coleman Re: upcoming 64b-time_t changes.
Reviewed by: imp, marcel, and others on -hackers
MFC after: 1 week


# 123311 09-Dec-2003 peter

Put on some factor 30+ bikeshed repellent and export the internal
Makefile.inc1 underscore targets with a big warning that they are
intentionally undocumented, subject to change without notice and
might poison your dog etc. If you don't know what they are, then they
are not meant for you to use.

I've added these by hand to so many many trees that I've lost count. I
find them rather useful.


# 122204 07-Nov-2003 kris

Don't allow the 'make' target (which rebuilds make for bootstrapping)
to become confused by a file called 'make' in /usr/src

Submitted by: ru


# 120760 04-Oct-2003 ru

Retired the "most" and "installmost" targets -- they just
do not have a chance to work nowadays as we have a lot of
internal libraries in lib/.

Discussed with: marcel, wollman


# 119579 30-Aug-2003 ru

Cosmetics: folded BITGTS into TGTS.


# 119519 28-Aug-2003 marcel

Limit testing for an up-to-date version of make(1) to the world and
buildworld targets by default, but allow it to be done for all user
targets by introducing a boolean option, named ALWAYS_CHECK_MAKE.

This change is by no means perfect and I don't even want to claim
this to be a solution. It does however address the fact that not
everybody likes to see make(1) rebuilt simply because the regression
test failed for some reason or other, including pilot error. It
therefore serves the purpose of keeping the crowd happy until we
have something better or simply reached a compromise.

The reasons for changing the default behaviour are:
o It avoids a negative, possibly non-intuitive option,
o It's according to POLA and fond of feet,
o Only buildworld is documented to do its best to be
successful at reasonably cost.

Reviewed by: gad, imp, obrien, peter


# 118531 06-Aug-2003 ru

- Don't print "elf" before printing "make world" (aout support has been
removed).

- Avoid using printf(1) where a simple shell's built-in echo is enough.


# 117806 20-Jul-2003 ru

The `mk' target is long dead.


# 117793 19-Jul-2003 ru

Use an up-to-date make binary in the upgrade_checks target if
one is already available. This avoids sometimes unnecessary
step of attempting to rebuild the make binary again which may
fail at all if, for example, one has removed his /usr/include
before doing an installworld (to keep /usr/include tidied up).

Pointed out by: kris, marcel


# 117234 04-Jul-2003 ru

Don't hardcore PATH into BINMAKE; the latter should only be
comprised of the path to a make(1) binary (possibly the one
built by the "make" target in this Makefile), and a path to
a fresh share/mk. The idea is to allow "make release" pick
up the right "make" binary, if one exists.

This fixes release.5 I broke with the last commit here; the
second PATH here was overriding the right one from WMAKEENV
while rebuilding the "build-tools" for crunched binaries.


# 117229 04-Jul-2003 ru

Fixed style bugs related to parentheses in Makefile.inc1.

Submitted by: bde

Fixed nearby bug: propagate the root Makefile's idea of
the appropriate "make" binary down to release/Makefile.


# 116696 22-Jun-2003 ru

Do the upgrade checks quietly.


# 116679 22-Jun-2003 simokawa

Allow installkernel.debug and reinstallkernel.debug.


# 113000 03-Apr-2003 imp

Kill upgrade target docs. It too is stale.

Submitted by: ru


# 112999 03-Apr-2003 imp

Kill aout to elf upgrade path. From an old comment in the makefile:

# If -DWANT_AOUT is specified, a `make world' with OBJFORMAT=elf will
# update the legacy support for aout. This includes all libraries, ld.so
# and boot objects. This part of build should be regarded as
# deprecated and you should _not_ expect to be able to do this past the
# release of 4.0. You have exactly one major release to move entirely
# to elf.

Now that we're past 5.0, these aren't needed at all anymore and it is
well past its freshness date.


# 111617 27-Feb-2003 ru

Don't make buildworld and buildkernel in parallel.
And this is probably what you expect when you say
"make -jX buildworld buildkernel".


# 111133 19-Feb-2003 ru

Don't spam sys/${MACHINE}/conf/ with _.${MACHINE}.makeLINT.

Submitted by: johan


# 111131 19-Feb-2003 ru

Fixed universe.

Folded pc98 into the common case.
Retired ${JFLAG} (``make -jX universe'' should work).


# 111089 18-Feb-2003 phk

Fix make universe's kernel builds on pc98: We need to pass both ARCH
and TARGET_ARCH.


# 110035 29-Jan-2003 ru

Part 3/3 of unbreaking cross releases:

When we call "distributeworld" as part of "make release", we set
MACHINE and MACHINE_ARCH to point to TARGET and TARGET_ARCH; this
confused src/Makefile's idea of what ${MAKEPATH}, and consequently
${MAKE}, is (well, it still confuses ${MAKEPATH}, but see below).

To overcome this problem, we now take the following approach:

- We preserve the make(1)'s idea of its argv[0], ${MAKE}.
- We check to see if ${MAKE} passes the regression tests.
- If it does, we use it. Otherwise, we build and use an
up-to-date make(1).

This fix is still not quite right, in a situation where a single
/usr/obj is shared between different architecture machines, but
it is less critical and I hope to fix that soon.


# 108451 30-Dec-2002 schweikh

Minor typo fixes and whitespace cleanups.


# 107884 14-Dec-2002 imp

Build kernels for pc98 just like the other platforms. Also, remove
one space to make the dates line up for easy mental math.

# Too bad only i386 and pc98 are the only parts of the universe
# currently buildable on my box :-(


# 107556 03-Dec-2002 bmah

Minor, cosmetic change to buildworld output to make it reflect
rev. 1.270 more accurately.

Reviewed by: ru
Approved by: re (jhb)


# 107516 02-Dec-2002 ru

If /usr/bin/make fails to pass the regression tests, it might not
be suitable for building. The old action here was to upgrade the
make in /usr/bin. This is both bogus and does not work under non
root. So, rather than overwriting the existing /usr/bin/make, we
now install it into a safe location, and use it from there.

Reviewed by: imp, marcel
Approved by: re (rwatson)


# 107374 28-Nov-2002 ru

Moved make(1) regression tests from src/Makefile to where they
belong (src/tools/regression/usr.bin/make), and use the latter
to test if make(1) is adequate for building the world.

Approved by: re


# 104370 02-Oct-2002 phk

PC98 is not a true architecture, but a subarchitecture of i386, so we need
to use a slightly differnt command to PC98::buildworld.


# 104277 01-Oct-2002 phk

Add pc98 to universe target.
Remember about /usr/obj and look for conf/NOTES in the right place.


# 103985 26-Sep-2002 phk

Add "make universe" target which:

for each arch i386 sparc64 alpha ia64
make buildworld TARGET_ARCH=$arch
if NOTES found
make LINT
foreach kern ${arch}/conf/[A-Z0-9]*
make buildkernel TARGET_ARCH=$arch KERNCONF=$kern

Errors from the individual steps are ignored and the stdout+stderr
are saved in distinct files in root of the source tree with names
like: _.${arch}.${target}

On my dual 1.6G Athlon it takes roughly four hours to run this target.


# 103436 16-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


# 102692 31-Aug-2002 peter

Deal with bootstrapping from an old -current (almost exactly a year old)
which fails the make tests (doesn't understand ${notdef:U}) and therefore
fails on __FBSDID in usr.bin/make/*. -DBOOTSTRAPPING is no help here since
this is before we are using the new share/mk/* files, and it would conflict
with the builtin -DBOOTSTRAPPING support later.. so use a different flag.


# 100402 20-Jul-2002 ru

Indentation.


# 100401 20-Jul-2002 ru

Upgrade make(1) if not passing the ``.if defined(notdef) && ${notdef:U}''
test (revealed by bsd.lib.mk,v 1.134).


# 98775 24-Jun-2002 dillon

correct syntax in last commit


# 98723 24-Jun-2002 dillon

Document TARGET_ARCH


# 97769 03-Jun-2002 ru

Reimplement FILES support using bsd.files.mk with the
same set of features as in recently added bsd.incs.mk
(FILESGROUPS, accessibility from both bsd.prog.mk and
bsd.lib.mk, de-pessimized typical installation path,
etc.) New standard targets: buildfiles, installfiles,
and files (buildfiles + installfiles).


# 97536 30-May-2002 obrien

Line up the make world completed output.


# 97252 24-May-2002 ru

Forgot to commit this for the `includes' -> `buildincludes',
`incsinstall' -> `installincludes' changes.


# 96462 12-May-2002 ru

Added new bsd.incs.mk which handles installing of header files
via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files. Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1. Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

kerberos5/lib/libtelnet/Makefile
lib/libbz2/Makefile
lib/libdevinfo/Makefile
lib/libform/Makefile
lib/libisc/Makefile
lib/libmenu/Makefile
lib/libmilter/Makefile
lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD. Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".


# 96205 07-May-2002 jwd

Bring doc up-to-date with current buildworld/buildkernel practices.

Reviewed by: jhb


# 96164 07-May-2002 ru

Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets. This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.

Urged by: bde


# 95793 30-Apr-2002 ru

Milestone #2 in cross-arch make releases. They now work!

You need to set TARGET_ARCH and possibly TARGET, the same
way you normally do it for a cross build(7).

Renamed `distribworld' to a more natutal `distributeworld'.

Put pwd_mkdb(8) under ${INSTALLTMP}; for `distributeworld'.


# 95730 29-Apr-2002 ru

Parallel "make release" fixes.


# 95509 26-Apr-2002 ru

Milestone #1 in cross-arch make releases.

Do not install games and profiled libraries to the ${CHROOTDIR}
with the initial installworld.

Eliminate the need in the second installworld. For that, make sure
_everything_ is built in the "world" environment, using the right
tool chain.

Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the
buildworld process into stages, and skip some stages when
SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5
dists).

Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running
makewhatis(1) at the end of installworld (used when making crypto,
krb4, and krb5 dists).

In release/scripts/doFS.sh, ensure that the correct boot blocks are
used.

Moved the creation of the "crypto" dist from release.5 to
release.2.

In release.3 and doMFSKERN, build kernels in the "world"
environment. KERNELS now means "additional" kernels, GENERIC is
always built.

Ensure we build crunched binaries in the "world" environment.
Obfuscate release/Makefile some more (WMAKEENV) to achieve this.

Inline createBOOTMFS target.

Use already built GENERIC kernel modules to augment mfsfd's
/stand/modules. GC doMODULES as such.

Assorted fixes:

Get rid of the "afterdistribute" target by moving the single use
of it from sys/Makefile to etc/Makefile's "distribute".

Makefile.inc1: apparently "etc" no longer needs to be last for
"distribute" to succeed.

gnu/usr.bin/perl/library/Makefile.inc: do not override the
"install" and "distribute" targets, do it the "canonical" way.

release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and
catpages appear in the right dists. Note that because Perl does
not respect the MANBUILDCAT (and NOMAN), this results in a loss of
/usr/share/perl/man/cat* empty directories. This will be fixed
soon.

Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it
means "make KerberosIV"), as documented in the make.conf(5)
manpage. Most of the userland makefiles did not test it for "YES"
anyway.

XXX Should specialized kerberized libpam versions be included into
the krb4 and krb5 dists? (libpam.a would be incorrect anyway if
both krb4 and krb5 dists were choosen.)

Make sure "games" dist is made before "catpages", otherwise games
catpages settle in the wrong dist.

Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>


# 95306 23-Apr-2002 ru

Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.

Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)


# 95146 20-Apr-2002 gshapiro

Despite the fact that it is documented in the handbook, the release notes,
and UPDATING and has been posted to both freebsd-current and
freebsd-stable, users are still not adding the required smmsp user and
group before doing an installworld. Therefore, don't let users do an
installworld unless they have followed directions.

Add a new installcheck Makefile target which installworld runs before
actually starting the installation. This target can be used by other parts
of userland as well. The first addition to the target is to check for the
smmsp user and group if NO_SENDMAIL isn't defined.

Others may add checks to this target as they see fit.

MFC after: 1 week


# 91606 03-Mar-2002 keramida

Makefile.inc0 is no longer used.
Update comments to reflect that.

Approved by: dd, silence in -audit.


# 90395 08-Feb-2002 ru

FreeBSD 4.1 bootstrapping aid (``:C'' make(1) modifier used
by gnu/usr.bin/binutils/as/Makefile.inc0 is not there).

XXX: make(1) should return with a non-zero exit status here.


# 74842 27-Mar-2001 ru

Make it possible to build manpages for the entire source tree.


# 73504 04-Mar-2001 obrien

End words with a `.'.
Fixed spacing messed up in rev 1.244.


# 73349 02-Mar-2001 ru

setlocale(3) has been fixed to match POSIX standard:
LC_ALL takes precedence over other LC_* envariables.


# 72427 13-Feb-2001 jkh

Cosmetic fix: Document targets at the top in a uniform way.


# 69659 06-Dec-2000 obrien

Add back displaying the `world' start time when displaying the stop time.
However, don't prefix it with '>>>', so those greping for times will
not see it.


# 69496 01-Dec-2000 jkh

Also list kernel target so one can get to it.


# 69491 01-Dec-2000 jkh

Document the "kernel" target.


# 68987 21-Nov-2000 marcel

Fix release, broken by the perl cross-build fixes.

The distribute target is basicly the same as an install. For
perl, this means that miniperl is needed. Since miniperl is
only present in the object directory, we need to make sure
the path is set correctly. To do this, we have make release
use a new distribworld target that sets the path before doing
a make distribute.


# 68428 07-Nov-2000 jkh

While we're still arguing over debugging output, at least be in a
self-consistent state.

Requested by: bde


# 68374 05-Nov-2000 jkh

MFS: eliminate duplicate start line


# 66071 19-Sep-2000 markm

Pass the reinstallkernel target through from Makefile to Makefile.inc1.


# 64049 31-Jul-2000 alex

Mention the buildkernel/installkernel targets in the documentation.


# 57457 24-Feb-2000 markm

We have a new world order in libraries.

Goodbye libdes; Welcome libcrypto.


# 55678 09-Jan-2000 marcel

Add the buildkernel and installkernel targets.
While here fix some minor style bugs (whitespacing) and move the
make target from Makefile.upgrade to this file.
Simplify the make target to make it readable.


# 55026 23-Dec-1999 marcel

Descent into sub-makes with a fixed PATH. The PATH does not contain
/usr/games on purpose. All tools in /usr/games are built as part of
the tool stages to support building world on machines without games.

This fixes any build problems that have been caused by non-standard
paths and also removes the primary objection for not using absolute
paths.


# 54324 08-Dec-1999 marcel

Oops! bypassing Makefile.inc0 without adding a `world' target is not
a good idea. Adding `world' to Makefile is save, because all hairy
bits are in Makefile.inc1 anyway.


# 54311 08-Dec-1999 marcel

Restore the upgrade path from -stable to -current and prepare for
non-root cross-building.

o Makefile.inc0 is not used anymore.
o The legacy aout build has been removed.
o Selectively build tools *before* building includes/libraries.
o Avoid using mtree to populate the obj tree.


# 51361 18-Sep-1999 jb

Remove a comment about setting objformat to elf by default. We've
done that already.

Change the -DWANT_AOUT comment to refer to 4.0 so that it sounds less
silly.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49315 31-Jul-1999 hoek

Comment change: "Be warned, this will update your installed system, except
for the configuration files in the /etc directory." .... and the kernel.


# 45108 29-Mar-1999 obrien

Change !defined(NOAOUT) knob to defined(WANT_AOUT).


# 44918 20-Mar-1999 jkh

Note that the upgrade target exists, and what it does.

Requested by: Wayne M Barnes <stabilizer@klentaq1.emergingtech.org>


# 44103 17-Feb-1999 msmith

Use ${MAKE} not 'make -f'

Submitted by: tfreak@fluffybunny.jaded.net


# 43226 26-Jan-1999 jkh

Frob the upgrade target to be a bit more inclusive. This appears to
be a good bit more successful at doing automated upgrades than the
previous aout-to-elf target, anyway. I'll MF3 in a couple of days
depending on how this does.


# 42128 28-Dec-1998 peter

Dip my toes into the fire and zap the leftover lkm hooks.. It seems they
try and recurse if the lkm dir exists for some reason but there isn't any
Makefile there. (eg: stray files prevented cvs update -P from removing the
empty dirs)


# 40495 17-Oct-1998 bde

Restored all lost user targets that are supported by bsd.subdir.mk:
checkdpadd, lint, maninstall, objlink, regress and tags.

Removed bogus user target cleanobj. It is the non-recursive base of
the cleandir target, so it is not useful (or usable) here.


# 39784 29-Sep-1998 jkh

Add back a few useful targets lost in the reshuffle.
Reviewed by: jb


# 39726 28-Sep-1998 jb

The legacy stuff needs gobs more space in the obj tree. 165->260 Mb.


# 39206 15-Sep-1998 jkh

Restore default implict behavior of running the all target we had before.


# 39055 10-Sep-1998 ache

Revive hierarchy again.
Please commit only patches, not whole files!


# 38978 09-Sep-1998 jb

Add the missing rerelease target back.

Reported by: Justin Gibbs.

Add the move-aout-libs upgrade target so that people who have already
gone elf can put their libraries through the mincer. Anyone who hasn't
deleted aout libraries from /usr/lib (but has done a make world putting
the new aout libs in /usr/lib/aout) will be asked for confirmation
to delete them one by one.


# 38916 07-Sep-1998 ache

Revive hierarchy target


# 38821 04-Sep-1998 jb

YAMT (yet another missing target). It's a shame that these have to
be visible to the user. Maybe `make release' should call the backend
directly.


# 38804 04-Sep-1998 jb

Add the distribute target that make release wants.


# 38719 01-Sep-1998 jb

Add the clean cleandepend and cleanobj targets back.


# 38666 30-Aug-1998 jb

E-day build system changes.

- Moved most of the guts of Makefile to Makefile.inc1 to become the
backend for the build system.
- The new Makefile doesn't suffer from problems including the wrong
sys.mk because it doesn't use anything in there or bsd.own.mk. So,
from now on, the proper build command is just `make world' (or
buildworld).
- The intermediate makefiles called Makefile.inc0 and Makefile.upgrade
fiddle with the OBJFORMAT and MAKEOBJDIRPREFIX variables so that
both aout and elf object trees can coexist. Makefile.upgrade contains
the aout->elf transition build.
- A cross build environment is now very close to reality. Specifying
TOOLDIR, setting OBJFORMAT and MAKEOBJDIRPREFIX allow that.

See the comments in Makefile for more info.


# 38425 18-Aug-1998 jb

Build objformat on all architectures.


# 38106 04-Aug-1998 bde

Fully enable the optimization of not building dependencies unless NOCLEAN
is set. It was disabled in the -j case. See rev.1.173.


# 38104 04-Aug-1998 peter

Descend into etc always; src/etc/sendmail/Makefile has make.conf hooks
for building and installing a local sendmail.cf..

I'm a little nervous about the implications of having an obj dir built
under etc (to get to the obj dir for sendmail), but the make rules appear
to DTRT.


# 38042 03-Aug-1998 bde

Fixed building -current under 2.2.6 using `make world'. Moved some
recently added definitions from sys.mk to bsd.own.mk. Include the
src-relative bsd.own.mk in src/Makefile to pick up all new definitions.
Don't check that MACHINE_ARCH is defined in src/Makefile, since it is
(and should have been) guaranteed to be defined.


# 38009 02-Aug-1998 wosch

Malformed conditional if MACHINE_ARCH is not defined. From rev 1.195.


# 37475 07-Jul-1998 bde

Oops, don't build tools for building games, etc. when we're not building
games, etc.

Define _BUILD_TOOLS in sub-makes for building tools. This will be used
to avoid using uninstalled tools in colldef and mklocale.


# 37473 07-Jul-1998 bde

Build internal tools in build-tools so that they have some chance of
working when the target system is not binary compatible. Use various
hacks to work around minor problems in the source and binary tree
layouts:
- caesar and strfile are built normally (the source layout is good),
then installed by copying them to ${WORLDTMP}/usr/bin (they are
installed in ${WORLDTMP}/usr/games, but I don't want to put that
in $PATH).
- colldef and mklocale are built and installed normally. Messy and
incomplete relative path searches for them and caesar and strfile
can now go away.
- internal tools that aren't installed are now built and left lying
around for the `make all' pass to use. If the target system is
not binary compatible, it is critical that these tools don't get
rebuilt. Cleaning of the obj tree before building the internal
tools should ensure this.
- most internal tools are built using internal build-tools targets,
but tn3270 is simpler for a change - it has all the tools in a
separate tree, so they can be built using `make all'.


# 37026 17-Jun-1998 bde

Added yacc to the bootstrap tools. It is needed very early to
build at least compile_et and lex, and although almost any version
of yacc could work, the version in -stable doesn't actually work
with -current makefiles because it doesn't support -o.

Submitted by: Ian Holland <ianh@tortuga.com.au>


# 36939 13-Jun-1998 peter

join(1) is used by lorder, add it to build-tools. (otherwise, things get
ugly when an a.out /usr/bin/join sees the elf LD_LIBRARY_PATH from a
'make world' and it's a.out ld.so tries to load the elf libc.so.)


# 36800 09-Jun-1998 bde

Quick fixes for the mtree bootstrap:
- don't announce `mtree' as `mtools'.
- don't install to ${DESTDIR}/usr/sbin (which often doesn't exist if
DESTDIR is set and may be read-only if DESTDIR is not set).
- install to (${WORLDTMP}/usr/sbin so that the new mtree is actually
in $PATH if DESTDIR is set.
- don't use the host make or the host sys.mk. This is probably
unimportant.
- use a temporary obj dir like the one for `make'. This was mainly
necessary because I forgot to remove the MAKEOBJDIRPREFIX unsetting
which was just a bug for mtree. A non-quick fix would handle mtree
more like a bootstrap tool (the only additional complications are to
create ${BINDIR} and avoid excessive cleaning). Except a non-quick
fix would change much more.


# 36722 07-Jun-1998 sos

Compile mtree before it is used, this is a hack, but make world has
failed since new functionality was introduced in mtree.


# 36687 06-Jun-1998 jkoshy

-DALLLANG is now obsolete in "src/Makefile"; move to "src/release/Makefile".

PR: 6685


# 36683 05-Jun-1998 bde

Don't run the target's ldconfig or build it as a tool. If target == host
(in particular, if DESTDIR is empty or "/"), then the host's ldconfig will
be the target's ldconfig by the time it is run.

Fixed disordering of env.

Don't know too much about libcrypt. Use exactly the same definition of
_libcrypt as lib/Makefile.

Don't build strip twice.


# 36682 05-Jun-1998 bde

Fixed bogotification of the lex bootstrap in rev.1.186 and the previous
commit - don't wander off to bootstrap mtree and include in the middle
of bootstrapping lex, and don't forget what we were doing and build
some lex obj dirs twice.


# 36672 05-Jun-1998 jkh

Add mtree to bootstrap targets now that peter has added a new
keyword to it which will otherwise call the next target to fall over
on transitioning systems.


# 36638 04-Jun-1998 jb

Build aout bootstrap tools only on i386.

`make world' now works on alpha!


# 36622 04-Jun-1998 charnier

Typos.


# 36589 02-Jun-1998 jhay

Don't build perl in build-tools: if NOPERL is defined.


# 36585 02-Jun-1998 peter

Fix brain-fart. "usr.bin/reinstall" should be "sbin/ldconfig".
No comment. *-<:-)

Submitted by: "Pierre Y. Dampure" <pierre.dampure@k2c.co.uk>


# 36573 01-Jun-1998 peter

ldconfig is used at the end of installworld.


# 36470 30-May-1998 jhay

Add a test to see if the secure directory exists, before deciding which
crypt library should be used when building bootstrap-libraries. This
make it work on machines that don't have the secure directory.
Thanks to Paul Allenby <pallenby@mikom.csir.co.za> for bringing it to
my attention.


# 36455 29-May-1998 jkh

Whoops! Committed the wrong version of that file - here's the one which
works.


# 36454 29-May-1998 jkh

Move sh after awk in build tools - sh requires awk to build. Add id
to list of bootstrap tools.
Submitted by: jhay


# 36444 28-May-1998 peter

Only pre-build the "default" libcrypt, since it gets to set the symlinks
for the rest of the build. I'm not certain, but I think this determines
which crypt() goes into /sbin/init. This change shouldn't hurt anyway. :-)

Based on a suggestion by: bde


# 36442 28-May-1998 peter

Urgent fix for bootstrap target. If the old symlinks are pointing to the
real source tree, the bootstrap target would attempt have cpio copy the
files over themselves, unlinking them first. I think this only happened
with make -DNOCLEAN world at the transition between a symlinked
objdir/tmp/usr/include/{sys,net,..} and real files.


# 36429 27-May-1998 peter

Replace the partial symlink tree to src/sys/* in $OBJDIR/tmp/usr/include
with real copies. I'm sick of !@#&!^!@#*& mtree chowning directories in
my src/sys/* tree after it follows the symlinks. I still believe that
mtree is broken for doing this (introduced in mtree.c rev 1.5).


# 36423 27-May-1998 peter

On the other hand, when /usr/bin/as is really a link to objformat, it's not
helpful to stop it running /usr/libexec/aout/as for real while bootstrapping.
Only force a strict path when we really have built all the tools in
$OBJDIR/tmp/usr/libexec/*.


# 36419 27-May-1998 peter

Move objformat after binutils, otherwise we get chicken/egg problems when
building ELF. It may be that binutils and objformat need to both be moved
earlier in the list though, but that can wait till the dust settles.


# 36408 27-May-1998 sos

Compile & use objformat as it was intended to, I have no idea why
that failed for me before :(


# 36397 26-May-1998 sos

ELF preparation step 2:

Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...


# 36374 25-May-1998 sos

ELF preparation step 1:

Move our old a.out utils to /usr/libexec/aout.
Enable binutils and put the utils in /usr/libexec/elf
Enable objformat, a little helper program that calls the right
utils based on /etc/objformat and $OBJFORMAT.

This will enable the ELF generating tools.
Remember that this is only step one, the system is still compiled
and run in a.out format ONLY.

Problem left to solve: The BSD manpages wins over the GNU equivalents
as the are installed last. We need to distinguish between the manpages
somehow...


# 36142 18-May-1998 jb

Make perl a build tool since it is required during a make depend.
This should fix the problem people have been having with perl/usub.


# 36111 16-May-1998 jb

Now that FreeBSD/Alpha can be installed on a disk and run on its own,
a bootstrap build under NetBSD is an option.

This makefile will require further changes to ignore aout tools.


# 36074 15-May-1998 bde

Don't use `&&' in any shell commands here. Using it to give conditional
execution is usually unnecessary in BSD Makefiles because BSD make
invokes shells with -e. Using it to give conditional execution is
often wrong in BSD makefiles because BSD make joins shell commands
when invoked in certain ways (in particular, as `make -jN'). Example
makefile:
---
clean:
cd /
false && true
rm -rf * # a dangerous command
---
This should terminate after the `false && true' command fails, but
it doesn't when the commands are joined (`false && true' is a non-
simple command, so -e doesn't cause termination). The b-maked version:
---
clean:
cd /
false; true
rm -rf * # a dangerous command
---
terminates after the `false' command fails (`false' is a simple
command, so -e causes termination). However, for versions of
make like gnu make that don't invoke shells with -e, this change
completely breaks the makefile.

This is one of the fixes for the bug suite that caused `make world'
to sometimes put raw cpp output in .depend files. Building of cc
sometimes failed, but the failure did not terminate the build
immediately, and various wrong versions of the cc components were
used until one was wrong enough to cause a fatal error.


# 35913 10-May-1998 bde

Removed share/info from build-tools. It should never have been there,
and became redundant when it was put in SUBDIR, and became bogus when
WORLDTMP was introduced, and became broken when INFODIR was introduced.

PR: 6138


# 35851 08-May-1998 jb

Fix the problem people are having building -current on a -stable system.
The headers that are installed in WORLDTMP are part of the interface
that includes libraries like libc, so they must be installed together.
This means that lib-tools and build-tools should be merged. The FreeBSD
build only works in hosted form where it is assumed that the installed
version contains adequate tools to build the latest release.


# 35621 02-May-1998 bde

Added patch to build-tools (now needed to make gdb, sigh).

Pointed out by: andreas


# 35479 27-Apr-1998 bde

Don't build dependencies unless NOCLEAN is set. This speeds up
`make world' by about 14% here (down to 4490 seconds real on a
K6/233). Temporarily skip this optimization when building with
-j, since there are still many broken makefiles.

Fixed NOCLEANDIR option. Cleaning of `.depend' was broken.

Put -nostdinc in CFLAGS, not in CC, and don't override the default
CC. This fixes enforcing use of ${WORLDTMP}/usr/include.

Don't install library man pages in ${WORLDTMP}.


# 35462 26-Apr-1998 jkh

Use more reasonable defaults for SUP variables (and print them
correctly) now that sup is long since dead and buried.


# 35452 25-Apr-1998 andreas

make includes has to execute "make beforeinstall" in src/lib/libcalendar
as well, otherwise "make depend" during "make buildworld" fails in
usr.bin/ncal


# 35427 24-Apr-1998 bde

Don't build shared libraries twice for `make world'. This reduces
`make world' times by about 10%. Use a new `bootstrap-libraries'
target to build just enough (static) libraries to bootstrap the
tools, and delay building of shared libraries until all the tools
have been built.

Fixed `/usr/bin/make world'. The version of `make' that we buildis
nand use is named "make", not ${MAKE}.


# 35294 19-Apr-1998 dt

Cosmetic: put '@' in front of a very long command.


# 34895 26-Mar-1998 markm

Make the decision to compile kerberosIV a bit more secure by looking
for the appropriate directory.


# 34688 19-Mar-1998 bde

Build the initial `make' in the temporary build tree so that its forced
cleaning doesn't affect the normal copy. Save a little time by not doing
unnecessary clean, depend nd cleandepend steps.

Reviewed by: mckay@freebsd.org

Added xargs to build-tools. It may be used for kdump and truss.


# 34623 16-Mar-1998 bde

Restored an (apparently unnecessary) -B for installing lib-tools.
The install target is -j-unsafe in general, so we use -B for
installing everything in `make world'.


# 34592 15-Mar-1998 bde

Don't force NOPIC for building tools at all for now, so that some
(slightly stale) shared libraries get installed before non-tools
are linked. The 2-stage build of the libraries has never really
worked, since we link to the libraries built in the first stage.


# 34575 14-Mar-1998 bde

Don't force NOPIC or NOSHARED for building tools in the NOCLEAN case,
so that dirtier-than-previously tools aren't left lying around to be
installed.

Filter out NOPIC from ${MK_FLAGS} for `make ${OBJDIR}' for ld (and
some other things), so that the obj dir for ld/rtld always gets
re-made.

Fixed a literal "make".


# 34541 13-Mar-1998 bde

Build all tools shared, and don't build any shared libraries for tools.

Build libraries (for linking the tools to) in a more correct order
(for linking freshly created shared libraries to each other). This
is probably a no-op now that shared libraries for tools aren't
built, but I didn't test any intermediate versions. Security-related
directories that are not built by default may now be misordered
for the shared case.

Don't build libcompat specially. It isn't used for tools, and
shouldn't be used in /usr/src (it is only used for IPXrouted and
crufty games).

Added missing ${.CURDIR} to existence tests for library directories.
Existence tests for top-level directories are still broken.

Test for library directories actually being built, not for directories
above them.


# 34520 12-Mar-1998 bde

compile_et is now used early to build includes for libss, so build it
earlier. This is probably unnecessary.

Added now-necessary -B for installing headers for libss.

Removed now-unnecessary -B for building cleandepend for rpcgen.


# 34509 12-Mar-1998 bde

Fixed missing SHLIBDIR in GCC_EXEC_PREFIX.

Add the path to the source .mk files to the beginning of .MAKEFLAGS
instead of to the end, so that there is more chance of it having
priority. Additions in /etc/make.conf still have priority for
sub-makes if they are also at the beginning, although this is
probably not wanted for building /usr/src.

Use ${MK_FLAGS} for building dependencies for tools. This saves
time building dependencies for tools that won't be created (mainly
profiled libraries) and will be necessary to give correct dependencies
when tools are built static.

Spell the object directory as ${OBJDIR} consistently (even when we know
that ${OBJDIR} == "obj").

Print ${DESTDIR} in messages where appropriate.

Fixed some misformattings.


# 34508 12-Mar-1998 bde

Separated header creation from header installation in libss. Create
the libss headers before installing them in `make world'.


# 33611 19-Feb-1998 jb

Change the bootstrap makefile inclusion to be general based on the
MACHINE. This lets me play with porting to m68k too. 8-) That is a
good test for portability because MACHINE != MACHINE_ARCH and m68k is
big endian.


# 33595 18-Feb-1998 nate

MF22:
- After the install has been done, but before makedb is run, run
'ldconfig -R' to pick up new shlib dependencies.

Suggested by: Amancio and a whole lot of other folks


# 33133 06-Feb-1998 adam

-DNOTOOLS to not rebuild any tools during buildworld


# 32427 11-Jan-1998 jb

Test for ${MACHINE} == "alpha" and include the bootstrap makefile instead
of doing the normal build. When the alpha bootstrap is complete (there
is more work to do!), the alpha will build like the i386 does now.
I changed i386 references to ${MACHINE} now that we're multi-architecture.


# 30277 10-Oct-1997 asami

Do not use -B in initial build of "make". It doesn't exist in 2.1.x.
Instead, list the targets one per command line.

Reviewed by: bde
Submitted by: bde (part)


# 30205 07-Oct-1997 bde

Removed uneeded ${.MAKEFLAGS} again.
Originally committed in: rev.1.141
Spammed by: rev.1.149 (mouldy parallel make diffs)


# 30170 06-Oct-1997 jkh

Having to review all changes to this file _very_ carefully
led me to find 2 more errors which were there before. :)


# 30169 06-Oct-1997 jkh

Hooboy!

Did I ever spam this file good with that last commit. Despite 3
reviewers, we still managed to revoke the eBones fixes, TCL 8.0 support,
libvgl and a host of other new things from this file in the process of
parallelizing the Makefile. DOH! I think we need more pointy hats - this
particular incident is worthy of a small children's birthday party's worth of
pointy hats. ;-)

I certainly intend to take more care with the processing of aged diffs
in the future, even if it does mean reading through 20K's worth of them.
I might also be a bit more anal about asking for more up-to-date changes
before looking at them. ;)


# 30132 05-Oct-1997 fsmp

Removed redundant 'all' arg to " Making Make" target.
Removed "-r RELENG_2_2" from 'update' target.


# 30127 05-Oct-1997 markm

How the heck did this get back??


# 30113 05-Oct-1997 jkh

Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by: <many different folks>
Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>


# 29938 28-Sep-1997 mckay

When bootstrapping lex, the object directory for lex/lib would be deleted
without being recreated. A read-only source compile would then fail shortly
afterwards trying to write .depend into the source tree.


# 29930 28-Sep-1997 markm

Change for KTH KerberosIV.
-DMAKE_EBONES is changed to -DMAKE_KERBEROS4


# 29872 26-Sep-1997 jkh

When making make, do cleandir *before* objdir or we'll end
up with a blown objdir for the depend stage, leaving the
.depend file in ${SRCDIR} instead.


# 29503 16-Sep-1997 bde

Backed out rev.1.136 and rev.1.144. Force SHARED=symlinks in a different
way - for buildworld only.

Rev.1.136 broke the (deprecated) external includes target. Rev.1.144 was
a half-baked backout of rev.1.136. It broke SHARED=symlinks for the
buildworld target and installation of subdirs of src/include for the
includes target.


# 29444 15-Sep-1997 rgrimes

When calling the src/include Makefile use the shorthand ``all beforeinstall''
inplace of ``all installhdrs symlinks'' so those of us who run with
SHARED=copies get the right results.


# 29130 05-Sep-1997 peter

Back out use of -m, since 2.1.x apparently do not have it. (sigh..)


# 28968 31-Aug-1997 peter

Fix the ${BINFORMAT} definition problem during 'make {build}world'. The
wrong switches were being passed to 'make' that caused sys.mk to come from
the /usr/share/mk location but the bsd.*.mk files to come from the
source tree in src/share/mk. This was bound to break sooner or later.

Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>


# 28803 26-Aug-1997 peter

Remove unneeded ${.MAKEFLAGS} being explicitly passed on via the command
line..

PR: 4368


# 28728 25-Aug-1997 bde

Use new installhdrs target to install tcl includes.


# 28532 21-Aug-1997 bde

Added directories in the includes target so that it installs
everything that a full install would (modulo bugs in rpcsvc/Makefile).
The missing things weren't used (except for mp.h from libmp), but
there are relatively few of them and it's easier to be complete.


# 28531 21-Aug-1997 bde

Restored rev.1.122, which was clobbered by copying from -stable in
rev.1.134.

Split long lines.


# 28358 18-Aug-1997 peter

Pass command line args to 'buildworld' and 'installworld' etc. Otherwise
'make -DNOCLEAN world' is completely ignored.


# 28357 18-Aug-1997 peter

In the includes target, call the header install target explicitly and then
call the 'symlinks' target to build the /usr/obj/tmp/install/sys tree since
In the includes target, call the header install target explicitly and then
call the 'symlinks' target to build the /usr/obj/tmp/install/sys tree since
we set this up manually earlier, and if we do a 'make all install', we
replace the symlink tree in the obj dirs with new copies of the files
which breaks any chance of -DNOCLEAN working.


# 28329 17-Aug-1997 andreas

fix a make world problem.
updated beforeinstall target.
mp.h from gnu/lib/libgmp.h has to be installed to /usr/include
so that usr.bin/chkey and usr.bin/newkey can be compiled.


# 28104 12-Aug-1997 asami

Merge from -stable; NOTCL hook in beforeinstall.


# 27910 05-Aug-1997 asami

Merge buildworld/installworld patch to Makefile from RELENG_2_2. Patch
a couple *.mk files to enable -current world building on really old
machines (e.g., 2.1.5).

Reviewed by: too many many people to list here, special thanks to bde


# 27790 31-Jul-1997 asami

More whitespace/tab fixes.

Submitted by: bde


# 27788 31-Jul-1997 asami

Consistently use tabs in the leading comments.

Submitted by: bde (yes, I'm serious)


# 26510 08-Jun-1997 jfieber

Remove sgml stuff from the build-tools target. It is no longer used
in a make world.


# 26504 08-Jun-1997 jhay

Add libmp and libz to the includes target. This makes "make includes -DCLOBBER;
make depend; make all" work. I think there should be a better than adding
each library directory here.


# 26152 26-May-1997 peter

make beforeinstall in libalias from the includes target


# 25980 21-May-1997 asami

Fix comment about LOCAL_DIRS. Now it works as advertised. :)


# 25979 21-May-1997 jkh

Remove evil MAKE_LOCAL and MAKE_PORTS hacks and replace them with
a simpler, more general LOCAL_DIRS hack.
Reviewed by: asami


# 25783 13-May-1997 peter

Forgot to commit this.. Do a 'make all' in src/include before trying
to install it. Otherwise osreldate.h breaks.

Pointed out by: Doug Rabson <dfr@nlsystems.com>


# 25647 10-May-1997 bde

Use `mk' files in share/mk (relative to the top level of the source
tree) instead of the system default ones in /usr/share/mk. This
only works for makes run from the top level, and a few not too out
of date system makefiles must be present to start up. Bootstraps
from can still be done from scratch by giving the path to an up to
date share/mk on the command line.

Removed bootstrap `mk' target and use of it. The bootstrap didn't
actually work for the non-null DESTDIR case.


# 25399 03-May-1997 jb

Change default build to include libc_r, but allow disadvantaged souls
to turn off the build.


# 25313 30-Apr-1997 bde

Bootstrap the info `dir' file from here.


# 24754 09-Apr-1997 jdp

Process "lib/csu/i386" at the beginning of the "libraries" target,
instead of in the middle of it. Soon, "c++rt0.o" will be linked
into all shared libraries. An up-to-date version of it must be in
place before any shared libraries are built.

This is one piece of the solution for PR gnu/3035 (gcc -shared).


# 24561 02-Apr-1997 ache

Back out csu fix, because it was just fixed differently


# 24552 02-Apr-1997 ache

For csu/i386 add "all" before "beforeinstall", because "beforeinstall"
wants to install "all" targets which not exist at this stage


# 23053 23-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21922 21-Jan-1997 jkh

Add uudecode to lib-tools so that the -p option is available for
the later build in lib/compat/* for those systems upgrading from source.

Pointed-Out-By: John Hay <jhay@zibbi.mikom.csir.co.za>


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 21614 12-Jan-1997 jdp

Add "lib/csu/i386" to the "includes" target, so that <dlfcn.h> is
installed before it is needed.
Noticed by: David Conran <lucifer@maths.uq.oz.au>


# 21586 12-Jan-1997 steve

Remove yacc from the lib-tools target since it is now
back to its original form.

Requested by: jkh


# 21536 11-Jan-1997 jmacd

Add -DNOINFO to MK_FLAGS, that's okay right? The comment says
MK_FLAGS contains -DNOMAN and -DNOPROFILE for speed, so I assume
NOINFO is okay as well.

Add gnu/usr.bin/texinfo to build-tools so everything does the right
thing.


# 21386 07-Jan-1997 jkh

Add yacc to lib-tools target, now that it's been changed.


# 20710 20-Dec-1996 asami

Add comment on -DALLLANG.

Suggested by: max


# 19966 26-Nov-1996 ache

Use LC_TIME=C instead of LC_TIME= (POSIX)


# 19320 01-Nov-1996 adam

use NOSHARE variable to skip 'share' directory, useful for shared installations
or for faster make of executables.


# 19175 25-Oct-1996 bde

Improved comment about `all' target.

Use a for loop instead of massive duplication in the build-tools target.


# 18921 14-Oct-1996 peter

oops, how did this get into the reinstall target? :-]
Must have been a cut/paste foulup... The whole idea of 'make reinstall'
is that it doesn't build anything from the source server mount.


# 18729 06-Oct-1996 jkh

Add awk to build target.
Submitted-By: jhay


# 18714 05-Oct-1996 ache

Use SUP and SUPFLAGS variables to change them to cvsup if needed


# 18674 04-Oct-1996 peter

Add some 'world' hooks for libg++-2.7.2, specifically the new libstdc++
directory. Also, add gnu/usr.bin/as to the lib-tools target since libgcc
generates weak symbols, and libstdc++/libg++ use them. ie: coming from a
2.1.x system will fail without 'as'.


# 18434 21-Sep-1996 ache

Unlocalize `date`


# 18392 19-Sep-1996 peter

Hooks to attempt to get 'make world' working with gcc-2.7.2.1. It's
worked for me, but no guarantees yet.

Basically, move cc earlier to lib-tools target, before libraries are
built. libgcc is built at the same time, so it's special entry is
removed from the libraries target. Also, add bison/gperf immediately
before cc, since they are needed to build cc and are not present on an
earler-than-2.2 system. (libgcc is partly built with the freshly compiled
gcc-2.7.2.1, since it uses __attribute__'s that were not present until now)

This _should_ be enough to get running from older releases, perhaps as far
back as 2.0.5.


# 18362 18-Sep-1996 jkh

Add 3 small lines which add to the utility of the "finished on `date`"
output in the world target.


# 18204 10-Sep-1996 jfieber

Add usr.bin/sgmls to the build-tools target.
This should prevent make world from falling over in share/doc.


# 17962 30-Aug-1996 peter

- cosmetic change to 'make world'
- do an explicit 'make all' in include/rpcsvc in 'make includes' as
a 'make install' is not supposed to build anything.


# 17820 25-Aug-1996 jkh

Revert all the make depend changes.


# 17794 23-Aug-1996 jkh

Get rid of all the explicit calls to make depend.


# 17469 07-Aug-1996 nate

Removed extraneous .endif that was left during OBJDIR cleanup.

Noticed by: phk


# 17467 07-Aug-1996 peter

Move tsort back to lib-tools where it belongs, and add a "specially
for bootstrap" tweak to the lex Makefile to stop it building the library
too early.

This untangles things a bit more, it stops new bootstraps failing because
libl/libfl uses 'ld -O' before ld is updated.


# 17466 07-Aug-1996 peter

Correct spelling of NOOBJDIR (I mistakenly wrote NOOBJ).
Closes PR#1451 (Ph. Charnier <charnier@xp11.frmug.org>) and
PR#1453 (Peter Mutsaers <plm@xs4all.nl>)


# 17406 03-Aug-1996 jkh

The bootstrap target in src/Makefile has the wrong order for lex/tsort
because lex has a library (libln.a) and bsd.lib.mk has been modified to use
'tsort -q'. Tsort has not been build yet...

tsort should be before lex. [Whoops! Thanks! -jkh]

Submitted-By: roberto@keltia.freenix.fr (Ollivier Robert)


# 17401 03-Aug-1996 jkh

Add tsort to bootstrap targets.


# 17308 27-Jul-1996 peter

General tidy-up of Makefile. The objective was to make it clear and
readable, as well as fix up some of the warts along the way. Among the
things fixed is the infamous "cd foo && make depend all install" bogon,
which is particularly important for users of the -DNOCLEAN option.

Also, a few typo and DESTDIR fixes and a -DNOGAMES hack from Gary Jennejohn.


# 17234 20-Jul-1996 jraynard

Fix typo in Makefile.

Reviewed (informally!) by jkh.


# 16866 01-Jul-1996 jkh

Add make to the bootstrap targets (I thought I committed this 3 days ago -
sheesh!).


# 16813 28-Jun-1996 phk

Add beforeinstall decent into libtcl


# 16796 27-Jun-1996 peter

Comment out the:
.if exists(contrib)
SUBDIR+= contrib
.endif
because it now tries to decend into the new contrib dir which doesn't
have a Makefile.


# 16786 26-Jun-1996 nate

Added libftpio to 'includes'.


# 16663 24-Jun-1996 jkh

Bring in my changes for removing the pestilent obj links (unless you
really want them) from /usr/src. This is the final version of the
patches, incorporating the feedback I've received from -current.


# 16591 22-Jun-1996 pst

Ask CVS to run in quiet mode, which makes it easier to see what the
update actually did.


# 16550 20-Jun-1996 jkh

Add pre-world and post-world hooks so that people can do site specific
cleanup or preinitializion of /usr/src before and after the world target
is run.


# 16534 20-Jun-1996 adam

libforms is no more


# 16526 19-Jun-1996 nate

Don't try to do a 'make bootstrap all install' in one commend. Break it
into two make commands so that make will recognize that it doesn't need
to buid scan.c w/lex.


# 16520 19-Jun-1996 nate

Added lex to the bootstrap target.


# 15603 04-May-1996 markm

1) make -DCLOBBER not remove most of /usr/lib
2) make all the 'pre-targets' not install profiled libraries and man pages
to speed up the bootstrap in a 'make world'


# 14787 24-Mar-1996 paul

Re-instate the bootstrap target which can be used to build tools
that can't be built by older OS versions.

Use it to install the lint binaries.


# 14545 11-Mar-1996 jkh

Add a hint that a make world is done so people don't think that the last
command (makewhatis) is running forver. :)


# 14119 17-Feb-1996 peter

do the 'include-tools' as part of the world target (like lib-tools and
build-tools) so that a "make includes" doesn't spam your build tree.


# 14022 11-Feb-1996 markm

Remove reference to old des library.


# 13726 30-Jan-1996 nate

Added 'install' to the inclde-tools target, as it has a new options "-C"
which is used when installing the include files.

Submitted by: John Hay -- John.Hay@csir.co.za


# 13725 30-Jan-1996 nate

Kludge alert!

Add new 'include-tools' target, which the 'includes' target depends on.
Currently, it consists of rpcgen.


# 13138 01-Jan-1996 peter

Add libutil/beforeinstall to the includes target


# 13040 27-Dec-1995 pst

Add rpcgen to build-tools target.


# 12507 28-Nov-1995 nate

Added 'install' to the lib-tools target since it is uses the new '-C' flag
to install libraries to avoid messing up dependencies.


# 12485 26-Nov-1995 jkh

Bring forward libkadm change from 2.1


# 12483 24-Nov-1995 peter

Add -DNOCLEAN option which totally and utterly disables any form of
cleaning during a make. This may give you more rope to hang yourself if
you are caught with some subtle dependency on installed binaries in your
build, but if you are doing daily 'make -DNOCLEAN world' it's not too bad
at all. It could take as little as 30 minutes to do an entire sync-up of
your binaries if everything's up to date, especially if you are using
'INSTALL=install -C' in /etc/make.conf (highly recomended!).

Also, add a "reinstall" target. You can do a 'make DESTDIR=/mnt reinstall'
where /mnt is the nfs root of a machine and you get the install parts of
the make world run on it.

I saw this on -hackers quite some time ago and included it in my Makefile
and have been using it on and off for a while. Alas, I cannot find the
actual message with the author's name...


# 12166 09-Nov-1995 jkh

Add: cd ${.CURDIR}/eBones/lib/libkrb && ${MAKE} beforeinstall
to includes target. Now the world will build on a new 2.1 system again.


# 12106 05-Nov-1995 jfieber

Add sgmlfmt to build-tools target so a make world with current source
on a <= 2.0.5 system does not fall over.


# 11806 26-Oct-1995 phk

Changed "tools" to "build-tools".
Suggested by: Peter Wemm


# 11772 24-Oct-1995 nate

Build all of the libraries: targets libs in the same manner. Append the
optional ${CLEANDIR} and ${OBJDIR} targets to those missng them.

Also, check for the existance of all library targets before building
them to follow convention.


# 11769 24-Oct-1995 phk

Added symorder to tools target.
Suggested by: rgrimes.


# 10838 17-Sep-1995 jkh

Remove extraneous blank in libraries target (from 2.1).


# 10831 16-Sep-1995 gibbs

Update for the new location of eBones.

Submitted by: Paul Traina <pst@freefall.freebsd.org>


# 10760 14-Sep-1995 ache

Enhance sup update to run with 3 supfiles: standard/ports/secure


# 10479 30-Aug-1995 dg

Brought forward the change in 1.57.4.1 - add build of zic(8) to tools rule..


# 9904 04-Aug-1995 asami

We don't have libftp anymore, so why don't we stop trying to do a
make beforeinstall in it. :)


# 8854 29-May-1995 rgrimes

Remove trailing whitespace.


# 8489 13-May-1995 rgrimes

Submitted by: jkh

Build lib/libncurses and lib/libtermcap early in the libraries: target
as other libraries depend on them.


# 8304 06-May-1995 rgrimes

Add usr.sbin/pcvt/keycap to libraries: target.


# 8295 05-May-1995 rgrimes

In target libraries: make and install libcompat before all other
libraries. This fixes the make -DCLOBBER world problem.

Check that gnu exists before attempting to build the libraries in
that branch of the tree.


# 8095 27-Apr-1995 jkh

Add libftp to list of beforeinstall targets in the include rule.
Submitted by: John Hay <jhay@mikom.csir.co.za>


# 7446 28-Mar-1995 sos

Fixed most: target gnu/usr.sbin was install not all


# 7407 26-Mar-1995 rgrimes

We must do include and lib first so that the perl *.ph generation
works correctly as it uses the header files installed by this.


# 7292 23-Mar-1995 rgrimes

Add gnu/usr.bin/ld to lib-tools: since you need this compiled very
early if you are running a back release.


# 7281 23-Mar-1995 rgrimes

Fixed last defined(WANT_MSUN) -> !defined(WANT_CSRG_LIBM) in the src tree.


# 7171 19-Mar-1995 ats

Correct one little typing error from Rod :-).
lib/lib/pcap -> lib/libpcap.


# 7154 19-Mar-1995 rgrimes

Add installation of include files from libpcap.


# 7130 18-Mar-1995 rgrimes

Use new mtree file to rebuild /usr/include.


# 7108 17-Mar-1995 phk

Have include be the first $SUBDIR, this avoid install failure with the
kludgeous install rule in perl/x2p.

Pointed out by: rgrimes


# 7059 14-Mar-1995 roberto

Add gnu/usr.sbin in the installmost and most targets.
Reviewed by: roberto
Submitted by: Remy.Card@blaise.ibp.fr


# 6934 06-Mar-1995 se

Add missing double quote (") in "echo".

Submitted by: wolf@kintaro.cologne.de


# 6927 06-Mar-1995 nate

Since at least one utility depends on it (GNU diff), install the gnu regex
include file (gnuregex.h) in the includes target.


# 6722 25-Feb-1995 phk

use etc:distrib-dirs instead of release:hierarchy. remove SUBDIR reference
to release.


# 6262 09-Feb-1995 jkh

Eliminate a duplicate line.
Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>


# 5866 24-Jan-1995 ache

Add libscsi to includes target


# 5865 24-Jan-1995 ache

Add libforms to includes target


# 5772 21-Jan-1995 wollman

`make world' fixes from Pat Barron, Mark Murray.
Closes PR #156.


# 5749 20-Jan-1995 wollman

Add libcom_err to `includes' target so CLOBBERing the world works again (we
hope).


# 5728 19-Jan-1995 wollman

Added `compile_et' and `mk_cmds' to lib-tools target, as they are needed
to build `libss'. Also delete bogus old /usr/sbin/compile_et at this time
(sorry, it was the only way I could think of to make sure it died).


# 5573 13-Jan-1995 wollman

Delete obsolete references to kerberosIV.


# 5511 11-Jan-1995 jkh

Ack! Mk must go before cleandist in the world rule now. Otherwise
cleandist will fall over at gnu/lib/libreadline/doc when bsd.info.mk
is not found.


# 5366 03-Jan-1995 nate

Added new lib-tools target used in make world which rebuilds and
installs 'ar', 'nm', and 'ranlib' to avoid bootstrapping problems from
the old utils which don't support the long archive names.


# 4942 04-Dec-1994 ache

Add libtermcap to includes target


# 4486 14-Nov-1994 phk

More changes for the "distribute" target.


# 4249 07-Nov-1994 ache

Add gnu/include to includes target


# 4054 01-Nov-1994 pst

Make make world -DCLOBBER work again .. grrr


# 3626 15-Oct-1994 wollman

For those who want a little more control over their build process...

Added two new targets, `most' and `mostinstall', which compile and
install (respectively) just the binaries from just the ``core'' parts
of the system. This makes it easier to do something like the following
(which I do):

# cd /usr/src
# make obj depend
(scrutinize make output)
# make most
# make mostinstall

...which will not confuse things by installing new libraries, /usr/share,
games, gcc (two extra times), and so on. Obviously, if you do this, then
you have to be careful to watch for changes in include files and make macros,
and do the appropriate thing in those cases. (It usually still doesn't
involve building GCC three times or libc six.)


# 3518 11-Oct-1994 ache

Add libdialog to beforeinstall section


# 3429 08-Oct-1994 ache

libmytinfo, libncurses added to 'make beforeinstall' sequence


# 3242 30-Sep-1994 paul

If WANT_MSUN is defined then math.h needs to be installed from the
msun library.


# 3213 29-Sep-1994 pst

make includes needs to do a beforeinstall in libskey


# 3197 29-Sep-1994 csgr

First level of changes for bringing in eBones (kerberos).
- Get rid of inverse logic (NOKERBEROS and NOEBONES) in src/makefile,
and replace with MAKE_KERBEROS and MAKE_EBONES. (Far fewer contortions,
and both default to off.) IF YOU WANT KERBEROS, YOU HAVE TO EXPLICITLY
DEFINE ONE OF THESE.
- Make Makefiles kerberos-aware.


# 3030 23-Sep-1994 rgrimes

Spell hierarchy correctly :-(.


# 3029 23-Sep-1994 rgrimes

Converted to use release/Makefile hieriarchy:.

Disabled SUBDIR+= etc until I get done with the conversion.


# 2883 19-Sep-1994 phk

Need to call on libmd in "includes" target.


# 2834 16-Sep-1994 wollman

Per discussion on the mailing-lists, move LKMs from /sbin to /lkm, and
arrange for that directory to get created by mtree. Also, process secure
directory after all the others, because the programs there may overlay
ones installed from the main part of the tree.


# 2685 12-Sep-1994 rgrimes

Enable call to beforeinstall for libg++ and add one for libreadline.


# 2626 09-Sep-1994 csgr

Changes required for bringing in eBones (kerberosIV - des + des ;-))
- check for directory "eBones"
- add checks for define "NOEBONES"
- get includes and libraries targets set up.


# 2468 03-Sep-1994 paul

Taken update rule out of world target so it doesn't try and sup and
update every time you build world if you've enabled it.

Merged all the gnu library targets into one. libg++ isn't in the
gnu/lib/Makefile anyway so it's still disabled.

Enabled building of lex library -- this was stopping make world working.

Submitted by: Paul Richards


# 2303 26-Aug-1994 paul

Removed an echo about directories not being enabled.

I removed libkern for the libraries target in the last commit too but
forgot to mention it.
Reviewed by:
Submitted by:


# 2302 26-Aug-1994 paul

Added an update target. It does nothing by default but you
can enable things in /etc/make.conf if you wish for those
who might want to use it.

directories has got enabled by this patch too whch I hadn't meant
to do but there's no harm in it since the mtree stuff has been
pulled over now.

Reviewed by:
Submitted by:


# 2279 25-Aug-1994 paul

Added libkern to list of libraries to build.
Deleted mdec target, the bootblocks should get built during
the normal build process now that the sys/Makefile works.

Submitted by: Paul Richards


# 2273 25-Aug-1994 paul

Removed all refernces to *26 directories.
Reviewed by:
Submitted by:


# 2160 20-Aug-1994 csgr

- turn NOCRYPT off
- add NOSECURE and NOKERBEROS
- turn NOKERBEROS on
- add secure directory

(NOCRYPT now has a blanket effect over src/secure and src/kerberosIV,
while NOSECURE and NOKERBEROS control these indiviually.)
Submitted by: Geoff


# 2079 16-Aug-1994 jkh

Whoops, nuke libobjc until we have it too.
Submitted by: jkh


# 2069 14-Aug-1994 jkh

cc -> cc26 for now.
Submitted by: jkh


# 2068 14-Aug-1994 jkh

Kill an errant libg++ entry.
Submitted by: jkh


# 2061 13-Aug-1994 jkh

This is the first attempt to drag the top level Makefile Rod sent me
into 2.0. It will surely need more work.
Submitted by: jkh


# 2007 10-Aug-1994 jkh

Remove kerberosIV until it works or is replace with eBones.. It's
hosing my build worlds..
Submitted by: jkh


# 1914 07-Aug-1994 jkh

Remove `old' directory.
Submitted by: jkh


# 1911 07-Aug-1994 jkh

Whap games too, for now. As people add this stuff back, they can
change the Makefiles, but I'm trying to get as much of the world to
build as possible at the moment.
Submitted by: jkh


# 1909 07-Aug-1994 jkh

Remove contrib, add gnu to reflect current state of the tree so that I can
at least build obj links from the top.
Submitted by:


# 1595 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1594,
which included commits to RCS files with non-trunk default branches.


# 1594 27-May-1994 rgrimes

BSD 4.4 Lite Top Level Sources