History log of /freebsd-current/usr.bin/bmake/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 548bfc56 03-May-2024 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20240430

Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5'


# 3ff50104 13-Mar-2024 Simon J. Gerraty <sjg@FreeBSD.org>

bmake Makefile.config

# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

# 148ee845 27-Jun-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230622

Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'


# 8c973ee2 24-Apr-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230414

Merge commit '51d8a8b4ac1dd7265e891149e470a803906de2a7'


# dc1b8c9a 09-Feb-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230208

Merge commit 'f4d51098686d961fc03dc5aa327619d0af3c9dcd'


# 4fde40d9 27-Jan-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge/update to bmake-20230126


# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# 3ff50104 13-Mar-2024 Simon J. Gerraty <sjg@FreeBSD.org>

bmake Makefile.config


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 148ee845 27-Jun-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230622

Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'


# 8c973ee2 24-Apr-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230414

Merge commit '51d8a8b4ac1dd7265e891149e470a803906de2a7'


# dc1b8c9a 09-Feb-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230208

Merge commit 'f4d51098686d961fc03dc5aa327619d0af3c9dcd'


# 4fde40d9 27-Jan-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge/update to bmake-20230126


# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# 8c973ee2 24-Apr-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230414

Merge commit '51d8a8b4ac1dd7265e891149e470a803906de2a7'


# dc1b8c9a 09-Feb-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230208

Merge commit 'f4d51098686d961fc03dc5aa327619d0af3c9dcd'


# 4fde40d9 27-Jan-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge/update to bmake-20230126


# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# dc1b8c9a 09-Feb-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20230208

Merge commit 'f4d51098686d961fc03dc5aa327619d0af3c9dcd'


# 4fde40d9 27-Jan-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge/update to bmake-20230126


# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# 4fde40d9 27-Jan-2023 Simon J. Gerraty <sjg@FreeBSD.org>

Merge/update to bmake-20230126


# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# 532d4fbf 27-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20220726

Merge commit '31a96ca5f0b6e5f8f7fa8cecf3a5c4354b3b096f'


# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo

# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212

# e2eeea75 19-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20201117

o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.

o More code cleanup and refactoring.

o More unit tests

MFC after: 1 week


# 956e45f6 07-Nov-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20201101

Lots of new unit-tests increase code coverage.

Lots of refactoring, cleanup and simlpification to reduce
code size.

Fixes for Bug 223564 and 245807

Updates to dirdeps.mk and meta2deps.py


# 2c3632d1 05-Sep-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20200902

Lots of code refactoring, simplification and cleanup.
Lots of new unit-tests providing much higher code coverage.
All courtesy of rillig at netbsd.

Other significant changes:

o new read-only variable .SHELL which provides the path of the shell
used to run scripts (as defined by the .SHELL target).

o variable parsing detects more errors.

o new debug option -dl: LINT mode, does the equivalent of := for all
variable assignments so that file and line number are reported for
variable parse errors.


# ef0b2538 09-Jun-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200606

Relevant items from ChangeLog:

o dir.c: cached_stats - don't confuse stat and lstat results.
o var.c: add :Or for reverse sort.


# 49caa483 20-May-2020 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20200517

Changes since 20181221 are mostly portability related
hence the large gap in versions imported.

There are however some bug fixes, and a rework of filemon handling.
In NetBSD make/filemon/filemon_ktrace.c allows use of fktrace
and elimination of filemon(4) which has not had the TLC it needs.

FreeBSD filemon(4) is in much better shape, so bmake/filemon/filemon_dev.c
allows use of that, with a bit less overhead than the ktrace model.

Summary of changes from ChangeLog

o str.c: empty string does not match % pattern
plus unit-test changes
o var.c: import handling of old sysV style modifier using '%'
o str.c: refactor brk_string
o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD
a blank command is perfectly valid.
o meta.c: meta_oodate, check for corrupted meta file
earlier and more often.
* meta.c: meta_compat_parent check for USE_FILEMON
patch from Soeren Tempel
o meta.c: fix compat mode, need to call meta_job_output()
o job.c: extra fds for meta mode not needed if using filemon_dev
o meta.c: avoid passing NULL to filemon_*() when meta_needed()
returns FALSE.
o filemon/filemon_{dev,ktrace}.c: allow selection of
filemon implementation. filemon_dev.c uses the kernel module
while filemon_ktrace.c leverages the fktrace api available in
NetBSD. filemon_ktrace.c can hopefully form the basis for
adding support for other tracing mechanisms such as strace on
Linux.
o meta.c: when target is out-of-date per normal make rules
record value of .OODATE in meta file.
o parse.c: don't pass NULL to realpath(3)
some versions cannot handle it.
o parse.c: ParseDoDependency: free paths rather than assert

plus more unit-tests


# e22fef7d 02-Nov-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20171028

Ignore empty MAKEOBJDIR[PREFIX]

Reported by: bdrewery


# c7019bf7 23-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170720

Includes fix for compat handling of interrupts.


# 8695518c 15-Jul-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20170711


# cac6fd11 10-May-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170510

No-op change other than version update.


# e1cee40d 20-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170420


# b46b9039 14-Apr-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake 20170413


# 1ce939a7 06-Mar-2017 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20170301


# 45447996 19-Dec-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20161212


# 95e3ed2c 08-Sep-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.


# 39ac7ef4 08-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160606

o dir.c: extend mtimes cache to others via cached_stat()


# b778b302 05-Jun-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Import bmake-20160604

Performace improvements for meta mode.


# e48f47dd 20-May-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160512


# 3bebe729 18-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division

# be19d90b 10-Mar-2016 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20160307


# 6e050540 25-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151220

Fixed clearing suffixes impact on null suffix


# ac3446e9 07-Dec-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20151201


# 4c620fe5 23-Oct-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake 20151020


# 128a4105 10-Jun-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.


# 28a6bc81 10-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150505 improve detection of malformed conditionals.


# db29cad8 20-Apr-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20150418

PR: 199486


# 5bcb7424 08-Jul-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by: obrien


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.

# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.

# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.

# 0dede8b0 27-Jan-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20140101 from vendor


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re

# 1bbe5942 05-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130904


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

# 51ee2c1c 02-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.


# 74d2e02b 05-Jun-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130604 to fix file descriptor leak.


# 52d86256 20-May-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Sync with upstream version (20130520) that includes same fixes made last week.


# 1748de26 02-Apr-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Update to bmake-20130330


# 3cbdda60 01-Feb-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20130123

Approved by: marcel (mentor)


# 59a02420 15-Nov-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by: marcel (mentor)


# 93036677 25-Oct-2012 Simon J. Gerraty <sjg@FreeBSD.org>

Merge bmake-20121010

Approved by: marcel (mentor)


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>

# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)

# 08604a02 26-Jul-2022 Simon J. Gerraty <sjg@FreeBSD.org>

Auto-create bmake/unit-tests objdir if appropriate

Given the way bmake/unit-tests is visited, when doing 'test'
MK_AUTO_OBJ=yes will not be effective.
So create the objdir before running the sub-make.

Also ensure MAKEOBJDIR is passed to opt-m-include-dir

Reviewed by: deo


# 1c04cf7d 18-Dec-2021 Simon J. Gerraty <sjg@FreeBSD.org>

After-import bmake-20211212


# 80a5408c 10-Mar-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix upgrade of bmake by not setting conflicting MAKE_VERSION.

This may be used in later checks, such as in bsd.dep.mk, to
enable features that rely on the built-in value.

Sponsored by: EMC / Isilon Storage Division


# 47e496fd 22-May-2014 Warner Losh <imp@FreeBSD.org>

Add .../share/mk to the default system make path. This will fix the
problem with broken in-tree builds (which are used far more
pervasively than I'd known outside the tree). However, weird results
may now happen if at any point in the tree above you there happens to
be a directory that has subdirectory of share/mk, as unpredictable
results will follow. This was considered the lessor of the two evils,
at least for now. In the future this will be removed again when the
underlying issues are resolved.


# a3438dfc 14-May-2014 Warner Losh <imp@FreeBSD.org>

Undo changes to the generated Makefile. Move tests directory to proper
location, including updating the test to work in the more-fragile
fmake -> bmake bootstrap environment.


# 5ae59dec 14-May-2014 Julio Merino <jmmv@FreeBSD.org>

Move old fmake tests into bmake and hook them to the build.

This first step is mostly to prevent the code from rotting even further
and to ensure these do not get wiped when fmake's code is removed from
the tree.

These tests are currently being skipped because they detect the underlying
make is not fmake and thus disable themselves -- and the reason is that
some of the tests fail, possibly due to legitimate bugs. Enabling them to
run against bmake will come separately.

Lastly, it would be ideal if these tests were fed upstream but they are
not ready for that yet. In the interim, just put them under usr.bin/bmake/
while we sort things out. The existence of a different unit-tests directory
within here makes me feel less guilty about this.

Change confirmed working with a clean amd64 build.


# ed03145e 10-Sep-2013 Simon J. Gerraty <sjg@FreeBSD.org>

Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)

Reviewed by: obrien
Approved by: re


# 84efbe96 10-Aug-2013 Simon J. Gerraty <sjg@FreeBSD.org>

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.


# 21eb01cb 19-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Fix a bootstrapping problem where the first bmake (built by FreeBSD's
make) ended up being built with -DFORCE_MACHINE. This broke the lib32
built for amd64 & powerpc64.
This fix is comes with the next import of bmake, but is committed here
and now to minimize the exposure to the bug.

Submitted by: Simon Gerraty <sjg@juniper.net>


# d4d90f10 06-Oct-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Add bmake to the build and allow it to be installed as make(1) instead
of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it
easy for people to switch while working out the kinks -- think ports
tree here. The option will be removed in due time.

Submitted by: Simon Gerraty (sjg@juniper.net)