Skip to content

Commit

Permalink
Merge bmake-20201117
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sgerraty committed Nov 20, 2020
2 parents 466d0a2 + 1b65f0b commit e2eeea7
Show file tree
Hide file tree
Showing 251 changed files with 6,212 additions and 4,202 deletions.
75 changes: 75 additions & 0 deletions contrib/bmake/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
2020-11-17 Simon J Gerraty <[email protected]>

* VERSION (_MAKE_VERSION): 20201117
Merge with NetBSD make, pick up
o fix some unit-tests when dash is .SHELL
o rename Targ_NewGN to GNode_New
o make some GNode functions const
o main.c: call Targ_Init before Var_Init
cleanup PrintOnError, getTmpdir and ParseBoolean
o var.c: fix error message of failed :!cmd! modifier

2020-11-14 Simon J Gerraty <[email protected]>

* VERSION (_MAKE_VERSION): 20201114
Merge with NetBSD make, pick up
o replace a few HashTable_CreateEntry with HashTable_Set
o clean up cached_stats
o rename DEFAULT to defaultNode
o remove redundant struct make_stat
o cond.c: in lint mode, check for ".else <cond>"
use bitset for IfState
replace large switch with if-else in Cond_EvalLine
o job.c: clean up JobExec, JobStart, JobDoOutput
use stderr for error message about failed touch
clean up Job_Touch
replace macro DBPRINTF with JobPrintln
rename JobState to JobStatus
main.c: switch cache for realpath from GNode to HashTable
clean up Fatal
clean up InitDefSysIncPath
use progname instead of hard-coded 'make' in warning
rename Main_SetVarObjdir to SetVarObjdir
make.1: document the -S option
make.c: fix debug output for GNode details
use symbolic names in debug output of GNodes

2020-11-12 Simon J Gerraty <[email protected]>

* configure.in: fix --with-force-machine-arch

* VERSION (_MAKE_VERSION): 20201112
Merge with NetBSD make, pick up
o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable
checks in InitObjdir. Explicit .OBJDIR target always allows
read-only directory.
o cond.c: clean up Cond_EvalLine

2020-11-11 Simon J Gerraty <[email protected]>

* VERSION (_MAKE_VERSION): 20201111
Merge with NetBSD make, pick up
o more unit-tests
o style cleanup
remove redundant parentheses from sizeof operator
replace character literal 0 with '\0'.
replace pointer literal 0 with NULL.
remove redundant parentheses.
replace (expr & mask) == 0 with !(expr & mask).
use strict typing in conditions of the form !var
o rename Make_OODate to GNode_IsOODate
o rename Make_TimeStamp to GNode_UpdateYoungestChild
o rename Var_Set_with_flags to Var_SetWithFlags
o rename dieQuietly to shouldDieQuietly
o buf.c: make API of Buf_Init simpler
o compat.c: clean up Compat_Make, Compat_RunCommand,
CompatDeleteTarget and CompatInterrupt
o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|'
clean up CondParser_Comparison
o main.c: rename getBoolean and s2Boolean
rename MAKEFILE_PREFERENCE for consistency
o parse.c: replace strstr in ParseMaybeSubMake with optimized code
o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR
replace emptyString with allocated empty string
error out on unclosed expressions after the colon

2020-11-01 Simon J Gerraty <[email protected]>

* VERSION (_MAKE_VERSION): 20201101
Expand Down
28 changes: 24 additions & 4 deletions contrib/bmake/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ unit-tests/archive-suffix.exp
unit-tests/archive-suffix.mk
unit-tests/archive.exp
unit-tests/archive.mk
unit-tests/cmd-errors-lint.exp
unit-tests/cmd-errors-lint.mk
unit-tests/cmd-errors.exp
unit-tests/cmd-errors.mk
unit-tests/cmd-interrupt.exp
unit-tests/cmd-interrupt.mk
unit-tests/cmdline-undefined.exp
unit-tests/cmdline-undefined.mk
unit-tests/cmdline.exp
unit-tests/cmdline.mk
unit-tests/comment.exp
Expand Down Expand Up @@ -115,10 +121,14 @@ unit-tests/cond-func.exp
unit-tests/cond-func.mk
unit-tests/cond-late.exp
unit-tests/cond-late.mk
unit-tests/cond-op-and-lint.exp
unit-tests/cond-op-and-lint.mk
unit-tests/cond-op-and.exp
unit-tests/cond-op-and.mk
unit-tests/cond-op-not.exp
unit-tests/cond-op-not.mk
unit-tests/cond-op-or-lint.exp
unit-tests/cond-op-or-lint.mk
unit-tests/cond-op-or.exp
unit-tests/cond-op-or.mk
unit-tests/cond-op-parentheses.exp
Expand Down Expand Up @@ -287,6 +297,8 @@ unit-tests/directive-for.exp
unit-tests/directive-for.mk
unit-tests/directive-hyphen-include.exp
unit-tests/directive-hyphen-include.mk
unit-tests/directive-if-nested.exp
unit-tests/directive-if-nested.mk
unit-tests/directive-if.exp
unit-tests/directive-if.mk
unit-tests/directive-ifdef.exp
Expand Down Expand Up @@ -315,8 +327,6 @@ unit-tests/directive-warning.exp
unit-tests/directive-warning.mk
unit-tests/directive.exp
unit-tests/directive.mk
unit-tests/directives.exp
unit-tests/directives.mk
unit-tests/dollar.exp
unit-tests/dollar.mk
unit-tests/doterror.exp
Expand All @@ -341,6 +351,8 @@ unit-tests/forloop.exp
unit-tests/forloop.mk
unit-tests/forsubst.exp
unit-tests/forsubst.mk
unit-tests/gnode-submake.exp
unit-tests/gnode-submake.mk
unit-tests/hanoi-include.exp
unit-tests/hanoi-include.mk
unit-tests/impsrc.exp
Expand All @@ -349,6 +361,8 @@ unit-tests/include-main.exp
unit-tests/include-main.mk
unit-tests/include-sub.mk
unit-tests/include-subsub.mk
unit-tests/job-flags.exp
unit-tests/job-flags.mk
unit-tests/job-output-long-lines.exp
unit-tests/job-output-long-lines.mk
unit-tests/lint.exp
Expand All @@ -365,6 +379,8 @@ unit-tests/modts.exp
unit-tests/modts.mk
unit-tests/modword.exp
unit-tests/modword.mk
unit-tests/objdir-writable.exp
unit-tests/objdir-writable.mk
unit-tests/opt-backwards.exp
unit-tests/opt-backwards.mk
unit-tests/opt-chdir.exp
Expand Down Expand Up @@ -447,6 +463,8 @@ unit-tests/opt-raw.exp
unit-tests/opt-raw.mk
unit-tests/opt-silent.exp
unit-tests/opt-silent.mk
unit-tests/opt-touch-jobs.exp
unit-tests/opt-touch-jobs.mk
unit-tests/opt-touch.exp
unit-tests/opt-touch.mk
unit-tests/opt-tracefile.exp
Expand Down Expand Up @@ -517,6 +535,8 @@ unit-tests/suff-main.exp
unit-tests/suff-main.mk
unit-tests/suff-rebuild.exp
unit-tests/suff-rebuild.mk
unit-tests/suff-self.exp
unit-tests/suff-self.mk
unit-tests/suff-transform-endless.exp
unit-tests/suff-transform-endless.mk
unit-tests/suff-transform-expand.exp
Expand Down Expand Up @@ -737,14 +757,14 @@ unit-tests/varname.exp
unit-tests/varname.mk
unit-tests/varparse-dynamic.exp
unit-tests/varparse-dynamic.mk
unit-tests/varparse-errors.exp
unit-tests/varparse-errors.mk
unit-tests/varparse-mod.exp
unit-tests/varparse-mod.mk
unit-tests/varparse-undef-partial.exp
unit-tests/varparse-undef-partial.mk
unit-tests/varquote.exp
unit-tests/varquote.mk
unit-tests/varshell.exp
unit-tests/varshell.mk
util.c
var.c
wait.h
8 changes: 7 additions & 1 deletion contrib/bmake/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.113 2020/10/26 17:55:09 sjg Exp $
# $Id: Makefile,v 1.114 2020/11/13 21:47:25 sjg Exp $

PROG= bmake

Expand Down Expand Up @@ -49,6 +49,12 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE
CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}}
COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\""

.for x in FORCE_MACHINE FORCE_MACHINE_ARCH
.ifdef $x
COPTS.main.c+= "-D$x=\"${$x}\""
.endif
.endfor

# meta mode can be useful even without filemon
# should be set by now
USE_FILEMON ?= no
Expand Down
4 changes: 2 additions & 2 deletions contrib/bmake/Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ _MAKE_VERSION?=@_MAKE_VERSION@
prefix?= @prefix@
srcdir= @srcdir@
CC?= @CC@
MACHINE?= @machine@
MACHINE_ARCH?= @machine_arch@
@force_machine@MACHINE?= @machine@
@force_machine_arch@MACHINE_ARCH?= @machine_arch@
DEFAULT_SYS_PATH?= @default_sys_path@

CPPFLAGS+= @CPPFLAGS@
Expand Down
2 changes: 1 addition & 1 deletion contrib/bmake/VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# keep this compatible with sh and make
_MAKE_VERSION=20201101
_MAKE_VERSION=20201117
Loading

0 comments on commit e2eeea7

Please sign in to comment.