Commit Graph

43 Commits

Author SHA1 Message Date
sjg
dabacd017f 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
2020-11-20 06:02:31 +00:00
sjg
75b18a5d5f 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
2020-11-07 21:46:27 +00:00
sjg
71b8c35f2f 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.
2020-09-05 19:29:42 +00:00
sjg
518cb6c844 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.
2020-06-09 20:52:35 +00:00
sjg
897ced70e6 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
2020-05-20 22:25:46 +00:00
sjg
45e8767adb Update to bmake-20171028
Ignore empty MAKEOBJDIR[PREFIX]

Reported by:	bdrewery
2017-11-02 20:08:00 +00:00
sjg
b5947f6254 Import bmake-20170720
Includes fix for compat handling of interrupts.
2017-07-24 04:38:05 +00:00
sjg
aa8f1c64d4 Import bmake-20170711 2017-07-15 21:19:27 +00:00
sjg
268db6c1ac Merge bmake-20170510
No-op change other than version update.
2017-05-10 22:45:05 +00:00
sjg
50b4b1b520 Merge bmake-20170420 2017-04-21 00:45:44 +00:00
sjg
ca115694b7 Update to bmake 20170413 2017-04-15 01:44:45 +00:00
sjg
80c8228969 Merge bmake-20170301 2017-03-06 23:02:33 +00:00
sjg
3e96c033f9 Merge bmake-20161212 2016-12-19 23:38:07 +00:00
sjg
5847e2cf8e Update to bmake-20170818
This version has some new knobs for dealing with troublesome targets
in meta mode.
2016-09-09 01:09:39 +00:00
sjg
40b0d2c4e5 Merge bmake-20160606
o dir.c: extend mtimes cache to others via cached_stat()
2016-06-08 17:51:21 +00:00
sjg
b63d9399ea Import bmake-20160604
Performace improvements for meta mode.
2016-06-05 20:26:16 +00:00
sjg
38da92cdf3 Merge bmake-20160512 2016-05-20 17:35:39 +00:00
sjg
44636d2ebb 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.
2016-03-18 20:03:09 +00:00
bdrewery
749836195e 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
2016-03-11 04:09:50 +00:00
sjg
218c7825fe Merge bmake-20160307 2016-03-11 01:35:39 +00:00
sjg
1d2026b19b Merge bmake-20151220
Fixed clearing suffixes impact on null suffix
2015-12-25 16:19:21 +00:00
sjg
f25d8749d4 Merge bmake-20151201 2015-12-08 01:29:07 +00:00
sjg
a1cf517b97 Merge bmake 20151020 2015-10-23 17:38:01 +00:00
sjg
d1ba9a9c79 Merge bmake-20150606
Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

_M   contrib/bmake
M    contrib/bmake/ChangeLog
M    contrib/bmake/Makefile
M    contrib/bmake/bmake.1
M    contrib/bmake/bmake.cat1
M    contrib/bmake/make.1
M    contrib/bmake/mk/ChangeLog
M    contrib/bmake/mk/dirdeps.mk
M    contrib/bmake/mk/gendirdeps.mk
M    contrib/bmake/mk/install-mk
M    contrib/bmake/mk/meta.stage.mk
M    contrib/bmake/mk/meta.sys.mk
M    contrib/bmake/mk/mkopt.sh
M    contrib/bmake/targ.c
M    usr.bin/bmake/Makefile
2015-06-11 04:00:22 +00:00
sjg
bc53a56c01 Merge bmake-20150505 improve detection of malformed conditionals. 2015-05-10 22:03:59 +00:00
sjg
af117d16cb Merge bmake-20150418
PR: 199486
2015-04-21 04:40:38 +00:00
sjg
8a8bdedf35 Update to bmake-20140620
Main change is detection of malformed variable references.

Reviewed by:	obrien
2014-07-08 22:27:50 +00:00
imp
e7c2a7877e 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.
2014-05-23 00:20:44 +00:00
imp
a42e7aedc5 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.
2014-05-15 01:27:24 +00:00
jmmv
eb66ec28f9 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.
2014-05-14 18:43:13 +00:00
sjg
a327d8d253 Merge bmake-20140101 from vendor 2014-01-27 17:47:21 +00:00
sjg
e9b1b9b12c Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)
Reviewed by:	obrien
Approved by:	re
2013-09-10 23:31:38 +00:00
sjg
61d13f6983 Merge bmake-20130904 2013-09-05 15:57:26 +00:00
sjg
0e7402e046 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.
2013-08-10 21:31:35 +00:00
sjg
ff765cb371 Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.
2013-08-02 06:25:28 +00:00
sjg
5d26938b1d Update to bmake-20130604 to fix file descriptor leak. 2013-06-05 16:12:50 +00:00
sjg
4cdc15c1f7 Sync with upstream version (20130520) that includes same fixes made last week. 2013-05-20 22:51:11 +00:00
sjg
e2bb503df7 Update to bmake-20130330 2013-04-02 21:31:11 +00:00
sjg
f817112dff Merge bmake-20130123
Approved by:	marcel (mentor)
2013-02-01 22:55:27 +00:00
sjg
d281294411 Merge bmake-20121111
Also pay attention to MK_SHARED_TOOLCHAIN.

Approved by:	marcel (mentor)
2012-11-16 01:37:25 +00:00
sjg
f8768a6120 Merge bmake-20121010
Approved by:	marcel (mentor)
2012-10-25 23:18:05 +00:00
marcel
c9d76d3d67 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>
2012-10-19 19:56:17 +00:00
marcel
bd137de2db 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)
2012-10-06 19:19:21 +00:00