Commit Graph

153 Commits

Author SHA1 Message Date
tv 7e7d9dbd76 The top level has an objdir now, so make sure to cd to ${.CURDIR} when
recursing in-place.
2001-11-13 03:17:12 +00:00
tv b5cd2489b2 Major overhaul of src/tools and host toolchain. Summary of changes:
* 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.
2001-11-12 23:16:17 +00:00
tv 79ca4cf1a1 Create an objdir here for storage of timestamps, build-wide data, and so
forth.
2001-11-11 22:40:42 +00:00
tv 3980e269f9 By popular demand, one preformatted version of BUILDING, plaintext, no CRs. 2001-11-01 16:34:21 +00:00
tv 4ef4ea21a1 Revert previous. <bsd.own.mk> already defaults MKOBJDIRS to "no". Also
clean up the evaluation of ${MKOBJDIRS} later -- no need for :Uno.
2001-11-01 16:30:53 +00:00
jmc 5f2c8aaa60 Add back original behavior of MKOBJDIRS defaulting to "no" so it doesn't
force people to set yet another variable to get the expected behavior
2001-11-01 15:48:39 +00:00
jmc 100b449518 Add back logic which forces DESTDIR=/ for the distrib-dirs rule if it's not set
or it's blank. The new toolchain rules set it to blank which can run into
the sanity checks in etc/Makefile
2001-10-31 19:41:54 +00:00
tv c9a6a2c359 * Always descend into "tools" regardless of USETOOLS setting. Instead,
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.
2001-10-31 01:20:09 +00:00
tv 972dc83c9b Work around parallelism lossage, because .ORDER doesn't work yet
(noted in PR bin/14404).  This will be fixed back to using .ORDER later.
2001-10-30 17:59:10 +00:00
tv 83805cdad7 Add rules for generating plaintext and HTML versions of the "BUILDING"
document automatically (to be checked in when BUILDING.mdoc is changed).
2001-10-29 19:48:35 +00:00
tv ceb7997de9 Re-add intermediate dependall/install targets (do-lib-csu, do-lib,
do-gnu-lib) to permit restarting broken builds in the middle.
2001-10-24 03:21:20 +00:00
tv f2fc1b7b7d Add shortcut rules to avoid going into distrib on unneeded (and in some
cases, currently broken) targets.
2001-10-24 02:45:34 +00:00
tv 2970104486 Revert previous. etc and distrib do now belong in _SUBDIR; the correct fix
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).
2001-10-24 01:07:13 +00:00
jmc bf87bd3e66 Remove distrib and etc from _SUBDIR. These should never get added to the
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).
2001-10-21 08:03:01 +00:00
tv 02f4c7942d Add a couple more shortcut rules for the "tools" subdir to prevent recursion. 2001-10-19 14:17:52 +00:00
tv 04f0c5e946 Change
${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.
2001-10-19 03:19:01 +00:00
tv 952ac49eba Overhaul and simplify the top level Makefile, and add some sanity checking.
- "make build" cannot be invoked from the command line at the same time as
  any standard recursive target except "obj" and "cleandir", as things like
  "make all release" can lead to unexpected results.

- Put everything in SUBDIR, and auto-weed missing directories.  This allows
  the standard targets to work as expected (including in tools, etc, and
  distrib).

- Leverage .for loops to simplify the prerequisite dependall/install phase
  of compile-time dependencies (lib/csu, lib, gnu/lib).  These are now all
  distilled into one component rule ("do-build").

- Use the actual targets of obj, cleandir, and includes; no need for double
  indirection goop in this case.

- GC all the deprecated "domestic" cruft.  We are officially using (and
  fixing, where appropriate) the cryptosystem integrated into src/crypto.

- Collapse the whatis.db build rule into a dependency of "afterinstall",
  and nuke the "_BUILD" cruft.
2001-10-19 02:35:45 +00:00
nathanw 7f59122d03 Use @true instead of @${TRUE} in includes-foo targets, since there is no
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.
2001-10-12 21:05:08 +00:00
jwise 5afee0c76e Do not descend into `tools' on make clean{dir,} if USETOOLS=no, as doing
so without TOOLDIR set will blow up.
2001-10-10 17:20:15 +00:00
tv 1c63cc9689 Add "tools" to the list of subdirs for an explicit "make obj" or
"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....
2001-10-08 23:42:21 +00:00
tv b9adda39a5 Use ${.CURDIR}/share/mk to include bsd.own.mk and bsd.subdir.mk into this
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.)
2001-10-04 17:59:49 +00:00
mason db2a0203e7 UPDATING (1.38) says:
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.
2001-10-01 17:19:17 +00:00
tv 284306ffbc Put do-make-tools before creating distrib-dirs (as binstall has to be
available before making distrib-dirs).
2001-09-22 12:30:13 +00:00
tv 932e899041 Always use src/share/mk as the source of the system .mk files for a build. 2001-09-22 05:37:17 +00:00
tv 96c33ddcbf - Remove the include of Makefile.tools; this will be done elsewhere.
- Skip the "includes" phase of bin, games, libexec, regress, sbin, and usr.sbin.
2001-09-21 21:01:13 +00:00
thorpej 6404ba3e23 Make sure DESTDIR is always set when calling the distrib-dirs target.
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.
2001-08-17 15:05:50 +00:00
tv 696081f651 The final step -- hook src/tools into the main build. If USE_NEW_TOOLCHAIN is
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.
2001-08-14 14:04:35 +00:00
enami 0acf15b497 Wrap a long line. 2001-08-02 06:13:33 +00:00
mrg 5ff40e0f85 clarify some variable documentation; from cagney 2001-06-10 13:15:29 +00:00
mrg 1b93d2abed make previous work with -j. idea from cagney 2001-06-10 13:12:32 +00:00
mrg c6c1b82528 fix PR#12832: split `make build' up into these steps (from new the
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....
2001-06-10 13:02:54 +00:00
sommerfeld 50cca24c03 parallelize the obj pass, too 2001-05-08 02:04:08 +00:00
deberg 273b2d0b3a if building w/o a DESTDIR, grab the system make files from the source
tree until they've been installed.
2000-10-07 17:18:17 +00:00
fredb 38699e82c4 Descend into distrib on "make cleandir", too. This will let "make build"
with "MKOBJDIRS" set do the right thing in distrib.
2000-08-19 22:09:08 +00:00
toddpw 8b89060c30 Document the cool NOCLEANDIR/NOINCLUDES options that somebody added. 2000-08-05 10:17:35 +00:00
thorpej e7d6b96938 Merge a bunch of things from crypto-us and crypto-intl into basesrc,
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.
2000-06-20 06:00:24 +00:00
mrg 2c335fc580 remove two of the previous ${_M}; they were invoked before $DESTDIR/share/mk may have existed. add one more. 2000-05-21 07:33:05 +00:00
thorpej d17109a1ae Add ${_M} where it was missing in a few places. 2000-05-18 23:16:28 +00:00
thorpej f41cffbb8b HAVE_GCC28 -> HAVE_EGCS, and make it match gcc 2.9, as well. 2000-05-09 00:17:10 +00:00
sjg 9ec8f0f8e8 if MAKEOBJDIRPREFIX defined, include etc in make obj 2000-05-06 07:53:53 +00:00
mrg 1f196e5b67 use MKSHARE=no instead. 2000-04-11 08:21:41 +00:00
mrg 1ae7478b2a fix long standing bug in `make build' with $DESTDIR:
- during `make build' after /usr/share/mk has been installed, call
  make with `-m $DESTDIR/usr/share/mk'.
2000-04-10 14:47:22 +00:00
simonb d9b15587d5 At least one crypto-intl lib has an info file(s) - add MKINFO=no to the
early build of ../src/lib ala ../src/gnu/lib.
2000-04-09 02:09:49 +00:00
jlam 01d48867ea Handle new make variable BUILD_DONE which creates an empty build target if
it is set.
2000-03-11 00:10:20 +00:00
cjs cb61b13f55 When you type `make obj', make obj dirs in distrib whether or not you
have MKOBJDIRS variable set.
2000-03-08 00:50:05 +00:00
erh 671a37a17f Add a buildmsg target for build to depend upon instead of using an ifmake block. "make snapshot" now echos the start of build time. 2000-02-29 21:54:03 +00:00
mycroft 0d8613ba36 share/tmac is now installed by `make includes', so don't do it again. 2000-02-26 17:42:53 +00:00
aidan 3286ebd2e0 Make 'make build' hook into crypto-tree for crypto specific build-time
dependencies.
2000-02-19 17:49:49 +00:00
assar 84e55c17c3 make sure include and include/sys are populated before starting to
make includes in lib
2000-02-01 01:22:05 +00:00
simonb e57fa9afe4 After ${MAKE} obj, explicitly make obj dirs in ${.CURDIR}/distrib as well. 1999-12-05 22:53:53 +00:00