Commit Graph

338 Commits

Author SHA1 Message Date
lukem 65a97445c7 correct the comment describing the build order 2005-01-01 10:32:39 +00:00
tacha 8c200b07b6 DO do-gnu-lib-crtstuff${LIBGCC_EXT} only when ${HAVE_GCC3} != "no",
since we don't have crtstuff subdirectory.
2004-09-02 02:02:38 +00:00
thorpej 8d13a4aafe Switch to using GCC's supplied crtbegin / crtend files. 2004-08-28 00:18:38 +00:00
lukem 67ea767431 The do-lib-libdes BUILDTARGET is unnecessary now we have the DEPLIBS
support that I added to src/lib/Makefile.inc.
2004-07-30 07:05:11 +00:00
lukem fe7056555c Move '${MAKEDIRTARGET} x11 distribution' from Makefile::distribution to
etc/Makefile::distribution, and only perform if ${MKX11}!=no.
Should fix a problem experienced by Alistair whilst doing a "make release".
2004-05-17 07:00:16 +00:00
lukem 46ebb2f9d6 Perform 'make distribution' in ./x11/ as part of the distribution target. 2004-05-16 10:27:21 +00:00
lukem f1b860ea33 Convert lines of the form
(cd ${.CURDIR}/somedir && ${MAKE} AVAR=value atarget)
to
	${MAKEDIRTARGET} somedir atarget AVAR=value
which results in a "prettier" display of these operations
2004-04-13 12:43:12 +00:00
skrll b263dbdd73 Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

        - creates libgcc, libgcc_eh and libgcc_s

        - updates LIBGCC_SPEC to use them appropriately.

          There's a hack in here at the moment with respect to libgcc_so in that it
          is preferable to link against libgcc_so will only when -shared-libgcc is
          specified (the c++ frontend does this automatically.) Configurations where
          LINK_EH_SPEC is defined already do this. The gcc configuration for
          NetBSD/alpha and another NetBSD platform (I forget which) actually define
          LINK_EH_SPEC probably by accident rather than design.

        - updates share/mk to use the compiler's knowledge of what needs linking into
          libraries and executables. This removes an hppa hack.

        - updates the sets for the newly created libgcc* files.

	- support for linking against the _pg version of libgcc has been removed.
2004-02-15 19:52:27 +00:00
lukem 9163f6b3c7 MAKEVERBOSE support for build-docs 2004-02-06 23:12:56 +00:00
lukem cce7832fa3 implement params with cd etc && make params 2004-01-27 04:22:25 +00:00
lukem 8dfb23932f Apply the .PHONY attribute where appropriate.
Fixes [toolchain/21453] from rafal@.
2004-01-27 01:45:07 +00:00
lukem 04be9e71df Implement do-x11, to run "make build" in ./x11/
If MKX11 != no, add "do-x11" to BUILDTARGETS.

Say ``hello'' to Imakeicide.
2004-01-08 07:01:06 +00:00
lukem b83d8ffd8d rename release-info to etc-release
rename  install-release-info  to  install-etc-release
2004-01-06 07:25:40 +00:00
lukem 03e3f5841d Run "cd etc && make install-release-info" at the end of the "build" target.
Based on Hubert Feyrer's suggestion on tech-userlevel@.
2004-01-04 13:30:09 +00:00
lukem 9bd1a531bc only build do-lib-libdes if ${MKCRYPTO}!=no 2004-01-04 00:27:15 +00:00
lukem 986979b8c9 Consistently check ${TOOLCHAIN_MISSING} against "no". 2004-01-03 14:04:27 +00:00
lukem ef51feb33d fix some comments 2003-12-05 22:33:01 +00:00
salo 8d1781e39d netbsd.org->NetBSD.org 2003-07-26 17:06:22 +00:00
mrg 08bf39bbff maybe build gnu/lib/libgcc3 instead of libgcc[2] 2003-07-25 19:20:47 +00:00
lukem 6744817c5c document do-lib-libdes 2003-07-25 00:26:35 +00:00
fvdl c3c0b26160 Make and install libdes before the rest; libkrb needs it.
XXX there must be a better way.
2003-07-24 21:54:07 +00:00
lukem aac682b31f tweak how postinstall-fix-obsolete is made. (may fix various problem reports) 2003-07-21 02:01:42 +00:00
lukem 83f3fb1e14 redo previous (functionality rollback of 1.213) to retain the style of 1.213 2003-07-20 13:08:43 +00:00
wiz 621fbc6bf8 Undo revision 1.213 now that grotty is fixed. Tested by lukem, thanks! 2003-07-20 13:03:47 +00:00
lukem f134f3dc38 Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.
2003-07-18 08:26:01 +00:00
lukem 5df8689a0e grotty from groff 1.19 needs -c for -b, -o or -u to work.
This is damn annoying, because it means the old method of "groff -P-bou"
won't suppress escape codes, unless -P-c is also provided.
(Mmm, quality software...)
2003-07-18 02:15:17 +00:00
lukem 2e2475c707 Add postinstall-fix-obsolete (to invoke "postinstall fix obsolete" -
funny that :), and call in "distribution" just before the "make checkflist".
Should minimise a bunch of the "I use make UPDATE= and checkflist failed"
errors, but not all of them.
2003-07-17 07:46:11 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
lukem abeae9d450 add MAKECONF to vars that "params" target shows 2003-07-08 04:25:21 +00:00
lukem 82410a60aa Add "params" target, to display the value of various variables.
This is part of a broader plan to improve diagnostics & support
to end-users of build.sh.
2003-07-06 13:04:01 +00:00
lukem b77f948f26 update "targets invoked by make build" to match reality ... 2003-07-05 04:32:58 +00:00
drochner a57096ca00 build libgcc early, if at all 2003-06-26 17:46:56 +00:00
lukem b7d3d22051 Add "sourcesets" argument/target, which builds source sets into
RELEASEDIR/source/sets
2003-05-10 07:12:37 +00:00
thorpej 6f1c0df1ee .WAIT before distrib, since distrib may need things built earlier
in the build process.
2003-04-18 19:14:39 +00:00
thorpej 9871c6a16c libcrypto no longer depends on libcrypt, so there is no need to build
it early.
2003-04-17 00:33:44 +00:00
thorpej 015903956e Fix merge botch in last. 2003-04-04 01:16:28 +00:00
thorpej 167192b8c4 Always build tools/compat, so that random host helper programs
can use libnbcompat, if necessary.
2003-04-04 01:06:00 +00:00
mycroft 76126365c9 Link libcrypto against libcrypt to make sure crypt() is still there -- and
therefore build it earlier in the build process as well.
2003-04-03 00:41:50 +00:00
lukem 4f6381b784 all:
Use /var/db/obsolete instead of /etc/obsolete

etc/Makefile:
	Create separate target "install-obsolete-files" to populate
	/var/db/obsolete, instead of using "install-etc-files".

Makefile:
	Add do-obsolete target, to run "cd etc && make install-obsolete-files",
	and add this to BUILDTARGETS.
	This moves the "obsolete files" creation from "distribution" to "build".


Per discussion with Andrew Brown.
2003-02-22 03:20:45 +00:00
lukem 4e91f80fa2 - Add "sets" top-level Makefile target and build.sh operation.
[Latter suggested by Julio Merino in private email]
- Add "help" build.sh operation.
2003-01-26 06:19:12 +00:00
lukem 4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
lukem b4f786a8d6 Add an obj rule to create ${KERNOBJDIR} here, at the end of the "make obj"
pass.  (etc/Makefile doesn't create this any more).
2003-01-04 15:50:32 +00:00
lukem a250e57c96 Install release files under "${RELEASEDIR}/${MACHINE}/..." instead of
"${RELEASEDIR}/...".

${RELEASEDIR} is never cleaned , and ${RELEASEDIR}/${MACHINE} is only
cleaned if UPDATE is not defined.
2003-01-03 15:34:30 +00:00
atatat 17f1d328bd The obj target for src/etc is invoked too early for it to function
properly in a clean tree (bsd.subdir.mk makes the obj target in
.CURDIR depend on the recursive targets).  If "make obj" is invoked a
second time, the problem will correct itself.  To work around this:

(1) Before including bsd.subdir.mk, create a target called "obj-etc"
so that the "regular" one (from bsd.subdir.mk) won't be instantiated.

(2) After including bsd.obj.mk, create a "real" obj-etc target that
does the required work with .USE as a "source" so that we can merely
cons it onto the actual obj target.  Note that this is only done if
the obj target has commands (ie, NOOBJ was not set and MKOBJ was not
no and whatever else you might have come up with) and we would have
recursed into etc anyway (etc is in the SUBDIR list).

This makes the obj target in src/etc get invoked *after* the obj
target in the root of the source tree so that KERNOBJDIR will have the
correct value.

Reviewed by lukem.
2003-01-02 23:15:27 +00:00
lukem fb684df6a8 fix DESTDIR checks if !defined(DESTDIR) 2002-12-26 12:01:48 +00:00
lukem fdbcc834bb * Add two new (experimental) targets:
buildworld	Builds a distribution into DESTDIR as per
			"make distribution", except that DESTDIR
			*must* be defined and *must not* be "" or "/".

	installworld	Copies (using distrib/sets/maketars -i ...) from
			${DESTDIR} to ${INSTALLWORLDDIR} (defaults == `/'),
			and then runs "postinstall-check" against
			${INSTALLWORLDDIR}.
			If ${INSTALLWORLDDIR} == "/", ensure that
			`uname -s` == "NetBSD" and `uname -m` == ${MACHINE},
			to prevent nasty accidents...

* Tweak some comments
2002-12-21 16:43:33 +00:00
lukem cc7d629612 improve previous; show times at end of distribution/release/snapshot as well 2002-12-02 08:27:03 +00:00
lukem a826bbcb62 show the start time at the end of the build as well.
inspired by [misc/18173] from Julio Merino.
2002-12-02 08:23:41 +00:00
lukem ac422fecfe Add do-{target} aliases for: cleandir obj includes
to be consistent with the other do-TARGET targets for make build.
(These are not used by "make build" per se, they're just to make my
life easier)
2002-11-29 23:48:37 +00:00
itohy cbb1f0fb0f MKDYNAMICROOT for a.out 2002-11-12 14:33:48 +00:00
lukem d7d0f4149a move BUILDING.mdoc -> doc/BUILDING.mdoc 2002-09-21 08:19:27 +00:00
thorpej 3b08abd277 * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

  TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
  no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

  EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
  an external toolchain (e.g. /usr/local/gnu).  This enables the cross-build
  framework even for TOOLCHAIN_MISSING platforms.

  If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
  unconditionally set to "no", since the bits are not there to build.

  If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
  since the external toolchain's compiler is not in-sync with the
  in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
  that file can use it.
2002-09-17 23:18:25 +00:00
thorpej cb6a0e6be0 Add a do-lib-libc target which is processed after do-lib-csu. This
ensures that the results of the libc build are available to other
lib builds (notably, llib-lc.ln).
2002-09-14 16:46:24 +00:00
lukem c2b25c67f3 print date when make {distribution,release,snapshot} finished 2002-08-30 06:30:33 +00:00
lukem 0cedce33e5 add "do-ld.elf_so" target, which builds & installs libexec/ld.elf_so.
call after do-gnu-lib but before do-build.
2002-08-26 04:40:20 +00:00
lukem 6e26645246 descend into "rescue" 2002-08-22 02:23:23 +00:00
uwe b00bce7880 Fix botch in previous. Actually do "build" for "distribution". 2002-07-10 23:44:54 +00:00
thorpej 9f5077e3a3 After running the body of the "distribution" target, do a "checkflist", so
that people doing fresh builds into NFS root areas will know if their builds
are incomplete.
2002-07-10 18:55:20 +00:00
drochner 4a475cf859 find the Makefile for postinstall-check in the presence of ${.OBJDIR}s 2002-06-26 16:28:18 +00:00
thorpej acbbadfc02 Fix what rev. 1.176 broke, in particular, doing a priv'd build into
an NFS root area for a diskless client.  In such a situation, you
DO want the postinstall-check to be run.

The circumstances under which postinstall-check is now run:
* UNPRIVED is not set.
* The original target invoked was not distribution, release, or
  snapshot.
2002-06-26 00:10:16 +00:00
enami 448f2a8c1a Fix whitespace usage in comment. 2002-06-20 08:21:59 +00:00
enami fbd7819d66 Change directory to .CURDIR before invoking ${MAKE}. 2002-06-20 08:21:23 +00:00
lukem a4a1de1457 In afterinstall, only run postinstall check if DESTDIR == / (or equivalents).
Fixes [misc/17275] from Gregory McGarry <g.mcgarry@ieee.org>
2002-06-19 00:17:11 +00:00
lukem 42f8815d89 Change -s srcdir and -d destdir so that they don't contain the "/etc" portion.
srcdir now defaults to /usr/src (from /usr/src/etc).
destdir now defaults to / (from /etc).
2002-05-07 02:11:07 +00:00
lukem d918d8f74f Move the METALOG from ${_SRC_TOP_OBJ_} to ${DESTDIR}.
There were too many synchronisation problems with using the former;
including situations such as a "make clean" performed between two
installs to the same DESTDIR would result in a truncated METALOG and
the resultant sets would be missing stuff such as include files that
don't get reinstalled if they haven't changed, even with !UPDATE.
2002-05-03 08:58:45 +00:00
sommerfeld 965e0acae4 Correct BUGS in BUILDING.mdoc now that most ports are USE_NEW_TOOLCHAIN
Obsolete NBUILDJOBS; build.sh just passes -jN through to make(1),
which inherits it cooperatively through the build tree.  Fix
documentation so that it's shown to be deprecated.

If you use build -jN, please save full build logs so that errors due
to missing dependancies can be analyzed and corrected.
2002-05-02 22:13:30 +00:00
bjh21 f44c794643 Use printf rather than echo -n, since the former works on all POSIX systems. 2002-05-02 16:36:21 +00:00
lukem 4d5e7bcd0b we might as well provide a handy "postinstall-fix" target whilst here 2002-04-29 12:14:36 +00:00
lukem 1338b74b9f move postinstall from afterinstall to separate "postinstall-check" target.
requested by Matthias Scheler <tron@zhadum.de>.
2002-04-29 12:09:13 +00:00
lukem f9eb7d99f0 run "./etc/postinstall check" in afterinstall: 2002-04-27 08:11:53 +00:00
tv d42f167bc5 Revert previous so crtbeginS and crtendS are available. 2002-04-11 19:31:06 +00:00
tv d536f9a644 We don't need to do "install" of lib/csu specially. Just install it with
the rest of lib.

(None of lib/* needs csu installed in order to link.  In the USETOOLS!=yes
case, csu may even depend on a newer libc, so installing csu before
compiling host tools in lib/ could break things even worse.)
2002-04-11 19:08:13 +00:00
simonb d94dc50679 Split the _SUBDIR assignment into two assignments so you can do things
like "grep ^_SUBDIR Makefile".
2002-03-11 07:49:24 +00:00
pk 363e8b8dbc Build whatis.db and infodir-meta from the commands list of the afterinstall
target. Remember: inserting `dummy' targets is not equivalent of some
convenient macro expansion; it has side effects!
2002-03-05 16:17:06 +00:00
jmc c4b45e27c6 Restructure infodir-meta to call a proper submake. Put the code into the
install-info gnu subdir as it's the program updating the dir file. This
all has to happen because METALOG depends on _SRC_TOP_OBJ which is now
not defined in the top level Makefile per tv's last commit. Which is fine
as this rule should have gone into a program's Makefile anyways just like
the whatis.db one does.
2002-03-01 06:02:41 +00:00
tv 1493d7d064 If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may
not be the top level objdir, because "make obj" can happen in the *middle*
of "make build" (long after <bsd.own.mk> is calculated it).  So, pre-set
_SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}.
2002-02-28 02:22:59 +00:00
tv a194e2ca32 Bomb if NBUILDJOBS is set, as it is badly broken in some way (as described
in toolchain/14837).  This is the root of some problems thought to be of
different causes by users who forget to say that they are using
"build.sh -j"....
2002-02-14 19:17:32 +00:00
lukem a63be975b0 remove METALOG in clean 2002-02-08 16:11:18 +00:00
thorpej ce5a5f9415 Add a wrapper for the "distribution" target, similar to the wrapper
for the "release" target.
2001-11-25 18:31:12 +00:00
perry 575abb014c Add a new target (infodir-meta:) that synthesizes the share/info/dir
file's metadata if UNPRIVED and MKINFO != no. Make afterinstall depend
on it as well as whatis.db.
XXX I wish there was a more rational place to synthesize the metadata,
but I can't think of one. The share/info/dir file is built by all the
world's install-info executions.
2001-11-24 21:53:16 +00:00
tv d027b1e973 No, really revert previous. Recursing to etc works, and I'm in the middle
of fixing distrib right now.  If something's broken, please report it via
the proper channels.
2001-11-20 17:05:02 +00:00
thorpej e5dbd7b652 No, really take etc and distrib out of the default subdir
list.  We've waited too long for the null target sweep.
2001-11-20 15:20:28 +00:00
tv 7b0d893016 Warn when "make build" is started with USE_NEW_TOOLCHAIN on a platform for
which USE_NEW_TOOLCHAIN is not verified to work [is not on by default].
2001-11-15 19:32:19 +00:00
tv 6ba13bbf13 Reverse the order of "make cleandir" and "make obj" back to the way they
were historically.  Discrepancy noted by atatat.
2001-11-13 17:47:16 +00:00
tv af17e1a352 Rather than build in `tools' and `lib' twice, build `tools' and `lib'
completely and install them, then skip recursing into those directories
on the final dependall/install.
2001-11-13 15:56:28 +00:00
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
simonb bd63bac162 Revert previous but move "cd share/tmac" later down so that any
generated files will go in obj dirs if they are created.  After
discussion with the two Bill's on tech-userlevel.
1999-12-04 03:52:28 +00:00
simonb 072b91d324 Move the "${MAKE} obj" above the share/tmac stage so that the generated
files in that directory don't pollute the source tree before the obj
dirs are created.
1999-12-03 15:09:01 +00:00
sommerfeld 1417ad563c Document MKOBJDIRS here, and sort the variable list in the comments
into alphabetical order.
1999-11-30 17:48:11 +00:00
sommerfeld 1b914a5db2 Add MKOBJDIRS make variable to bsd.own.mk, defaulting to "no" but
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".
1999-11-30 16:16:41 +00:00
perry 1cbf2bb2b8 use new dependall target instead of depend then all in make build 1999-09-14 01:32:43 +00:00
thorpej 51301b7324 Remove all of the domestic/crypto-us glue from this file. It is handled
differently now.
1999-07-12 21:53:52 +00:00
christos ee5a52e9e7 Handle crypto-us just like domestic 1999-05-27 21:03:31 +00:00
scottr 10b51a99c6 Add the FORCE_DOMESTIC flag to force the 'all', 'includes',
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.
1999-04-25 19:13:05 +00:00
cjs cfd3563966 Improve documentation. 1999-04-01 02:49:12 +00:00
scottr a53f9b62f4 Make a note of a subtle lossage mode pointed out by Mycroft. 1999-03-10 19:18:59 +00:00
scottr a443f8c15c Make the includes and install targets consistent, and shove the
ugly hack into the etc/Makefile distribution target instead of
the top-level build target.  Problem noted by Mycroft.
1999-03-10 19:10:14 +00:00
scottr 67f17dd709 Back out rev 1.90: The need for texinfo is a one-shot event. This was
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).
1999-02-20 09:10:41 +00:00
scottr 455f4cf780 make -> ${MAKE} 1999-02-19 23:22:14 +00:00
mellon 3dcbd83b7b Build and install texinfo before building and installing the world. 1999-02-18 14:49:59 +00:00
mellon 91bd4d3f4a Don't try to run makeinfo when doing preliminary GNU library builds. 1999-02-18 03:19:44 +00:00