freebsd-dev/tools
Jessica Clarke 62f243acea tools/build/make.py: Make --with-default-sys-path mirror usr.bin/bmake
The top-level Makefile passes -m to its sub-makes in order to ensure
they use the in-tree mk files in share/mk, but the top-level make itself
has to rely on whatever environment the bmake used has. For FreeBSD, we
configure the system bmake with .../share/mk:/usr/share/mk, which means
it will pick up src's share/mk whenever run from within the src tree,
but currently for non-FreeBSD we configure our bootstrap bmake only with
bmake's own mk files. This is mostly compatible, with two exceptions:

1. "targets" runs at the top level, but needs TARGET_MACHINE_LIST and
   the corresponding MACHINE_ARCH_LIST_${target}, otherwise it will just
   print an empty list.

2. "universe" and "universe-toolchain", when run at the top level (i.e.
   not via the various wrappers around universe like tinderbox), end up
   failing in universe-toolchain itself with:

     bmake[1]: "/path/to/freebsd/share/mk/src.sys.obj.mk" line 112: Cannot use MAKEOBJDIR=
     Unset MAKEOBJDIR to get default:  MAKEOBJDIR='${.CURDIR:S,^${SRCTOP},${OBJTOP},}'

By including .../share/mk in the default sys path like FreeBSD's system
bmake we ensure that we get the in-tree mk files for the top-level make,
not just sub-makes, and avoid such issues.

Note that we cannot (yet) stop using the installed mk files, since the
MAKEOBJDIRPREFIX check in Makefile runs in the object directory and uses
env -i, thereby losing the MAKESYSPATH exported by src.sys.env.mk. Other
such issues may also exist, though are likely rare if so.

Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D41544
2023-08-23 17:56:56 +01:00
..
boot Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
bsdbox Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
build tools/build/make.py: Make --with-default-sys-path mirror usr.bin/bmake 2023-08-23 17:56:56 +01:00
bus_space Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
coccinelle copystr(9): Move to deprecate (attempt #2) 2020-05-25 16:40:48 +00:00
debugscripts Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
diag Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
ifnet Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
kerneldoc Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
LibraryReport Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
lua Remove $FreeBSD$: one-line lua tag 2023-08-16 11:55:34 -06:00
pkgbase Remove $FreeBSD$: one-line lua tag 2023-08-16 11:55:34 -06:00
regression Remove my middle name. 2023-08-17 15:08:30 +02:00
sched Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
test stress2: No need to write to the console. Add revision to log string 2023-08-19 09:29:09 +02:00
tools Use 115200 bps by default for serial communication 2023-08-17 13:31:38 -04:00
uma/smrstress Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
install.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
make_libdeps.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
README Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
tinder.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00

This directory tree contains tools used for the maintenance and
testing of FreeBSD.  There is no toplevel Makefile structure since
these tools are not meant to be built as part of the standard system,
though there may be individual Makefiles in some of the subdirs.

Please read the README files in the subdirs for further information.