Commit Graph

206 Commits

Author SHA1 Message Date
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