* Rewrite src/tools Make logic to work like the rest of the tree wrt
"dependall" and "install". The old "make build" hack is gone.
* Remove the MKTOOLS logic. This was linked to the "make build" hack,
and was only needed because TOOLDIR originally had no writable default.
* Redo the GNU configure/make logic to make it fit reasonably in a
BSD make wrapper. Use new ${.ALLTARGETS} variable to scan for
targets in $(srcdir), and mark them with .MADE: to prevent rebuilding.
* Only build cross tools in src/tools; remove some messy logic in
src/usr.* and src/gnu/usr.* that would do target filename rewriting
(improves consistency and readability).
* Add the ability to build cross gdb at tool build time by setting
MKCROSSGDB (default no) to "yes" in mk.conf.
* Add src/tools/groff and set up paths to work with this cross groff.
just don't build the tools if USETOOLS!=yes. This permits objdirs to
be created even when USETOOLS=no.
* Clean up use of "-m" by specifying it to .MAKEFLAGS: if needed.
for broken builds is to fix the relevant Makefiles as was done for sparc.
This was done in the interest of simplicity of the system build (and the
fact that there may be a need to descend into these directories in the
near future).
subdir list as anything building into them will access them directly (ala
the make release rule or the mtree rule). There were good reasons for
controlling this at the top level before and those should remain in place.
On cleandir and obj builds these should get run through but that's it for
the "normal" rule sets. (This was breaking the builds as make includes doesn't
function inside of distrib for instance).
${USETOOLS} != "no"
to
${USETOOLS} == "yes"
to allow USETOOLS to be tri-state: "yes", "no", or "never". The use of
these options will be documented in src/BUILDING.
- "make build" cannot be invoked from the command line at the same time as
any standard recursive target except "obj" and "cleandir", as things like
"make all release" can lead to unexpected results.
- Put everything in SUBDIR, and auto-weed missing directories. This allows
the standard targets to work as expected (including in tools, etc, and
distrib).
- Leverage .for loops to simplify the prerequisite dependall/install phase
of compile-time dependencies (lib/csu, lib, gnu/lib). These are now all
distilled into one component rule ("do-build").
- Use the actual targets of obj, cleandir, and includes; no need for double
indirection goop in this case.
- GC all the deprecated "domestic" cruft. We are officially using (and
fixing, where appropriate) the cryptosystem integrated into src/crypto.
- Collapse the whatis.db build rule into a dependency of "afterinstall",
and nuke the "_BUILD" cruft.
variable TRUE defined in our makefile system.
This prevents "make includes" from breaking with older bsd.subdir.mk, and is
more consistent with the uses of "true" in the rest of the tree.
"make cleandir". Fixes PR bin/14177.
"make build"'s logic and the conventional <bsd.subdir.mk> logic probably
need to be split apart here at some point to prevent these kinds of things
from causing odd problems in the future....
file in order to get proper definitions for a build. (Temporary; this
Makefile will be moved to a new name and replaced with a bootstrap Makefile
in the near future.)
i386 platform builds must now set TOOLDIR in mk.conf or the
environment in order to build the system. This is a pathname
where host build tools will be installed, and must NOT be
the same as src/tools.
(Optionally, USETOOLS=no can be set in the environment if you
wish to avoid using the separate host toolchain for building a
subtree. Otherwise, this will default to "yes" automatically.)
However, building with USETOOLS=no set and no defined TOOLDIR ends up
with breakage, as the do-make-tools target is run regardless of whether
or not USETOOLS is set.
Hence, a wrapper around the body of the do-make-tools target:
.if ${USETOOLS} != "no"
...
.endif
...which makes the build work when USETOOLS=no, with no TOOLDIR set. This
would seem to more accurately match the description put forth in UPDATING.
In the new build world order, DESTDIR is set to "" (in Makefile.tools)
if not already set, to ensure correct include/library handling. This
caused the top-level to not set DESTDIR=/, which confused distrib-dirs,
since it doesn't include Makefile.tools, and thus didn't see the same
DESTDIR that the top-level did.
set, will descend into "tools" to build a toolchain, and use that toolchain
explicitly for the build (via tools/Makefile.tools).
While here, GC all the "egcs-detection" logic; it's not needed anymore, since
nothing is on gcc 2.7 any longer.
comments in src/Makefile):
# Sub targets of `make build,' in order:
# buildstartmsg: displays the start time of the build.
# beforeinstall: creates the distribution directories.
# do-force-domestic: check's that FORCE_DOMESTIC isn't set (deprecated.)
# do-share-mk: installs /usr/share/mk files.
# do-cleandir: clean's the tree.
# do-make-obj: create's object directories if required.
# do-check-egcs: check's that we have a modern enough compiler (deprecated.)
# do-make-includes: install include files.
# do-lib-csu: build & install startup object files.
# do-lib: build & install system libraries.
# do-gnu-lib: build & install gnu system libraries.
# do-dependall: builds & install the entire system.
# do-domestic: build & install the domestic tree (deprecated.)
# do-whatisdb: build & install the `whatis.db' man database.
# buildendmsg: displays the end time of the build.
this is something i've wanted to do for years....
adding support for Heimdal/KTH Kerberos where easy to do so. Eliminate
bsd.crypto.mk.
There is still a bunch more work to do, but crypto is now more-or-less
fully merged into the base NetBSD distribution.
overrideable in mk.conf
Document in bsd.README; this is distinct from "MKOBJ", which controls
whether "make obj" does anything.
In the top-level makefile, if MKOBJDIRS != "no", do a "make obj" at an
appropriate point during a "make build".
and 'install' targets to descend into the domestic subtree. This is
generally a bad idea unless one knows precisely what they're doing,
but we'll provide the rope anyway (with the appropriate warnings).
Document both EXPORTABLE_SYSTEM and FORCE_DOMESTIC at the top of the file.
announced in a reasonable forum. Further, it adds significant overhead to
the build process, and doesn't work correctly when a non-root DESTDIR
build is attempted (unless texinfo is already available, which of course
makes this change unnecessary).
some programs like /usr/libexec/ftpd, need the kerberos etc libraries.
XXX: In reality programs like these should be moved to the domestic tree!
I would have assumed that if I make install in the exportable tree, I will
not install any domestic binaries!!!
the domestic tree if we are building an EXPORTABLE_SYSTEM.
Translate the conditional to English so as to avoid future problems
when people are tempted to modify it.
which has side effects, use _BUILD to determine whether we ought to
install things in the domestic subtree. Otherwise, the core idea from
the last revision is unchanged.
failed to account for how a 'make distribution' would get the proper bits
into the distribution tree. To correct this, we set EXPORTABLE_SYSTEM
while doing a 'make build' in order to avoid trying to install not-yet-
generated headers and binaries. I've also made the required adjustment
to the condition that adds "domestic" to SUBDIR.
This is too hairy and needs to die, but I don't see how it can until
we integrate the crypto bits into the main body of the tree.
obj, clean, cleandir and distclean. This reduces the chance of problems
(and the need to re-run make obj) if one is switching back and forth
between EXPORTABLE_SYSTEM and not, as US/Canadian developers tend to do.
parallel for a 'make build' (using make's -j flag). Only CPU-intensive jobs
are started in parallel.
Document the variables useable at the begining of the makefile
(NBUILDJOBS NOMAN NOSHARE UPDATE DESTDIR). Feel free to add documentation
for the ones I forgot !
Instead:
* If upgrading the compiler, build it *first*, before anything else.
* If upgrading the compiler and DESTDIR is set, barf.
This guarantees that libgcc is built during the library stage.
- If USE_EGCS is set, rebuild egcs's libgcc and install it
(unless DESTDIR is set and system compiler is not gcc 2.8,
in which case print a warning message and do nothing).
- Do not rebuild gcc 2.7's libgcc. egcs can build this fine.