12023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20230414 4 Merge with NetBSD make, pick up 5 o minor cleanup 6 72023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 8 9 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 10 unlimited results in an insane number (0x7fffffffffffffff). 11 If BMAKE_NOFILE_MAX is defined, use that instead. 12 132023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 14 15 * VERSION (_MAKE_VERSION): 20230321 16 Merge with NetBSD make, pick up 17 * make.1: document seemingly unexplained Error code 6. 18 192023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 20 21 * VERSION (_MAKE_VERSION): 20230317 22 Merge with NetBSD make, pick up 23 o compat.c: CompatDeleteTarget skip .PHONY targets to be 24 consistent with JobDeleteTarget. 25 o job.c: fix memory leak in handling sysv :from=to modifiers 26 272023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 28 29 * VERSION (_MAKE_VERSION): 20230303 30 Merge with NetBSD make, pick up 31 o several updated unit-tests 32 332023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 34 35 * VERSION (_MAKE_VERSION): 20230222 36 Merge with NetBSD make, pick up 37 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 38 392023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 40 41 * VERSION (_MAKE_VERSION): 20230218 42 Merge with NetBSD make, pick up 43 o var.c: fix parsing of unevaluated subexpressions with 44 unbalanced '{}' 45 462023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 47 48 * VERSION (_MAKE_VERSION): 20230215 49 Merge with NetBSD make, pick up 50 o inline macros for some variable names 51 o cond.c: reduce complexity of evaluating expressions 52 532023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 54 55 * VERSION (_MAKE_VERSION): 20230208 56 Merge with NetBSD make, pick up 57 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 58 when it has been used within conditional expressions 59 602023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 61 62 * VERSION (_MAKE_VERSION): 20230127 63 64 * install-sh: if making directories ensure umask is set 65 to match mode. 66 67 * Makefile: use DIRMODE for directories and 68 NONBINMODE for man pages and mk files 69 702023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 71 72 * VERSION (_MAKE_VERSION): 20230126 73 Merge with NetBSD make, pick up 74 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 75 should be read-only. 76 772023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 78 79 * VERSION (_MAKE_VERSION): 20230123 80 Merge with NetBSD make, pick up 81 o .[NO]READONLY: for control of read-only variables 82 o .SYSPATH: for controlling the path searched for makefiles 83 842023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 85 86 * VERSION (_MAKE_VERSION): 20230120 87 Merge with NetBSD make, pick up 88 o allow for white-space between command specifiers @+- 89 o add more details to warning 'Extra targets ignored' 90 912023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 92 93 * machine.sh: leverage os.sh rather than duplicate 94 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 95 for that purpose for the past decade or so. 96 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 97 982023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 99 100 * VERSION (_MAKE_VERSION): 20230101 101 Merge with NetBSD make, pick up 102 o cleanup comments, inline some LazyBuf_ methods 103 o unit-tests/ add/improve comments in tests 104 o make.1: sync list of built-in variables with reality 105 sort list of built-in variables 106 reduce indentation of the long list of variable names 107 use consistent markup for boolean flags 108 move description of .MAKE.MODE below the .MAKE.META block 109 clarify in which case an expression may omit braces 110 1112022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 112 113 * VERSION (_MAKE_VERSION): 20221024 114 Merge with NetBSD make, pick up 115 o change return type of unlink_file back to int 116 1172022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 118 119 * Makefile: Darwin and Linux can handle MANTARGET=man 120 1212022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 122 123 * VERSION (_MAKE_VERSION): 20220928 124 Merge with NetBSD make, pick up 125 o fix more ignored returns from snprintf 126 o compile with higher warnings 127 1282022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 129 130 * main.c meta.c: do not ignore return from snprintf 131 132 * meta.c strlcpy.c: we need prototype for strlcpy 133 134 * sigcompat.c: fix unused function warnings 135 1362022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 137 138 * VERSION (_MAKE_VERSION): 20220924 139 Merge with NetBSD make, pick up 140 o fix bug in .break reset of conditional depth 141 o overhaul and simplify tracking of conditional depth 142 1432022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 144 145 * VERSION (_MAKE_VERSION): 20220912 146 Merge with NetBSD make, pick up 147 o man page updates 148 1492022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 150 151 * VERSION (_MAKE_VERSION): 20220909 152 Merge with NetBSD make, pick up 153 o update unit-tests to handle deprecation of egrep 154 o cond.c: add more details to error message for numeric comparison 155 156 * configure.in: allow for deprecation of egrep 157 158 * Makefile: Linux can handle MANTARGET=man 159 1602022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 161 162 * VERSION (_MAKE_VERSION): 20220903 163 Merge with NetBSD make, pick up 164 o job.c: fix handling of null bytes in output 165 1662022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 167 168 * VERSION (_MAKE_VERSION): 20220902 169 Merge with NetBSD make, pick up 170 o Allow .break to terminate a .for loop early 171 1722022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 173 174 * VERSION (_MAKE_VERSION): 20220901 175 Merge with NetBSD make, pick up 176 o var.c: fix out-of-bounds errors when parsing 177 1782022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 179 180 * VERSION (_MAKE_VERSION): 20220824 181 Merge with NetBSD make, pick up 182 o var.c: revert change to modifier parsing that breaks 183 shell variable references within ':@var@body@' 184 o adjust unit-tests 185 1862022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 187 188 * VERSION (_MAKE_VERSION): 20220818 189 Merge with NetBSD make, pick up 190 o fix exit status for '-q' (since 1994) 191 1922022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 193 194 * VERSION (_MAKE_VERSION): 20220808 195 Merge with NetBSD make, pick up 196 o var.c: fix parsing of modifiers containing unbalanced subexpressions 197 extract parsing of ':D' and ':U' modifiers into separate function 198 1992022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 200 201 * VERSION (_MAKE_VERSION): 20220726 202 203 * Auto-create objdir for bmake/unit-tests if appropriate 204 2052022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 206 207 * VERSION (_MAKE_VERSION): 20220724 208 Merge with NetBSD make, pick up 209 o make.1: describe variable assignment and evaluation more precisely 210 o parse.c: fix out-of-bounds read when parsing an invalid line 211 o var.c: simplify return type of IsShortVarnameValid 212 2132022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 214 215 * VERSION (_MAKE_VERSION): 20220612 216 Merge with NetBSD make, pick up 217 o allow to randomize build order of targets 218 .MAKE.MODE += randomize-targets can help uncover dependency bugs 219 within a makefile. 220 o compat.c: rename Compat_Run to Compat_MakeAll 221 o make.c: inline MakeBuildParent 222 inline make_abort, improve error details 223 o parse.c: reorganize Parse_Error 224 fix memory leak in wildcard targets and sources 225 separate cases in HandleDependencyTargetMundane 226 extract HandleSingleDependencyTargetMundane 227 rename loadfile to LoadFile 228 split IncludeFile into separate functions 229 condense code for searching a file in the paths 230 fix off-by-one error in buffer for .WAIT nodes 231 o str.c: condense Str_Match 232 make code for string matching syntactically more consistent 233 2342022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 235 236 * VERSION (_MAKE_VERSION): 20220418 237 Merge with NetBSD make, pick up 238 o ignore '.POSIX:' if not in first non-comment line 239 of Makefile as specified by POSIX. 240 add unit-tests for above. 241 o meta.c: make it easier to find usage of identifiers 242 o targ.c: add .USEBEFORE to Targ_PrintType 243 2442022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 245 246 * VERSION (_MAKE_VERSION): 20220414 247 248 * unit-tests/Makefile: simplify checks for shells with 249 BROKEN_TESTS, this helps with other Linux distros that 250 use dash. 251 2522022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 253 254 * VERSION (_MAKE_VERSION): 20220330 255 Merge with NetBSD make, pick up 256 o var.c: fix spacing, and a typo in a test 257 2582022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 259 260 * VERSION (_MAKE_VERSION): 20220326 261 Merge with NetBSD make, pick up 262 o parse.c: try to include 'posix.mk' the first time 263 .POSIX: is encountered, to allow for beter POSIX compliance. 264 o var.c: make debug logs more readable 265 prefer 'long long' over 'long' on 32-bit C99 platforms 266 fix crash on .undef of an environment variable 267 2682022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 269 270 * VERSION (_MAKE_VERSION): 20220303 271 Merge with NetBSD make, pick up 272 o tell meta mode unit tests not to expect filemon 273 o cond.c: make debug logging for comparisons less technical 274 o lst.c: fix mem leak in Lst_Remove 275 o str.c: make code for string matching syntactically more consistent 276 o var.c: simplify ParseModifier_Match 277 2782022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 279 280 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 281 282 * VERSION (_MAKE_VERSION): 20220214 283 Merge with NetBSD make, pick up 284 o cond.c: simplify control flow in CondParser_Comparison 285 o job.c: fix echoing of command with '-' in silent target in jobs mode 286 o main.c: prefix the warning about read-only .OBJDIR with a colon 287 o parse.c: remove redundant conditions 288 o var.c: simplify control flow in ModifyWord_SysVSubst 289 2902022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 291 292 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 293 is any chance we have dash as .SHELL 294 295 * VERSION (_MAKE_VERSION): 20220208 296 Merge with NetBSD make, pick up 297 o more unit tests 298 o meta.c: use a variable to hold command line to be filtered 299 to avoid any side effects from content of command line. 300 3012022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 302 303 * VERSION (_MAKE_VERSION): 20220204 304 Merge with NetBSD make, pick up 305 o use unsigned consistently for line numbers, avoid the need for %z 306 o parse.c: do not step off end of input in Parse_IsVar 307 when checking for target local variable assignments 308 3092022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 310 311 * VERSION (_MAKE_VERSION): 20220202 312 Merge with NetBSD make, pick up 313 o remove redundant declaration of HashIter_Init 314 o make DEBUG0 simpler 315 3162022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 317 318 * cast gn->lineno to avoid %z 319 320 * VERSION (_MAKE_VERSION): 20220130 321 Merge with NetBSD make, pick up 322 o more unit tests 323 o make GNode lineno unsigned to please lint 324 o print location of recursive variable references in commands 325 o print "stack trace" (makefile includes) on fatal errors 326 o make.1: refine documentation for target local assignments 327 3282022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 329 330 * VERSION (_MAKE_VERSION): 20220128 331 Merge with NetBSD make, pick up 332 o inline functions called only once 333 o for.c: clean up AddEscape for building the body of a .for loop 334 o hash.c: merge duplicate code for finding an entry in a hash table 335 replace HashEntry_KeyEquals with strncmp 336 o make.1: document quirks of target local variable assignments. 337 o parse.c: cleanup white-space 338 3392022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 340 341 * VERSION (_MAKE_VERSION): 20220126 342 Merge with NetBSD make, pick up 343 o allow setting target local variables 344 o more unit tests 345 o add missing newline after "cannot continue" message 346 o meta.c: clean up eat_dots 347 o parse.c: fix filename in warning about duplicate script 348 o var.c: when expanding nested variables, check simple things first 349 3502022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 351 352 * VERSION (_MAKE_VERSION): 20220116 353 Merge with NetBSD make, pick up 354 o fix for unit-tests/varname-makeflags on non-BSD systems 355 o use Var_Exists rather than Var_Value where appropriate 356 o remove unnecessary functions for expanding variable names 357 o cond.c: inline EvalBare 358 o main.c: lint cleanup 359 o parse.c: condense code in Parse_IsVar 360 use islower for parsing directives (none have upper case) 361 3622022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 363 364 * VERSION (_MAKE_VERSION): 20220112 365 Merge with NetBSD make, pick up 366 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 367 comparion, rarely needed but useful when it is. 368 3692022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 370 371 * VERSION (_MAKE_VERSION): 20220110 372 Merge with NetBSD make, pick up 373 o inline Buf_Clear 374 o remove redundant braces 375 o rename and inline Targ_Precious 376 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 377 o for.c: clean up handling of .for loops 378 fix reported line numbers of continuation lines 379 add details about .for loop variables to stack traces 380 o job.c: reduce code for initializing error handling in shell 381 o main.c: in Cmd_Exec, return error message instead of format string 382 have as few statements as possible between va_start and va_end 383 add debug logging for capturing the output of external commands 384 o make.c: use consistent variable names for varargs 385 o make_malloc.c: remove duplicate code from bmake_strdup 386 o parse.c: add missing printflike annotations 387 remove redundant lines from stack traces 388 fix stack traces in -dp mode 389 reduce confusing code in ParseForLoop 390 fix line number in debug log after returning from a file 391 rename IFile and its fields to match their actual content 392 clean up ParseDependencySources 393 o var.c: shorten ApplyModifier_Assign 394 rename is_shell_metachar, fix character conversion warning 395 merge calls to ApplyModifier_Time 396 merge duplicate code for modifiers 'gmtime' and 'localtime' 397 3982022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 399 400 * parse.c: loadfile restore extra byte in buffer. 401 4022022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 403 404 * VERSION (_MAKE_VERSION): 20220101 405 Merge with NetBSD make, pick up 406 o more unit-tests 407 o remove unnecessary words from command line options in CmdOpts 408 o rename eunlink to unlink_file 409 o cond.c: make ParseWord in condition parser simpler 410 internally return false for irrelevant leaves in conditions 411 replace table for function lookup in conditions with simple code 412 merge duplicate types CondEvalResult and CondResult 413 o for.c: clean up handling of .for loops and .include directives 414 o main.c: constify cached_realpath 415 clean up Cmd_Exec 416 o parse.c: sync API documentation 417 fix error message when reading more than 1 GB from stdin 418 clean up parsing of makefiles 419 fix line number in error message about open conditionals 420 unexport types VarAssignOp and VarAssign 421 clean up function names 422 remove redundant parameters in dependency parsing functions 423 reduce scope of the list of wildcard target names 424 extract OP_NOTARGET into separate function 425 clean up variable names for parsing dependency lines 426 make debug logging a bit more human-friendly 427 o var.c: condense code in ApplyModifier_Assign 428 4292021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 430 431 * VERSION (_MAKE_VERSION): 20211221 432 Merge with NetBSD make, pick up 433 o more unit-tests 434 o style cleanup 435 o in CLEANUP mode, free interned strings at the very end 436 o fix memory leak for filenames in .for loops 437 o buf.c: avoid memory leak 438 o cond.c: condense CondParser_ComparisonOp 439 o hash.c: change return type of HashTable_Set to void 440 o job.c: change return type of Compat_RunCommand from int to bool 441 o main.c: remove bmake_free 442 o parse.c: condense repetetive code in ParseDirective 443 remove dead code for handling traditional include directives 444 clean up parsing of variable assignments 445 remove unreachable code for parsing the dependency operator 446 clean up loading of files 447 fix memory leak in IncludeFile 448 o var.c: fix memory leak when parsing a variable name 449 fix memory leak from ${.SUFFIXES} 450 reduce memory allocation in modifier ':?' and ':C' 451 condense RegexReplace for the modifier ':C' and avoid strlen 452 merge duplicate code for memory handling in Var_Parse 453 distinguish between short-lived and environment variables 454 rename VarFreeEnv to VarFreeShortLived 455 4562021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 457 458 * cond.c: fix mem leak in CondParser_Leaf 459 4602021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 461 462 * VERSION (_MAKE_VERSION): 20211212 463 Merge with NetBSD make, pick up 464 o rename Parse_SetInput to Parse_PushInput 465 o remove remove period from end of error messages and warnings 466 to be more consistent 467 o arch.c: use simpler memory management for parsing archive members 468 o cond.c: rework and reduce recursion 469 o for.c: rename some functions to better reflect purpose 470 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 471 o var.c: in parse errors, mark whitespace more clearly 472 inline ParseEmptyArg into CondParser_FuncCallEmpty 473 minimize calls to LazyBuf_Get in ParseVarnameLong 474 treat .SUFFIXES as a read-only variable 475 4762021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 477 478 * VERSION (_MAKE_VERSION): 20211207 479 Merge with NetBSD make, pick up 480 o inline HashIter_Init 481 o parse.c: inline common subexpression in ParseRawLine 482 o var.c: merge branches for modifiers ':D' and ':U' 483 extract common code into Expr_Words 484 extract common code into Expr_Str 485 move low-level implementation details out of Var_Parse 486 4872021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 488 489 * VERSION (_MAKE_VERSION): 20211206 490 Merge with NetBSD make, pick up 491 o add unit-tests/varmod-loop-delete 492 o for.c: inline Str_Words - reduce memory allocation 493 o parse.c: do not try to expand fixed variable names 494 only allocate the name of an included file if necessary 495 clean up ParseInclude 496 o var.c: fix use-after-free in modifier ':@' 497 save a memory allocation in each modifier ':O' and ':u' 498 save a memory allocation in the modifier ':[...]' 499 in UnexportVars, replace Str_Words with Substring_Words to 500 reduce allocations and copying. 501 5022021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 503 504 * VERSION (_MAKE_VERSION): 20211204 505 Merge with NetBSD make, pick up 506 o flesh out a number of tests 507 o replace enums with bitfields, this simplifies a lot of code. 508 o var.c: refactor ParseModifierPartSubst 509 5102021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 511 512 * VERSION (_MAKE_VERSION): 20211024 513 Merge with NetBSD make, pick up 514 o Punt on write errors - ENOSPC etc. 515 5162021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 517 518 * configure.in: use_defshell, set both DEFSHELL_INDEX 519 and defshell_path if appropriate. 520 This makes it easier to use say the KSH specification with 521 and alternate path for the shell. 522 523 * configure.in compat.c: for SCO we need to force UseShell 524 525 * configure.in: SCO /bin/sh is not usable, provide a list of 526 alternatives for use as .SHELL. 527 We still have to mark some tests as broken, plus more if we end up 528 with ksh as .SHELL. 529 Issue a warning about skipped tests. 530 531 * boot-strap: leave TOOL_DIFF to configure 532 533 * configure.in: on SCO native cc is not usable, 534 gcc is to be found in /usr/gnu/bin 535 and while ancient is at least able to compile bmake. 536 Thus we add /usr/gnu/bin to PATH if it exists, and later 537 check if $CC would have been found via $PATH. 538 If not we set CC to the full path of $CC. 539 Also gnu diff is known to support -u, so if it exists use it. 540 541 * configure.in: move getopt to AC_REPLACE_FUNCS 542 also add AC_C_INLINE - in an attempt to compile using 543 native cc on SCO. 544 545 * configure.in: check for stresep as well as strsep, since we 546 define the later to the former if necessary, and if we have to 547 provide stresep we also need to provide a prototype. 548 549 * configure.in: we no longer need to worry about 550 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 551 552 * make.h: make sure we have __RCSID 553 554 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 555 can control it. 556 5572021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 558 559 * VERSION: 20211020 560 Merge with NetBSD make, pick up 561 o confirm sync of unit-tests 562 5632021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 564 565 * configure.in: check if timezone Europe/Berlin is supported 566 if not try UTC-1 567 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 568 symlink unit-tests -> ../unit-tests/obj so that 569 unit-tests/Makefile.config is put in the right place. 570 * refine filtering of .OBJDIR in unit-tests 571 5722021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 573 574 * Fix unit-tests on Minix 3.2.0 575 o job.c: do not punt if read of token pipe fails for EAGAIN. 576 On Minix at least, we are not ready to read the childExitJob pipe 577 when poll says we are. 578 There should actually be no reason for this pipe to be 579 non-blocking, but while that works fine on {Net,Free}BSD it 580 breaks another test case on Minix. 581 o unit-tests/Makefile: deal with variants of error messages 582 and use of obj as .OBJDIR 583 5842021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 585 586 * configure.in: add sigaction to AC_REPLACE_FUNCS 587 we also need to check for sigaddset etc just for the benefit of 588 sigact.c 589 590 * Add sigact.c as sigaction.c so this "just works". 591 This should have been done back when bmake_signal started using 592 sigaction (I only just noticed that sigact.c wasn't here ;-) 593 Note: I no longer have access to any system where this would matter. 594 5952021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 596 597 * VERSION (_MAKE_VERSION): 20211011 598 599 * Makefile: cleanup a little 600 601 * configure.in: check for sigsetmask 602 6032021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 604 605 * VERSION (_MAKE_VERSION): 20211001 606 Merge with NetBSD make, pick up 607 o reduce locations reducing text size 608 o remove unnecessary const 609 o cond.c: fix lint warning on i386 610 do not allow unquoted 'left == right' after modifier ':?' 611 o hash.c: fix build for DEBUG_HASH_LOOKUP 612 o var.c: fix memory leak in error case of the ':?' modifier 613 6142021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 615 616 * VERSION (_MAKE_VERSION): 20210911 617 Merge with NetBSD make, pick up 618 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 619 6202021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 621 622 * VERSION (_MAKE_VERSION): 20210906 623 Merge with NetBSD make, pick up 624 o more unit tests 625 o lint cleanup 626 o rename some functions to better fit purpose 627 o for.c: cleanup - remove unnecessary optimization 628 fix embedded newlines 629 o parse.c: correct case for CVS/RCS 630 6312021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 632 633 * VERSION (_MAKE_VERSION): 20210808 634 Merge with NetBSD make, pick up 635 o var.c: remove redundant initialization in ApplyModifier_Order 636 637 * mk/options.mk: issue warning for incorrect usage 638 6392021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 640 641 * var.c: use long for :On if we don't have a 64bit int type 642 643 * VERSION (_MAKE_VERSION): 20210803 644 Merge with NetBSD make, pick up 645 o rework varmod-order tests to avoid qsort instability 646 o make.1: clarify :On entry 647 6482021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 649 650 * VERSION (_MAKE_VERSION): 20210731 651 Merge with NetBSD make, pick up 652 o fix some lint issues 653 o more unit tests 654 o var.c: rework of ApplyModifier_Order 655 6562021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 657 658 * util.c: add strto*l if HAVE_STRTO*L not defined 659 660 * VERSION (_MAKE_VERSION): 20210730 661 Merge with NetBSD make, pick up 662 o var.c: add :On and :Orn for numeric sort 663 disabled if no 64bit type available. 664 o _strtol.h: to implement strto*l functions 665 6662021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 667 668 * VERSION (_MAKE_VERSION): 20210704 669 Merge with NetBSD make, pick up 670 o unit-tests: fix some tests to be more portable 671 - job-output-null not all shells do the same number of write calls 672 - objdir-writable if TMPDIR is set; /tmp may not be usable 673 6742021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 675 676 * VERSION (_MAKE_VERSION): 20210701 677 Merge with NetBSD make, pick up 678 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 679 some tests just cannot work in some environments. 680 o buf.c: simpler upper bound for length in Buf_AddInt 681 o cond.c: fix grammar in error message for malformed conditional 682 o for.c: prevent newline injection (from ${.newline}) in .for loops 683 o var.c: use more practical data type in RegexReplace 684 (avoid need for %zu) 685 extract RegexReplace from ModifyWord_SubstRegex 686 6872021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 688 689 * VERSION (_MAKE_VERSION): 20210621 690 Merge with NetBSD make, pick up 691 o var.c: only report error for unmatched regex subexpression 692 when linting (-dL) since we cannot tell when an unmatched 693 subexpression is an expected result. 694 o move unmatched regex subexpression tests to 695 varmod-subst-regex.mk and enable strict (lint) mode 696 6972021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 698 699 * VERSION (_MAKE_VERSION): 20210616 700 Merge with NetBSD make, pick up 701 o more unit tests 702 o cond.c: rename If_Eval to EvalBare 703 improve function names for parsing conditions 704 o job.c: fix error handling of targets that cannot be made 705 o var.c: uncompress code in ApplyModifier_Unique 706 7072021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 708 709 * VERSION (_MAKE_VERSION): 20210518 710 Merge with NetBSD make, pick up 711 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 712 o job.c: Print -de error information when running multiple jobs 713 7142021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 715 716 * VERSION (_MAKE_VERSION): 20210420 717 Merge with NetBSD make, pick up 718 o use C99 bool type 719 o convert VarEvalFlags back into an enum 720 o cond.c: do not complain when skipping the condition 'no >= 10' 721 o hash.c: avoid allocating memory for simple variable names 722 o job.c: use distinct wording for writing to the shell commands file 723 remove type name for the abort status in job handling 724 rename PrintOutput to PrintFilteredOutput to avoid confusion 725 o main.c: avoid double slash in name of temporary directory 726 o var.c: use straight quotes for error 'Bad conditional expression' 727 reduce memory allocations in the modifiers ':D' and ':U' 728 rename members of ModifyWord_LoopArgs 729 clean up pattern flags for the modifiers ':S' and ':C' 730 reduce memory allocation and strlen calls in modifier ':from=to' 731 in the ':Q' modifier, only allocate memory if necessary 732 improve performance for LazyBuf 733 remove redundant parameter from ParseVarnameLong 734 migrate ParseModifierPart to use Substring 735 avoid unnecessary calls to strlen when evaluating modifiers 736 migrate ModifyWord functions to use Substring 737 migrate handling of the modifier ':S,from,to,' to Substring 738 reduce debug logging and memory allocation for ${:U...} 739 reduce verbosity of the -dv debug logging for standard cases 740 clean up debug logging for ':M' and ':N' 741 disallow '$' in the variable name of the modifier ':@' 742 simplify access to the name of an expression during evaluation 743 7442021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 745 746 * VERSION (_MAKE_VERSION): 20210330 747 Merge with NetBSD make, pick up 748 o replace enum bit-field with struct bit-field for VarEvalFlags 749 o rename VARE_NONE to VARE_PARSE_ONLY 750 o var.c: rename ApplyModifiersState to ModChain 751 fix double varname expansion in the variable modifier '::=' 752 change debug log for variable evaluation flags to lowercase 753 7542021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 755 756 * VERSION (_MAKE_VERSION): 20210314 757 Merge with NetBSD make, pick up 758 o var.c: avoid evaluating many modifiers in parse only mode 759 in strict mode (-dL) many variable references are parsed twice, 760 the first time just to report parse errors early, so we want to 761 avoid side effects and wasted effort to the extent possible. 762 7632021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 764 765 * VERSION (_MAKE_VERSION): 20210226 766 Merge with NetBSD make, pick up 767 o remove freestanding freeIt variables 768 link via FStr 769 o var.c: restructure code in ParseVarname to target human readers 770 improve error message for; 771 bad modifier in variable expression 772 unclosed modifier 773 unknown modifier 774 remove redundant parameter of ApplySingleModifier 775 explain non-obvious code around indirect variable modifiers 776 quote ':S' in error message about missing delimiter 777 extract ParseModifier_Match into separate function 778 add context information to error message about ':range' modifier 779 add quotes around variable name in an error message 780 reorder code in ModifyWords 781 use more common parameter order for VarSelectWords 782 make ModifyWord_Subst a little easier to understand 783 do not expand variable name from the command line twice 784 extract ExistsInCmdline from Var_SetWithFlags 785 save a hash map lookup when defining a cmdline variable 786 clean up VarAdd, Var_Delete, Var_ReexportVars 787 use bit-shift expressions for VarFlags constants 788 rename constants for VarFlags 789 rename ExprDefined constants for debug logging 790 rename ExprStatus to ExprDefined 791 split parameters for evaluating variable expressions 792 reduce redundant code around ModifyWords 793 print error about failed shell command before overwriting variable 794 clean up ValidShortVarname, ParseVarnameShort 795 rename VarExprStatus to ExprStatus 796 add functions for assigning the value of an expression 797 rename ApplyModifiersState_Define to Expr_Define 798 condense the code for parsing :S and :C modifiers 799 8002021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 801 802 * VERSION (_MAKE_VERSION): 20210206 803 Merge with NetBSD make, pick up 804 o unit-tests: use private TMPDIR to avoid errors from other users 805 8062021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 807 808 * VERSION (_MAKE_VERSION): 20210205 809 Merge with NetBSD make, pick up 810 o avoid strdup in mkTempFile 811 o always use vfork 812 o rename context and ctxt to scope 813 o rename some VAR constants to SCOPE 814 o Var_ functions, move the scope to the front 815 o use shortcut functions Global_Set and Global_Append 816 o add shortcut Global_Delete for deleting a global variable 817 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 818 o compat.c: when exiting due to an error, print graph information 819 o enum.c: remove overengineered Enum_ValueToString 820 o make.c: remove unused INTERNAL flag 821 remove unused return type of MakeBuildParent 822 o parse.c: replace parse error "Need an operator" with better message 823 o var.c: improve documentation about variable scopes 824 rename Var_ValueDirect to GNode_ValueDirect 825 rename old Var_SetWithFlags to Var_SetExpandWithFlags 826 merge SetVar into Var_SetWithFlags 827 split Var_Exists into plain Var_Exists and Var_ExistsExpand 828 split Var_Append into Var_Append and Var_AppendExpand 829 replace enum bit-set with bit-field 830 o unit-tests/var-op-shell: use kill rather than kill -14 831 which broke on darwin with recent update. 832 8332021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 834 835 * configure.in: check for sig_atomic_t and define it as 'int' 836 if missing. 837 838 * VERSION (_MAKE_VERSION): 20210201 839 Merge with NetBSD make, pick up 840 o use sig_atomic_t for caught_sigchld 841 8422021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 843 844 * VERSION (_MAKE_VERSION): 20210130 845 Merge with NetBSD make, pick up 846 o more unit tests 847 o convert SearchPath to struct 848 o split Buf_Destroy into Buf_Done and Buf_DoneData 849 o for.c: split For_Eval into separate functions 850 rename struct For to struct ForLoop 851 o job.c: do not create empty shell files in jobs mode 852 rename JobOpenTmpFile to JobWriteShellCommands 853 reduce unnecessary calls to waitpid 854 o parse.c: in -dp mode, print stack trace with each diagnostic 855 8562021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 857 858 * VERSION (_MAKE_VERSION): 20210123 859 Merge with NetBSD make, pick up 860 o rename Dir_Expand to SearchPath_Expand 861 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 862 o cond.c: fix debug output for comparison operators in conditionals 863 o dir.c: split Dir_FindFile into separate functions 864 8652021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 866 867 * VERSION (_MAKE_VERSION): 20210120 868 Merge with NetBSD make, pick up 869 o fix some more lint nits 870 o refine some unit tests for portability 871 o cond.c: rework parsing 872 8732021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 874 875 * VERSION (_MAKE_VERSION): 20210110 876 Merge with NetBSD make, pick up 877 o fix lint warnings 878 o consistently use boolean expressions in conditions 879 8802021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 881 882 * VERSION (_MAKE_VERSION): 20210108 883 Merge with NetBSD make, pick up 884 o job.c: back to polling token pipe if we want a token 885 o main.c: always print 'stopped in' on first call 886 The execption is if we bail because of an abort token 887 in which case just exit 6. 888 8892021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 890 891 * VERSION (_MAKE_VERSION): 20210101 892 Merge with NetBSD make, pick up 893 o Happy New Year! 894 o rename CmdOpts.lint to strict 895 o exit 2 on technical errors 896 o replace pointers in controlling conditions with booleans 897 o replace global preserveUndefined with VARE_KEEP_UNDEF 898 o compat.c: re-export variables from the actual make process 899 if using vfork this is the effect anyway 900 o cond.c: clean up VarParseResult constants 901 o for.c: fix undefined behavior in SubstVarLong 902 make control flow in SubstVarLong of .for loops more obvious 903 clean up SubstVarShort in .for loops 904 extract ForSubstBody from ForReadMore 905 clean up ForReadMore 906 simplify termination condition for .for loop 907 add error handling for .for loop items 908 job.c: re-export variables from the actual make process 909 parse.c: remove mmap for loading files, only allow files < 1 GiB 910 fix edge case in := with undefined in variable name 911 skip variable expansion in ParseDependencyTargetWord 912 var.c: split ExportVar into separate functions 913 clean up code in extracted ExportVar functions 914 remove dead code from ApplyModifiersIndirect 915 split Var_Subst into easily understandable functions 916 clean up VarParseResult constants 917 9182020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 919 920 * main.c: use .MAKE.DEPENDFILE as set by makefiles 921 9222020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 923 924 * VERSION (_MAKE_VERSION): 20201222 925 Merge with NetBSD make, pick up 926 o make DEBUG macro return boolean 927 o parse.c: fix assertion failure for files without trailing newline 928 o var.c: allow .undef to undefine multiple variables at once 929 remove excess newline from parse errors 930 9312020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 932 933 * VERSION (_MAKE_VERSION): 20201221 934 Merge with NetBSD make, pick up 935 o some unit-test updates 936 9372020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 938 939 * VERSION (_MAKE_VERSION): 20201220 940 Merge with NetBSD make, pick up 941 o more unit tests 942 o return FStr from Var_Parse and Var_Value 943 o spell nonexistent consistently 944 o add str_basename to reduce duplicate code 945 o compat.c: fix .ERROR_TARGET in compat -k mode 946 extract InitSignals from Compat_Run 947 extract UseShell from Compat_RunCommand 948 o cond.c: error out if an '.endif' or '.else' contain extraneous text 949 o for.c: rename ForIterate to ForReadMore 950 o hash.c: clean up hash function for HashTable 951 o lst.c: rename Vector.priv_cap to cap 952 o main.c: remove constant parameter from MakeMode 953 o make.c: use symbolic time for 0 in Make_Recheck 954 extract MakeChildren from MakeStartJobs 955 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 956 fix error message for .info/.warning/.error without argument 957 extract Var_Undef from ParseDirective 958 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 959 rename mode constants for ParseGetLine to be more expressive 960 reduce debugging details in Parse_SetInput 961 fix line numbers in .for loops 962 split ParseGetLine into separate functions 963 fix garbled output for failed shell command 964 var.c: remove redundant assignment in ApplyModifier_SysV 965 error out on unknown variable modifiers at parse time 966 remove wrong error message for indirect modifier in lint mode 967 extract ApplySingleModifier from ApplyModifiers 968 use FStr for memory management in Var_SetWithFlags 969 extract SetVar from Var_SetWithFlags 970 use FStr in VarNew 971 extract string functions from ApplyModifier_To 972 error out if .undef has not exactly 1 argument 973 extract Var_DeleteVar from Var_Delete 974 extract Var_Undef from ParseDirective 975 clean up memory management for expanding variable expressions 976 9772020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 978 979 * avoid %zu 980 981 * lst.c: avoid anonymous union 982 983 * VERSION (_MAKE_VERSION): 20201212 984 Merge with NetBSD make, pick up 985 o more unit tests 986 o inline Targ_Ignore and Targ_Silent 987 o split JobFlags into separate fields 988 o remove const from function parameters (left overs from refactoring) 989 o eliminate boolean argument of Var_Export 990 o make API of Buf_Init simpler 991 o rename ParseRunOptions to ParseCommandFlags 992 o replace *line with line[0] 993 o compat.c: fix wrong exit status for multiple failed main targets 994 refactor Compat_Run to show the error condition more clearly 995 don't make .END if the main targets already failed (-k mode) 996 fix exit status in -k mode if a dependency fails 997 o for.c: clean up Buf_AddEscaped in .for loops 998 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 999 make Job_Touch simpler 1000 refactor JobFinish 1001 rename Shell.exitFlag to errFlag 1002 move Job.xtraced to ShellWriter 1003 make printing of shell commands independent from the job 1004 rename shell flags in struct Shell 1005 extract JobOpenTmpFile from JobStart 1006 rename RunFlags to CommandFlags 1007 split various Job.* into separate fields 1008 rename commandShell to shell 1009 extract InitShellNameAndPath from Shell_Init 1010 replace signal handling macros with local functions 1011 replace macro MESSAGE with local function 1012 parse.c: error out on null bytes in makefiles 1013 error out on misspelled directives 1014 rename IFile.nextbuf to readMore 1015 fix undefined behavior in ParseEOF 1016 str.c: remove redundant call to strlen in Str_Words 1017 var.c: error out on misspelled .unexport-env 1018 error out on misspelled .export directives 1019 extract ExportVars from Var_Export 1020 extract ExportVarsExpand from Var_Export 1021 eliminate boolean argument of Var_Export 1022 fix undefined behavior when exporting ${:U } 1023 rename Var_ExportVars to Var_ReexportVars 1024 rename Var_Export1 to ExportVar 1025 10262020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1027 1028 * VERSION (_MAKE_VERSION): 20201206 1029 Merge with NetBSD make, pick up 1030 o more unit tests 1031 o inline macros for debug logging 1032 o use consistent variable names for list nodes 1033 o define constants for enum zero-values 1034 o dir.c: use fixed format for debug output of the directory cache 1035 remove Dir_InitDir 1036 o lst.c: inline Lst_Enqueue, Vector_Done 1037 o meta.c: remove unused parameter from meta_needed 1038 o parse.c: rename parse functions 1039 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1040 o targ.c: don't concatenate identifiers in Targ_PrintType 1041 o var.c: remove comment decoration 1042 extract UnexportVars from Var_UnExport 1043 extract GetVarnamesToUnexport from Var_UnExport 1044 extract UnexportEnv from Var_UnExport 1045 extract UnexportVar from Var_UnExport 1046 move CleanEnv to UnexportVars 1047 replace pointer comparisons with enum 1048 add FStr to var.c to make memory handling simpler 1049 use FStr in Var_UnExport 1050 move type definitions in var.c to the top 1051 extract FreeEnvVar from Var_Parse 1052 extract ShuffleStrings from ApplyModifier_Order 1053 10542020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1055 1056 * VERSION (_MAKE_VERSION): 20201130 1057 Merge with NetBSD make, pick up 1058 o add unit tests for META MODE 1059 o reduce memory allocation for dirSearchPath, GNode.parents, 1060 GNode.children, OpenDirs 1061 o reduce pointer indirection for GNode.cohorts and 1062 GNode.implicitParents 1063 o remove pointer indirection from GNode.commands 1064 o inline Lst_ForEachUntil in meta mode 1065 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1066 clean up memory management for CachedDirs 1067 fix the reference count of dotLast going negative 1068 add debug logging for OpenDirs_Done 1069 extract CacheNewDir from Dir_AddDir 1070 add debug logging for reference counting of CachedDir 1071 rename some Dir functions to SearchPath 1072 o job.c: rename some global variables 1073 o main.c: reduce memory allocation in ReadBuiltinRules 1074 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1075 CmdOpts.makefiles 1076 Add .MAKE.UID and .MAKE.GID 1077 o make.c: reduce memory allocation for/in toBeMade, 1078 Make_ProcessWait, Make_ExpandUse 1079 o meta.c: reduce memory allocation in meta_oodate 1080 o parse.c: reduce memory allocations for parsing dependencies and 1081 targets 1082 o suff.c: reduce memory allocation in suffix handling 1083 10842020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1085 1086 * VERSION (_MAKE_VERSION): 20201124 1087 Merge with NetBSD make, pick up 1088 o .MAKE.{UID,GID} represent uid and gid running make. 1089 o fix error handling for .BEGIN and .END dependency in -k mode 1090 o fix missing "Stop." after failed .END node in -k mode 1091 o use properly typed comparisons in boolean contexts 1092 o replace a few HashTable_CreateEntry with HashTable_Set 1093 o add HashSet type 1094 o compat.c: split Compat_Make into smaller functions 1095 extract DebugFailedTarget from Compat_RunCommand 1096 o dir.c: refactor Dir_UpdateMTime 1097 migrate CachedDir.files from HashTable to HashSet 1098 o make.c: add high-level API for GNode.made 1099 11002020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1101 1102 * VERSION (_MAKE_VERSION): 20201122 1103 Merge with NetBSD make, pick up 1104 o rename GNode.context to vars 1105 o suff.c: cleanup and refactor 1106 rename some functions and vars to better reflect usage 1107 add high-level API for CandidateSearcher 1108 o targ.c: add more debug logging for suffix handling 1109 o more unit tests 1110 o add debug logging for setting and resetting the main target 1111 11122020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1113 1114 * VERSION (_MAKE_VERSION): 20201117 1115 Merge with NetBSD make, pick up 1116 o fix some unit-tests when .SHELL is dash 1117 o rename Targ_NewGN to GNode_New 1118 o make some GNode functions const 1119 o main.c: call Targ_Init before Var_Init 1120 cleanup PrintOnError, getTmpdir and ParseBoolean 1121 o var.c: fix error message of failed :!cmd! modifier 1122 11232020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1124 1125 * VERSION (_MAKE_VERSION): 20201114 1126 Merge with NetBSD make, pick up 1127 o replace a few HashTable_CreateEntry with HashTable_Set 1128 o clean up cached_stats 1129 o rename DEFAULT to defaultNode 1130 o remove redundant struct make_stat 1131 o cond.c: in lint mode, check for ".else <cond>" 1132 use bitset for IfState 1133 replace large switch with if-else in Cond_EvalLine 1134 o job.c: clean up JobExec, JobStart, JobDoOutput 1135 use stderr for error message about failed touch 1136 clean up Job_Touch 1137 replace macro DBPRINTF with JobPrintln 1138 rename JobState to JobStatus 1139 main.c: switch cache for realpath from GNode to HashTable 1140 clean up Fatal 1141 clean up InitDefSysIncPath 1142 use progname instead of hard-coded 'make' in warning 1143 rename Main_SetVarObjdir to SetVarObjdir 1144 make.1: document the -S option 1145 make.c: fix debug output for GNode details 1146 use symbolic names in debug output of GNodes 1147 11482020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1149 1150 * configure.in: fix --with-force-machine-arch 1151 1152 * VERSION (_MAKE_VERSION): 20201112 1153 Merge with NetBSD make, pick up 1154 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1155 checks in InitObjdir. Explicit .OBJDIR target always allows 1156 read-only directory. 1157 o cond.c: clean up Cond_EvalLine 1158 11592020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1160 1161 * VERSION (_MAKE_VERSION): 20201111 1162 Merge with NetBSD make, pick up 1163 o more unit-tests 1164 o style cleanup 1165 remove redundant parentheses from sizeof operator 1166 replace character literal 0 with '\0'. 1167 replace pointer literal 0 with NULL. 1168 remove redundant parentheses. 1169 replace (expr & mask) == 0 with !(expr & mask). 1170 use strict typing in conditions of the form !var 1171 o rename Make_OODate to GNode_IsOODate 1172 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1173 o rename Var_Set_with_flags to Var_SetWithFlags 1174 o rename dieQuietly to shouldDieQuietly 1175 o buf.c: make API of Buf_Init simpler 1176 o compat.c: clean up Compat_Make, Compat_RunCommand, 1177 CompatDeleteTarget and CompatInterrupt 1178 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1179 clean up CondParser_Comparison 1180 o main.c: rename getBoolean and s2Boolean 1181 rename MAKEFILE_PREFERENCE for consistency 1182 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1183 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1184 replace emptyString with allocated empty string 1185 error out on unclosed expressions after the colon 1186 11872020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1188 1189 * VERSION (_MAKE_VERSION): 20201101 1190 Merge with NetBSD make, pick up 1191 o negate NoExecute to GNode_ShouldExecute 1192 o job.c: rename JobMatchShell to FindShellByName 1193 extract EscapeShellDblQuot from JobPrintCommand 1194 extract ParseRunOptions from JobPrintCommand 1195 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1196 treat malformed :range, :ts and :[...] as errors 1197 add tests for the variable modifiers :[words] and :range 1198 11992020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1200 1201 * VERSION (_MAKE_VERSION): 20201031 1202 Merge with NetBSD make, pick up 1203 o format #include directives consistently 1204 o do not look up local variables like .TARGET anywhere else 1205 o main.c: Main_SetObjdir is first called for curdir which may be 1206 readonly 1207 reduce the scope where recursive expressions are detected 1208 remove redundant :tl from getBoolean 1209 clean up mkTempFile 1210 o meta.c: simplify memory allocation in meta_create and meta_oodate 1211 o parse.c: extract loadedfile_mmap from loadfile 1212 o trace.c: document possible undefined behavior with .CURDIR 1213 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1214 rename ismeta to is_shell_metachar 1215 remove debug logging for the :Q variable modifier 1216 rename VarIsDynamic to VarnameIsDynamic 1217 use consistent parameter order in varname parsing functions 1218 extract ParseVarnameLong from Var_Parse 1219 extract ParseVarnameShort from Var_Parse 1220 fix type of ParseModifierPart parameter delim 1221 extract IsEscapedModifierPart from ParseModifierPart 1222 clean up ModifyWords 1223 add test for combining the :@ and :? variable modifiers 1224 12252020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1226 1227 * VERSION (_MAKE_VERSION): 20201030 1228 Merge with NetBSD make, pick up 1229 o change char * to void * in Var_Value 1230 o make iterating over HashTable simpler 1231 o rename VAR_CMD to VAR_CMDLINE 1232 o cond.c: clean up is_separator 1233 fix parse error in string literal in conditional 1234 o main.c: do not use objdir that is not writable 1235 in lint mode, exit with error status on errors 1236 o parse.c: clean up StrContainsWord 1237 fix out-of-bounds pointer in ParseTrackInput 1238 o var.c: rename Str_SYSVMatch and its parameters 1239 remove unsatisfiable conditions in Var_Set_with_flags 1240 document where the variable name is expanded 1241 fix documentation for VARP_SUB_ONE 1242 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 1243 document VAR_READONLY 1244 prevent appending to read-only variables 1245 extract MayExport from Var_Export1 1246 remove redundant evaluations in VarFind 1247 replace VarFindFlags with a simple Boolean 1248 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 1249 12502020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 1251 1252 * VERSION (_MAKE_VERSION): 20201028 1253 Merge with NetBSD make, pick up 1254 o rename defIncPath to defSysIncPath 1255 o initialize all CmdOpts fields 1256 o lst.c: inline Vector_Get 1257 o main.c: refactor main extract 1258 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 1259 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 1260 InitDefIncPath,CmdOpts_Init,UnlimitFiles 1261 o parse.c: merge curFile into includes 1262 rename predecessor to order_pred 1263 sort ParseSpecial alphabetically 1264 remove unused, undocumented .NOEXPORT 1265 rename ParseSpecial enum values consistently 1266 rename some fields of struct IFile 1267 12682020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 1269 1270 * VERSION (_MAKE_VERSION): 20201026 1271 Merge with NetBSD make, pick up 1272 o group the command line options and arguments into a struct 1273 o rename GNode.cmgn to youngestChild 1274 o rename hash functions to identify the type name 1275 o negate OP_NOP and rename it to GNode_IsTarget 1276 o add GNode_Path to access the path of a GNode 1277 o remove macros MIN and MAX 1278 o remove unused Lst_Find and Lst_FindFrom 1279 o arch.c: and make Arch_FindLib simpler 1280 clean up code layout 1281 make Arch_ParseArchive simpler 1282 o cond.c: inline CondFindStrMatch into FuncMake 1283 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 1284 omit trailing space in debug output for expanding file patterns 1285 refactor DirMatchFiles 1286 document that the SearchPath of Dir_FindFile may be NULL 1287 remove UNCONST from Dir_Expand 1288 inline DirFindName 1289 o for.c: clean up code for handling .for loops 1290 o hash.c: print hash in debug log with fixed width 1291 clean up hash table functions 1292 reduce amount of string hashing 1293 o job.c: refactor JobDeleteTarget 1294 use proper enum constants for aborting 1295 convert result of JobStart from macros to enum 1296 convert abort reason macros to enum 1297 rework Job_CheckCommands to reduce indentation 1298 rename Shell fields 1299 add field names in declaration of DEFSHELL_CUSTOM 1300 convert JobState and JobFlags to enum types 1301 move handling of the "..." command to JobPrintCommands 1302 o lst.c: clean up 1303 refactor LstNodeNew 1304 remove Lst_Open, Lst_Next, Lst_Close 1305 remove code for circular lists from Lst_Next 1306 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 1307 /dev/null or anything starting with "no" 1308 convert macros for debug flags into enum 1309 o make.c: inline Lst_Copy in Make_ExpandUse 1310 o meta.c: inline Lst_Find in meta_oodate 1311 make Lst_RemoveIf simpler in meta_oodate 1312 o parse.c: convert error level for Parse_Error to an enum 1313 o suff.c: properly terminate debug output with newline 1314 add more details to DEBUG_SRC log 1315 replace Dir_CopyDir with Dir_CopyDirSearchPath 1316 don't modify GNode name while rebuilding the suffix graph 1317 o var.c: reduce duplicate code in VarFind 1318 13192020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1320 1321 * VERSION (_MAKE_VERSION): 20201022 1322 Merge with NetBSD make, pick up 1323 o more refactoring and simplification to reduce code size 1324 o var.c: extract CanonicalVarname from VarFind 1325 o make.c: extract UpdateImplicitParentsVars from Make_Update 1326 o main.c: extract PrintVar from doPrintVars 1327 extract HandlePWD from main 1328 o lst.c: inline simple Lst getters 1329 remove unused Lst_ForEach 1330 o job.c: move struct Shell from job.h to job.c 1331 o more unit tests 1332 13332020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 1334 1335 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 1336 13372020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1338 1339 * VERSION (_MAKE_VERSION): 20201018 1340 Merge with NetBSD make, pick up 1341 o remove USE_IOVEC 1342 o rename some Hash_* apis to Hash* 1343 o replace execError with execDie 1344 o rename Lst_Init to Lst_New 1345 o add tags to enum types 1346 o rename Stack to Vector 1347 o parse.c: more refactoring 1348 o unit-tests: make some tests use line buffered stdout 1349 o unit-tests/Makefile: in meta mode do not make all tests depend on 1350 Makefile, it isn't necessary. 1351 13522020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 1353 1354 * main.c: check for CTL_HW being defined. 1355 * unit-tests/Makefile: ensure export tests output are POSIX compliant 1356 disable opt-debug-jobs test until it works on ubuntu 1357 1358 * VERSION (_MAKE_VERSION): 20201010 1359 Merge with NetBSD make, pick up 1360 o dir.c: remove pathname limit for Dir_FindHereOrAbove 1361 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 1362 o main.c: extract init_machine and init_machine_arch from main 1363 allow to disable debug logging options 1364 o parse.c: enable format string truncation warnings 1365 extract parsing of sources from ParseDoDependency 1366 split ParseDoSrc into smaller functions 1367 hide implementation details from Parse_DoVar 1368 clean up parsing of variable assignments 1369 split Parse_DoVar into manageable pieces 1370 don't modify the given line during Parse_DoVar 1371 fix out-of-bounds memory access in Parse_DoVar 1372 fix parsing of the :sh assignment modifier 1373 o var.c: rework memory allocation for the name of variables 1374 extract ApplyModifier_Literal into separate function 1375 in lint mode, reject modifiers without delimiter 1376 do not export variable names starting with '-' 1377 o fix double-free bug in -DCLEANUP mode 1378 o more cleanup to enable higher warnings level 1379 o more unit tests 1380 13812020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 1382 1383 * VERSION (_MAKE_VERSION): 20201002 1384 Merge with NetBSD make, pick up 1385 o dir.c: use hash table for looking up open directories by name 1386 o main.c: clean up option handling 1387 o parse.c: add missing const for Parse_AddIncludeDir 1388 o var.c: ApplyModifier_To, update pp in each branch 1389 o remove redundant function prototypes 1390 o more unit tests 1391 13922020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1393 1394 * VERSION (_MAKE_VERSION): 20201001 1395 Merge with NetBSD make, pick up 1396 o compat.c: comment about "..." 1397 13982020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 1399 1400 * VERSION (_MAKE_VERSION): 20200930 1401 Merge with NetBSD make, pick up 1402 o job.c: split Job.jobPipe into 2 separate fields 1403 replace Lst_Open with direct iteration 1404 o lst.c: remove redundant assertions 1405 o targ.c: replace Lst_Open with direct iteration 1406 o var.c: fix bug in evaluation of indirect variable modifiers 1407 extract ApplyModifier_Quote into separate function 1408 o make debug logging simpler 1409 14102020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 1411 1412 * VERSION (_MAKE_VERSION): 20200927 1413 Merge with NetBSD make, pick up 1414 o parse.c: ensure parse errors result in 'stopped in' message. 1415 o compat.c: make parameter of Compat_RunCommand const 1416 o main.c: extract InitVarTarget from main 1417 o parse.c: rename ParseFinishLine to FinishDependencyGroup 1418 refactor ParseDoDependency 1419 o var.c: Var_Subst no longer returns string result 1420 rename Var_ParsePP back to Var_Parse 1421 in lint mode, improve error handling for undefined variables 1422 extract ParseVarname from Var_Parse 1423 o rename Lst_ForEach to Lst_ForEachUntil 1424 o inline Lst_ForEachUntil in several cases 1425 o clean up API for finding and creating GNodes 1426 o fix assertion failure in -j mode with .END node 1427 o inline and remove LstNode_Prev and LstNode_Next 1428 o use fine-grained type names for lists and their nodes 1429 o more unit tests 1430 14312020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1432 1433 * VERSION (_MAKE_VERSION): 20200911 1434 Merge with NetBSD make, pick up 1435 o cond.c: split EvalComparison into smaller functions 1436 reorder parameters of condition parsing functions 1437 reduce code size in CondParser_Eval 1438 rename CondGetString to CondParser_String 1439 add CondLexer_SkipWhitespace 1440 group the condition parsing state into a struct 1441 in CondGetString, replace repeated Buf_Add with Buf_AddStr 1442 o migrate Var_Parse to Var_ParsePP 1443 o add wrappers around ctype.h functions 1444 o lst.c: use a stack instead of a list for the nested include path 1445 o more unit tests 1446 14472020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 1448 1449 * make-bootstrap.sh.in: adjust object list 1450 14512020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1452 1453 * VERSION (_MAKE_VERSION): 20200902 1454 Merge with NetBSD make, pick up 1455 o use make_stat to ensure no confusion over valid fields 1456 returned by cached_stat 1457 o var.c: make VarQuote const-correct 1458 o add unit tests for .for 1459 14602020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1461 1462 * VERSION (_MAKE_VERSION): 20200901 1463 Merge with NetBSD make, pick up 1464 o rename Hash_Table fields 1465 o make data types in Dir_HasWildcards more precise 1466 14672020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 1468 1469 * VERSION (_MAKE_VERSION): 20200831 1470 Merge with NetBSD make, pick up 1471 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 1472 o lst.c: Lst_Open renable assert that list isn't open 1473 o unit test for .TARGET dependent flags 1474 o var.c: fix aliasing bug in VarUniq 1475 o more unit tests for :u 1476 14772020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 1478 1479 * VERSION (_MAKE_VERSION): 20200830 1480 Merge with NetBSD make, pick up 1481 o allow for strict type checking for Boolean 1482 o Var_Parse never returns NULL 1483 o Var_Subst never returns NULL 1484 o Lst_Find now takes boolean match function 1485 o rename Lst_Memeber to Lst_FindDatum 1486 o rename LstNode functions to match their type 1487 o rename GNode.iParents to implicitParents 1488 o fix assertion failure for .SUFFIXES in archives 1489 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 1490 remove unreachable code from CompatRunCommand 1491 o main.c: simplify getBoolean 1492 o stc.c: replace brk_string with simpler Str_Words 1493 o suff.c: add debug macros 1494 14952020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 1496 1497 * VERSION (_MAKE_VERSION): 20200828 1498 Merge with NetBSD make, pick up 1499 o lst.c: inline LstIsValid and LstNodeIsValid 1500 o remove trailing S from Lst function names after migration complete 1501 o more comment cleanup/clarification 1502 o suff.c: clean up suffix handling 1503 o more unit tests 1504 15052020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 1506 1507 * VERSION (_MAKE_VERSION): 20200826 1508 Merge with NetBSD make, pick up 1509 o enum.c: distinguish between bitsets containing flags and 1510 ordinary enums 1511 o var.c: fix error message for ::!= modifier with shell error 1512 o fix bugs in -DCLEANUP mode 1513 15142020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1515 1516 * VERSION (_MAKE_VERSION): 20200824 1517 Merge with NetBSD make, pick up 1518 o in debug mode, print GNode details in symbols 1519 15202020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 1521 1522 * VERSION (_MAKE_VERSION): 20200823 1523 Merge with NetBSD make, pick up 1524 o lst.c: more asserts, 1525 make args to Lst_Find match others. 1526 o var.c: pass flags to VarAdd 1527 o arch.c: use Buffer 1528 o str.c: brk_string return size_t for nwords 1529 o more unit tests 1530 15312020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 1532 1533 * VERSION (_MAKE_VERSION): 1534 Merge with NetBSD make, pick up 1535 o var.c: support for read-only variables eg .SHELL 1536 being the shell used to run scripts. 1537 o lst.c: more simplification 1538 o more documentation and style cleanup 1539 o more unit tests 1540 o ensure unit-test/Makefile is run by TEST_MAKE 1541 o reduce duplication of header inclusion 1542 15432020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 1544 1545 * VERSION (_MAKE_VERSION): 20200821 1546 Merge with NetBSD make, pick up 1547 o lst.c: revert invalid assertion - but document it 1548 o dir.c: split Dir_Init into two functions 1549 15502020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 1551 1552 * lst.c: needs inttypes.h on Linux 1553 1554 * VERSION (_MAKE_VERSION): 20200820 1555 Merge with NetBSD make, pick up 1556 o make.1: clarify some passages 1557 o var.c: more cleanup, clarify comments 1558 o make_malloc.c: remove unreachable code 1559 o cond.c: make CondGetString easier to debug 1560 o simplify list usage 1561 o unit-tests: more 1562 15632020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 1564 1565 * VERSION (_MAKE_VERSION): 20200816 1566 Merge with NetBSD make, pick up 1567 o refactor unit-tests to be more fine grained 1568 not all tests moved yet 1569 15702020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 1571 1572 * VERSION (_MAKE_VERSION): 20200814 1573 Merge with NetBSD make, pick up 1574 o more str_concat variants 1575 o more enums for flags 1576 o var.c: cleanup for higher warnings level 1577 15782020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 1579 1580 * VERSION (_MAKE_VERSION): 20200810 1581 Merge with NetBSD make, pick up 1582 o more unit tests 1583 o general comment and style cleanup 1584 15852020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1586 1587 * VERSION (_MAKE_VERSION): 20200808 1588 Merge with NetBSD make, pick up 1589 o enum.[ch]: streamline, enums for use in flags and debug output 1590 o cond.c: cleanup 1591 o var.c: reduce duplicate code for modifiers 1592 debug logging for Var_Parse 1593 more detailed debug output 1594 o more unit tests 1595 15962020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 1597 1598 * unit-tests/Makefile: -r for recursive and include Makefile.inc 1599 so I can run tests in meta mode 1600 supress extra noise if in meta mode 1601 1602 * VERSION (_MAKE_VERSION): 20200806 1603 Merge with NetBSD make, pick up 1604 o parse.c: remove VARE_WANTRES for LINT 1605 we just want to check parsing (for now). 1606 16072020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 1608 1609 * VERSION (_MAKE_VERSION): 20200805 1610 Merge with NetBSD make, pick up 1611 o make.1: Rework the description of dependence operators 1612 16132020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1614 1615 * VERSION (_MAKE_VERSION): 20200803 1616 Merge with NetBSD make, pick up 1617 o revert some C99 usage, for max portability 1618 o unit-tests/lint 1619 16202020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 1621 1622 * VERSION (_MAKE_VERSION): 20200802 1623 Merge with NetBSD make, pick up 1624 o more unit tests 1625 16262020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 1627 1628 * Remove NetBSD specific plumbing from unit-tests/Makefile 1629 1630 * VERSION (_MAKE_VERSION): 20200801 1631 Merge with NetBSD make, pick up 1632 o make Var_Value return const 1633 o size_t for buf sizes 1634 o optimize some buffer operations - avoid strlen 1635 16362020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1637 1638 * VERSION (_MAKE_VERSION): 20200731 1639 Merge with NetBSD make, pick up 1640 o var.c: fix undefinded behavior for incomplete :t modifier 1641 fixes unit-test/moderrs on Ubuntu 1642 o parse.c: When parsing variable assignments other than := 1643 if DEBUG(LINT) test substition of value, so we get a file and 1644 line number in the resulting error. 1645 o dir.c: fix parsing of nested braces in dependency lines 1646 add unit-tests 1647 16482020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1649 1650 * VERSION (_MAKE_VERSION): 20200730 1651 Merge with NetBSD make, pick up 1652 o var.c: minor cleanup 1653 o unit-tests: more tests to improve code coverage 1654 16552020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 1656 1657 * VERSION (_MAKE_VERSION): 20200728 1658 Merge with NetBSD make, pick up 1659 o var.c: more optimizations 1660 16612020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1662 1663 * VERSION (_MAKE_VERSION): 20200726 1664 Merge with NetBSD make, pick up 1665 o collapse lsd.lib into lst.c - reduce code size and allow inlining 1666 o lots of function comment updates 1667 o var.c: more optimizations 1668 o make return of Var_Parse const 1669 16702020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 1671 1672 * VERSION (_MAKE_VERSION): 20200720 1673 Merge with NetBSD make, pick up 1674 o DEBUG_HASH report stats at end and tone down the noise 1675 o var.c: each flag type gets its own prefix. 1676 move SysV string matching to var.c 1677 make ampersand in ${VAR:from=to&} an ordinary character 1678 cleanup and simplify implementation of modifiers 1679 o make.1: move documentation for assignment modifiers 1680 16812020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 1682 1683 * VERSION (_MAKE_VERSION): 20200718 1684 Merge with NetBSD make, pick up 1685 o DEBUG_HASH to see how well the hash tables are working 1686 16872020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 1688 1689 * bsd.after-import.mk: make sure we update unit-tests/Makefile 1690 16912020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 1692 1693 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 1694 1695 * VERSION (_MAKE_VERSION): 20200710 1696 Merge with NetBSD make, pick up 1697 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 1698 o meta.c: target flagged .META is out-of-date if meta file missing 1699 17002020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 1701 1702 * VERSION (_MAKE_VERSION): 20200709 1703 Merge with NetBSD make, pick up 1704 o cond.c: fix for compare_expression when doEval=0 1705 o unit-tests/Makefile: rework 1706 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 1707 17082020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1709 1710 * VERSION (_MAKE_VERSION): 20200704 1711 Merge with NetBSD make, pick up 1712 (most of this by rillig@) 1713 o lots of style and white-space cleanup 1714 o lots more unit tests for variable modifiers 1715 o simplified description of some functions 1716 o str.c: refactor Str_Match 1717 o var.c: debugging output for :@ 1718 constify VarModify parameter 1719 fix :hash modifier on 16-bit platforms 1720 remove unnecessary forward declarations 1721 refactor ApplyModifier_SysV to have less indentation 1722 simplify code for :E and :R 1723 clean up code for :H and :T 1724 refactor ApplyModifiers 1725 1726 * var.c: we need stdint.h on some platforms to get uint32_t 1727 * unit-test/Makefile: we need to supress the specific error 1728 for RE substitution error in modmisc, since it varies accross 1729 different OS. 1730 17312020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 1732 1733 * VERSION (_MAKE_VERSION): 20200702 1734 Merge with NetBSD make, pick up 1735 o var.c: more improvements to avoiding unnecessary evaluation 1736 use enums for flags 1737 o remove flags arg to Var_Set which outside of var.c is always 0 1738 17392020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1740 1741 * VERSION (_MAKE_VERSION): 20200701 1742 Merge with NetBSD make, pick up 1743 o var.c: with change to cond.c; ensure that nested variables 1744 within a variable name are expanded. 1745 o unit-tests/varmisc.mk: test for nested varname 1746 17472020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 1748 1749 * VERSION (_MAKE_VERSION): 20200629 1750 Merge with NetBSD make, pick up 1751 o cond.c: do not eval unnecessary terms of conditionals. 1752 17532020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 1754 1755 * VERSION (_MAKE_VERSION): 20200625 1756 Merge with NetBSD make, pick up 1757 o meta.c: report error if lseek in filemon_read fails 1758 17592020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 1760 1761 * VERSION (_MAKE_VERSION): 20200622 1762 Merge with NetBSD make, pick up 1763 o dieQuietly: ignore OP_SUBMAKE as too aggressive 1764 17652020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 1766 1767 * VERSION (_MAKE_VERSION): 20200619 1768 Merge with NetBSD make, pick up 1769 o str.c: performance improvement for Str_Match for multiple '*' 1770 o dieQuietly: supress the failure output from make 1771 when failing node is a sub-make or a sibling failed. 1772 This cuts down greatly on unhelpful noise at the end of 1773 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 1774 17752020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 1776 1777 * FILES: add LICENSE to appease some packagers. 1778 This is an attempt to fairly represent the license on almost 1779 200 files, which are almost all BSD-3-Clause 1780 The few exceptions being more liberal. 1781 1782 * VERSION (_MAKE_VERSION): 20200610 1783 Merge with NetBSD make, pick up 1784 o unit test for :Or 1785 17862020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 1787 1788 * VERSION (_MAKE_VERSION): 20200606 1789 Merge with NetBSD make, pick up 1790 o make.1: cleanup 1791 1792 * Makefile: fix depends for main.o which broke MAKE_VERSION 1793 17942020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 1795 1796 * VERSION (_MAKE_VERSION): 20200605 1797 Merge with NetBSD make, pick up 1798 o dir.c: cached_stats - don't confuse stat and lstat results. 1799 o var.c: add :Or for reverse sort. 1800 18012020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 1802 1803 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 1804 also if --with-filemon= specifies path to filemon.h 1805 set use_filemon=dev 1806 * dirname.c: remove include of namespace.h 1807 18082020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 1809 1810 * VERSION (_MAKE_VERSION): 20200517 1811 Merge with NetBSD make, pick up 1812 o modified dollar tests to avoid shell dependencies 1813 o new tests for .INCLUDEFROM 1814 18152020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 1816 1817 * unit-tests/dollar.mk: tweak '1 dollar literal' test 1818 to not depend so much on shell behavior 1819 18202020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 1821 1822 * VERSION (_MAKE_VERSION): 20200510 1823 Merge with NetBSD make, pick up 1824 o unit test for dollar handling 1825 18262020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 1827 1828 * VERSION (_MAKE_VERSION): 20200506 1829 Merge with NetBSD make, pick up 1830 o str.c: empty string does not match % pattern 1831 plus unit-test changes 1832 18332020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 1834 1835 * VERSION (_MAKE_VERSION): 20200504 1836 May the 4th be with you 1837 Merge with NetBSD make, pick up 1838 o var.c: import handling of old sysV style modifier using '%' 1839 o str.c: refactor brk_string 1840 o unit-tests: add test case for lazy conditions 1841 18422020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1843 1844 * VERSION (_MAKE_VERSION): 20200418 1845 1846 * configure.in: use_makefile=no for cygwin et al. 1847 case insensitive filesystems just don't work if both 1848 makefile and Makefile exist. 1849 NOTE: bmake does not support cygwin and likely never will, 1850 but if brave souls want to try it - help them out. 1851 18522020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 1853 1854 * VERSION (_MAKE_VERSION): 20200402 1855 Merge with NetBSD make, pick up 1856 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 1857 a blank command is perfectly valid. 1858 18592020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1860 1861 * VERSION (_MAKE_VERSION): 20200330 1862 Merge with NetBSD make, pick up 1863 o make.h: extern debug_file 1864 18652020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 1866 1867 * VERSION (_MAKE_VERSION): 20200318 1868 Merge with NetBSD make, pick up 1869 o meta.c: meta_oodate, check for corrupted meta file 1870 earlier and more often. 1871 18722020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 1873 1874 * VERSION (_MAKE_VERSION): 20200220 1875 18762020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 1877 1878 * boot-strap: unset MAKEFLAGS 1879 18802020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 1881 1882 * VERSION (_MAKE_VERSION): 20200212 1883 * meta.c: meta_compat_parent check for USE_FILEMON 1884 patch from Soeren Tempel 1885 18862020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1887 1888 * VERSION: 20200205 1889 Merge with NetBSD make, pick up 1890 o meta.c: fix compat mode, need to call meta_job_output() 1891 o job.c: extra fds for meta mode not needed if using filemon_dev 1892 18932020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 1894 1895 * VERSION: 20200122 1896 Merge with NetBSD make, pick up 1897 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 1898 returns FALSE. 1899 19002020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 1901 1902 * VERSION: 20200121 1903 Merge with NetBSD make, pick up 1904 o filemon/filemon_{dev,ktrace}.c: allow selection of 1905 filemon implementation. filemon_dev.c uses the kernel module 1906 while filemon_ktrace.c leverages the fktrace api available in 1907 NetBSD. filemon_ktrace.c can hopefully form the basis for 1908 adding support for other tracing mechanisms such as strace on 1909 Linux. 1910 o meta.c: when target is out-of-date per normal make rules 1911 record value of .OODATE in meta file. 1912 19132019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 1914 1915 * VERSION: 20190926 1916 Merge with NetBSD make, pick up 1917 o parse.c: don't pass NULL to realpath(3) 1918 some versions cannot handle it. 1919 19202019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 1921 1922 * VERSION: 20190409 1923 Merge with NetBSD make, pick up 1924 o parse.c: ParseDoDependency: free paths rather than assert 1925 19262018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1927 1928 * VERSION: 20181222 1929 1930 * configure.in: add --without-makefile to avoid generating 1931 makefile and make-bootstrap.sh 1932 1933 * include Makefile.inc if it exists 1934 1935 * Use Makefile and Makefile.config.in in unit-tests 1936 so we can use just: make obj && make && make test 1937 when bmake is already available. 1938 We add --without-makefile to CONFIGURE_ARGS in this case. 1939 1940 * tweak bsd.after-import.mk (captures Makefile.config etc 1941 after import to FreeBSD for example) to cope with all the above. 1942 19432018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1944 1945 * VERSION: 20181221 1946 Merge with NetBSD make, pick up 1947 o parse.c: ParseVErrorInternal use .PARSEDIR 1948 and apply if relative, and then use .PARSEFILE 1949 for consistent result. 1950 19512018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1952 1953 * VERSION: 20181220 1954 Merge with NetBSD make, pick up 1955 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 1956 is relative 1957 o var.c: avoid SEGFAULT in .unexport-env 1958 when MAKELEVEL is not set 1959 19602018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 1961 1962 * VERSION: 20181216 1963 Merge with NetBSD make, pick up 1964 o fix for unit-tests/varquote.mk on Debian 1965 19662018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 1967 1968 * VERSION: 20180919 1969 Merge with NetBSD make, pick up 1970 o var.c: add :q 1971 o dir.c: cleanup caching of stats 1972 19732018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 1974 1975 * Makefile.config.in: use += where it makes sense. 1976 19772018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 1978 1979 * VERSION: 20180512 1980 Merge with NetBSD make, pick up 1981 o job.c: skip polling job token pipe 1982 19832018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 1984 1985 * VERSION: 20180405 1986 Merge with NetBSD make, pick up 1987 o parse.c: be more cautious about detecting depenency line 1988 rather than sysV style include. 1989 19902018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 1991 1992 * VERSION: 20180222 1993 Merge with NetBSD make, pick up 1994 o parse.c: avoid calling sysconf for every call to loadfile 1995 19962018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 1997 1998 * VERSION: 20180218 1999 Merge with NetBSD make, pick up 2000 o var.c: Var_Set handle NULL value anytime. 2001 20022018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2003 2004 * VERSION: 20180212 2005 Merge with NetBSD make, pick up 2006 o parse.c: do not treat .info as warning with -W 2007 20082017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2009 2010 * VERSION: 20171207 2011 Merge with NetBSD make, pick up 2012 o var.c: Var_Append use Var_Set if var not previously set 2013 so that VAR_CMD is handled correctly. 2014 Add a suitable unit-test. 2015 20162017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2017 2018 * VERSION (_MAKE_VERSION): 20171126 2019 2020 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2021 since AC_TRY_COMPILE puts input inside main() 2022 which upsets modern compilers. 2023 20242017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2025 2026 * VERSION: 20171118 2027 Merge with NetBSD make, pick up 2028 o var.c: do not append to variable set on command line 2029 add unit-test to catch this. 2030 20312017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2032 2033 * VERSION: 20171028 2034 Merge with NetBSD make, pick up 2035 o main.c: ignore empty MAKEOBJDIR 2036 2037 * Makefile.config.in: 2038 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2039 20402017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2041 2042 * VERSION: 20171005 2043 2044 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2045 consistent result on some platforms. 2046 20472017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2048 2049 * machine.sh: entry for AIX 2050 20512017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2052 2053 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2054 to a file that can be included by configure as well as make. 2055 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2056 20572017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2058 2059 * Makefile (_MAKE_VERSION): 20170810 2060 Merge with NetBSD make, pick up 2061 o meta.c: if target is in subdir we only need subdir name in 2062 meta_name. 2063 20642017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2065 2066 * Makefile (_MAKE_VERSION): 20170720 2067 Merge with NetBSD make, pick up 2068 o compat.c: pass SIGINT etc onto child and wait for it to exit 2069 before we self-terminate. 2070 20712017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2072 2073 * Makefile (_MAKE_VERSION): 20170711 2074 forgot to update after merge on 20170708 ;-) 2075 o main.c: refactor to reduce size of main function. 2076 add -v option to always fully expand values. 2077 o meta.c: ensure command output in meta file has ending newline 2078 even when filemon not being used. 2079 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2080 pathname via ':L' since any ':' in pathname breaks that. 2081 Instead set a '${.p.}' to pathname in the target context and 2082 use that. 2083 20842017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2085 2086 * Makefile (_MAKE_VERSION): 20170510 2087 Merge with NetBSD make, pick up 2088 o main.c: Main_SetObjdir: ensure buf2 is in scope 2089 20902017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2091 2092 * Makefile (_MAKE_VERSION): 20170505 2093 see mk/ChangeLog 2094 20952017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2096 2097 * parse.c: not everyone has stdint.h 2098 20992017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2100 2101 * Makefile (_MAKE_VERSION): 20170501 2102 see mk/ChangeLog 2103 21042017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2105 2106 * Makefile (_MAKE_VERSION): 20170421 2107 Merge with NetBSD make, pick up 2108 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2109 21102017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2111 2112 * Makefile (_MAKE_VERSION): 20170420 2113 Merge with NetBSD make, pick up 2114 o main.c: only use -C arg "as is" if it contains no 2115 relative component. 2116 21172017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2118 2119 * Makefile (_MAKE_VERSION): 20170418 2120 Merge with NetBSD make, pick up 2121 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2122 21232017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2124 2125 * Makefile (_MAKE_VERSION): 20170417 2126 Merge with NetBSD make, pick up 2127 o fixes a number of coverity complaints 2128 - check return value of fseek, fcntl 2129 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2130 JobPrintCommand, ParseTraditionalInclude 2131 - use bmake_malloc() where NULL is not tollerated 2132 - use MAKE_ATTR_UNUSED rather that kludges like 2133 return(unused ? 0 : 0) 2134 - use purge_cached_realpaths() rather than abuse cached_realpath() 2135 21362017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2137 2138 * Makefile (_MAKE_VERSION): 20170413 2139 Merge with NetBSD make, pick up 2140 o main.c: when setting .OBJDIR ignore '$' in paths. 2141 2142 * job.c: use MALLOC_OPTIONS to set malloc_options. 2143 21442017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2145 2146 * Makefile (_MAKE_VERSION): 20170411 2147 Merge with NetBSD make, pick up 2148 o str.c: Str_Match: allow [^a-z] to behave as expected. 2149 21502017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2151 2152 * Makefile (_MAKE_VERSION): 20170326 2153 Merge with NetBSD make, pick up 2154 o main.c: purge relative paths from realpath cache when .OBJDIR 2155 is changed. 2156 21572017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2158 2159 * Makefile (_MAKE_VERSION): 20170311 2160 Merge with NetBSD make, pick up 2161 o main.c: only use -C arg "as is" if it starts with '/'. 2162 21632017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2164 2165 * Makefile (_MAKE_VERSION): 20170301 2166 Merge with NetBSD make, pick up 2167 o main.c: use -C arg "as is" rather than getcwd() 2168 if they identify the same directory. 2169 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2170 21712017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2172 2173 * Makefile (_MAKE_VERSION): 20170201 2174 Merge with NetBSD make, pick up 2175 o var.c: allow :_=var and avoid use of special context. 2176 21772017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2178 2179 * Makefile (_MAKE_VERSION): 20170130 2180 Merge with NetBSD make, pick up 2181 o var.c: add :range and :_ 2182 o main.c: partially initialize Dir_* before MainParseArgs() 2183 can be called. 2184 If -V, skip Main_ExportMAKEFLAGS() 2185 21862017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2187 2188 * Makefile (_MAKE_VERSION): 20170114 2189 Merge with NetBSD make, pick up 2190 o var.c: allow specifying the utc value used by :{gm,local}time 2191 21922016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2193 2194 * Makefile (_MAKE_VERSION): 20161212 2195 Merge with NetBSD make, pick up 2196 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2197 21982016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2199 2200 * Makefile (_MAKE_VERSION): 20161209 2201 Merge with NetBSD make, pick up 2202 o main.c: cleanup setting of .OBJDIR 2203 o parse.c: avoid coredump from (var)=val 2204 22052016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2206 2207 * Makefile (_MAKE_VERSION): 20161126 2208 Merge with NetBSD make, pick up 2209 o make.c: Make_OODate: report src node name if path not set 2210 22112016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2212 2213 * Makefile (_MAKE_VERSION): 20160926 2214 Merge with NetBSD make, pick up 2215 o support for .DELETE_ON_ERROR: (remove targets that fail) 2216 22172016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2218 2219 * Makefile MAN: tweak .Dt to match ${PROG} 2220 22212016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2222 2223 * Makefile (_MAKE_VERSION): 20160818 2224 its a neater number; pick up whitespace fixes to man page. 2225 22262016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2227 2228 * Makefile (_MAKE_VERSION): 20160817 2229 Merge with NetBSD make, pick up 2230 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2231 so we can call it before adding entries to missingFiles. 2232 Thus we do not track files we have been told to ignore. 2233 22342016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2235 2236 * Makefile (_MAKE_VERSION): 20160815 2237 Merge with NetBSD make, pick up 2238 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 2239 pathnames, and skip if the expansion is empty. 2240 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 2241 22422016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2243 2244 * Makefile (_MAKE_VERSION): 20160812 2245 Merge with NetBSD make, pick up 2246 o meta.c: remove all missingFiles entries that match a deleted 2247 dir. 2248 o main.c: set .ERROR_CMD if possible. 2249 22502016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2251 2252 * Makefile (_MAKE_VERSION): 20160606 2253 Merge with NetBSD make, pick up 2254 o dir.c: extend mtimes cache to others via cached_stat() 2255 22562016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2257 2258 * Makefile (_MAKE_VERSION): 20160604 2259 Merge with NetBSD make, pick up 2260 o meta.c: missing filemon data is only relevant if we read a 2261 meta file. 2262 Also do not return oodate for a missing metafile if gn->path 2263 points to .CURDIR 2264 22652016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2266 2267 * Makefile (_MAKE_VERSION): 20160602 2268 Merge with NetBSD make, pick up 2269 o cached_realpath(): avoid hitting filesystem more than necessary. 2270 o meta.c: refactor need_meta decision, add knobs for 2271 missing meta file and filemon data wrt out-of-datedness. 2272 22732016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2274 2275 * Makefile (_MAKE_VERSION): 20160528 2276 2277 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 2278 22792016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2280 2281 * Makefile (_MAKE_VERSION): 20160512 2282 Merge with NetBSD make, pick up 2283 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 2284 this is useful for gcov builds. 2285 o propagate errors from filemon(4). 2286 22872016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 2288 2289 * Makefile (_MAKE_VERSION): 20160509 2290 Merge with NetBSD make, pick up 2291 o remove use of non-standard types u_int etc. 2292 o meta.c: apply realpath() before matching against metaIgnorePaths 2293 22942016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 2295 2296 * Makefile (_MAKE_VERSION): 20160404 2297 Merge with NetBSD make, pick up 2298 o allow makefile to set .MAKE.JOBS 2299 2300 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 2301 23022016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 2303 2304 * Makefile (_MAKE_VERSION): 20160315 2305 Merge with NetBSD make, pick up 2306 o fix handling of archive members 2307 23082016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2309 2310 * Makefile (_MAKE_VERSION): rename variable to avoid interference 2311 with checks for ${MAKE_VERSION} 2312 23132016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 2314 2315 * Makefile (MAKE_VERSION): 20160310 2316 Merge with NetBSD make, pick up 2317 o meta.c: treat missing Read file same as Write, incase we Delete it. 2318 23192016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 2320 2321 * Makefile (MAKE_VERSION): 20160307 2322 Merge with NetBSD make, pick up 2323 o var.c: fix :ts\nnn to be octal by default. 2324 o meta.c: meta_finish() to cleanup memory. 2325 23262016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 2327 2328 * Makefile (MAKE_VERSION): 20160226 2329 Merge with NetBSD make, pick up 2330 o meta.c: allow meta file for makeDepend if makefiles want it. 2331 23322016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 2333 2334 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 2335 for backwards compatability. 2336 2337 * Makefile (MAKE_VERSION): 20160220 2338 Merge with NetBSD make, pick up 2339 o var.c: add knob to control handling of '$$' in := 2340 23412016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2342 2343 * Makefile (MAKE_VERSION): 20160218 2344 Merge with NetBSD make, pick up 2345 o var.c: add .export-literal allows us to fix sys.clean-env.mk 2346 post the changes to Var_Subst. 2347 Var_Subst now takes flags, and does not consume '$$' in := 2348 23492016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 2350 2351 * Makefile (MAKE_VERSION): 20160217 2352 Merge with NetBSD make, pick up 2353 o var.c: preserve '$$' in := 2354 o parse.c: add .dinclude for handling included 2355 makefile like .depend 2356 23572015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 2358 2359 * Makefile (MAKE_VERSION): 20151220 2360 Merge with NetBSD make, pick up 2361 o suff.c: re-initialize suffNull when clearing suffixes. 2362 23632015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 2364 2365 * Makefile (MAKE_VERSION): 20151201 2366 Merge with NetBSD make, pick up 2367 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 2368 o meta.c: meta_oodate: use lstat(2) for checking link target 2369 in case it is a symlink. 2370 o var.c: avoid calling brk_string and Var_Export1 with empty 2371 strings. 2372 23732015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2374 2375 * Makefile (MAKE_VERSION): 20151126 2376 Merge with NetBSD make, pick up 2377 o parse.c: ParseTrackInput don't access beyond 2378 end of old value. 2379 23802015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 2381 2382 * Makefile (MAKE_VERSION): 20151022 2383 2384 * Add support for BSD/OS which lacks inttypes.h 2385 and really needs sys/param.h for sys/sysctl.h 2386 also 'type' is not a shell builtin. 2387 2388 * var.c: eliminate uint32_t and need for inttypes.h 2389 2390 * main.c: PrintOnError flush stdout before run .ERROR 2391 2392 * parse.c: cope with _SC_PAGESIZE not being defined. 2393 2394 23952015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 2396 2397 * Makefile (MAKE_VERSION): 20151020 2398 Merge with NetBSD make, pick up 2399 o var.c: fix uninitialized var 2400 24012015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 2402 2403 * var.c: the conditional expressions used with ':?' can be 2404 expensive, if already discarding do not evaluate or expand 2405 anything. 2406 24072015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2408 2409 * Makefile (MAKE_VERSION): 20151010 2410 Merge with NetBSD make, pick up 2411 o Add Boolean wantit flag to Var_Subst and Var_Parse 2412 when FALSE we know we are discarding the result and can 2413 skip operations like Cmd_Exec. 2414 24152015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2416 2417 * Makefile (MAKE_VERSION): 20151009 2418 Merge with NetBSD make, pick up 2419 o var.c: don't check for NULL before free() 2420 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 2421 24222015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2423 2424 * Makefile (MAKE_VERSION): 20150910 2425 Merge with NetBSD make, pick up 2426 o main.c: with -w print Enter/Leaving messages for objdir too 2427 if necessary. 2428 o centralize shell metachar handling 2429 2430 * FILES: add metachar.[ch] 2431 24322015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2433 2434 * Makefile (MAKE_VERSION): 20150606 2435 Merge with NetBSD make, pick up 2436 o make.1: document .OBJDIR target 2437 24382015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2439 2440 * Makefile (MAKE_VERSION): 20150505 2441 Merge with NetBSD make, pick up 2442 o cond.c: be strict about lhs of comparison when evaluating .if 2443 but less so when called from variable expansion. 2444 o unit-tests/cond2.mk: test various error conditions 2445 24462015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 2447 2448 * machine.sh (MACHINE): Add Bitrig 2449 patch from joerg@netbsd.org 2450 24512015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2452 2453 * Makefile (MAKE_VERSION): 20150418 2454 Merge with NetBSD make, pick up 2455 o job.c: use memmove() rather than memcpy() 2456 2457 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 2458 case, so skip it. 2459 24602015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2461 2462 * Makefile (MAKE_VERSION): 20150411 2463 bump version - only mk/ changes. 2464 24652015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2466 2467 * Makefile (MAKE_VERSION): 20150410 2468 Merge with NetBSD make, pick up 2469 o document different handling of '-' in jobs mode vs compat 2470 o fix jobs mode so that '-' only applies to whole job 2471 when shell lacks hasErrCtl 2472 o meta.c: use separate vars to track lcwd and latestdir (read) 2473 per process 2474 24752015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 2476 2477 * Makefile (MAKE_VERSION): 20150401 2478 Merge with NetBSD make, pick up 2479 o meta.c: close meta file in child 2480 2481 * Makefile: use BINDIR.bmake if set. 2482 Same for MANDIR and SHAREDIR 2483 Handy for testing release candidates 2484 in various environments. 2485 24862015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2487 2488 * move initialization of savederr to block where it is used 2489 to avoid spurious warning from gcc5 2490 24912014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2492 2493 * Makefile (MAKE_VERSION): 20141111 2494 just a cooler number 2495 24962014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 2497 2498 * Makefile (MAKE_VERSION): 20141105 2499 Merge with NetBSD make, pick up 2500 o revert major overhaul of suffix handling 2501 and POSIX compliance - too much breakage 2502 and impossible to make backwards compatible. 2503 o we still have the new unit test structure which is ok. 2504 o meta.c ensure "-- filemon" is at start of line. 2505 25062014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 2507 2508 * configure.in: test that result of getconf PATH_MAX is numeric 2509 and discard if not. Apparently needed for Hurd. 2510 25112014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2512 2513 * Makefile (MAKE_VERSION): 20140830 2514 Merge with NetBSD make, pick up 2515 o major overhaul of suffix handling 2516 o improved POSIX compliance 2517 o overhauled unit-tests 2518 25192014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2520 2521 * Makefile (MAKE_VERSION): 20140620 2522 Merge with NetBSD make, pick up 2523 o var.c return varNoError rather than var_Error for ::= modifiers. 2524 25252014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 2526 2527 * Makefile (MAKE_VERSION): 20140522 2528 Merge with NetBSD make, pick up 2529 o var.c detect some parse errors. 2530 25312014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2532 2533 * Fix spelling errors - patch from Pedro Giffuni 2534 25352014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 2536 2537 * Makefile (MAKE_VERSION): 20140214 2538 Merge with NetBSD make, pick up 2539 o .INCLUDEFROM* 2540 o use Var_Value to get MAKEOBJDIR[PREFIX] 2541 o reduced realloc'ign in brk_string. 2542 * configure.in: add a check for compiler supporting __func__ 2543 25442014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2545 2546 * boot-strap: ignore mksrc=none 2547 25482014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 2549 2550 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 2551 25522014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2553 2554 * Makefile (MAKE_VERSION): 20140101 2555 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 2556 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 2557 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 2558 Hurd) 2559 * configure.in: Add AC_PREREQ and check for 2560 sysctl; patch from Andrew Shadura andrewsh at debian.org 2561 25622013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2563 2564 * Makefile (MAKE_VERSION): 20131010 2565 * lose the const from arg to systcl to avoid problems on older BSDs. 2566 25672013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2568 2569 * Makefile (MAKE_VERSION): 20131001 2570 Merge with NetBSD make, pick up 2571 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 2572 hw.machine_arch if necessary. 2573 o meta.c: meta_oodate - need to look at src of Link and target 2574 of Move as well. 2575 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 2576 provide __arraycount() if needed. 2577 25782013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 2579 2580 * Makefile (MAKE_VERSION): 20130904 2581 Merge with NetBSD make, pick up 2582 o Add VAR_INTERNAL context, so that internal setting of 2583 MAKEFILE does not override value set by makefiles. 2584 25852013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 2586 2587 * Makefile (MAKE_VERSION): 20130902 2588 Merge with NetBSD make, pick up 2589 o CompatRunCommand: only apply shellErrFlag when errCheck is true 2590 25912013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2592 2593 * Makefile (MAKE_VERSION): 20130828 2594 Merge with NetBSD make, pick up 2595 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 2596 o Call Job_SetPrefix() from Job_Init() so makefiles have 2597 opportunity to set .MAKE.JOB.PREFIX 2598 25992013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 2600 2601 * Makefile (MAKE_VERSION): 20130730 2602 Merge with NetBSD make, pick up 2603 o Allow suppression of --- job -- tokens by setting 2604 .MAKE.JOB.PREFIX empty. 2605 26062013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 2607 2608 * Makefile (MAKE_VERSION): 20130716 2609 Merge with NetBSD make, pick up 2610 o number of gmake compatibility tweaks 2611 -w for gmake style entering/leaving messages 2612 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 2613 handle MAKEFLAGS containing only letters. 2614 o when overriding a GLOBAL variable on the command line, 2615 delete it from GLOBAL context so -V doesn't show the wrong 2616 value. 2617 26182013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 2619 2620 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 2621 2622 * Makefile (MAKE_VERSION): 20130706 2623 Merge with NetBSD make, pick up 2624 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 2625 true so that CompatRunCommand() can use it, to ensure 2626 consistent behavior with jobs mode. 2627 o use MAKE_LEVEL_ENV to define the variable to propagate 2628 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 2629 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 2630 paths to ignore. 2631 26322013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2633 2634 * Makefile (MAKE_VERSION): 20130604 2635 Merge with NetBSD make, pick up 2636 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 2637 to avoid leaking descriptors. 2638 26392013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2640 2641 * Makefile (MAKE_VERSION): 20130528 2642 Merge with NetBSD make, pick up 2643 o var.c: cleanup some left-overs in VarHash() 2644 26452013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2646 2647 * Makefile (MAKE_VERSION): 20130520 2648 generate manifest from component FILES rather than have to 2649 update FILES when mk/FILES changes. 2650 26512013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2652 2653 * Makefile (MAKE_VERSION): 20130518 2654 Merge with NetBSD make, pick up 2655 o suff.c: don't skip all processsing for .PHONY targets 2656 else wildcard srcs do not get expanded. 2657 o var.c: expand name of variable to delete if necessary. 2658 26592013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2660 2661 * Makefile (MAKE_VERSION): 20130330 2662 Merge with NetBSD make, pick up 2663 o meta.c: refine the handling of .OODATE in commands. 2664 Rather than suppress command comparison for the entire script 2665 as though .NOMETA_CMP had been used, only suppress it for the 2666 one command line. 2667 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 2668 suppress comparison of a command without otherwise affecting it. 2669 o make.1: document that 2670 26712013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 2672 2673 * Makefile (MAKE_VERSION): 20130321 2674 yes, not quite right but its a cooler number. 2675 Merge with NetBSD make, pick up 2676 o parse.c: fix ParseGmakeExport to be portable 2677 and add a unit-test. 2678 * meta.c: call meta_init() before makefiles are read and if built 2679 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 2680 this let's makefiles test for support. 2681 Call meta_mode_init() to process .MAKE.MODE. 2682 26832013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2684 2685 * Makefile (MAKE_VERSION): 20130305 2686 Merge with NetBSD make, pick up 2687 o run .STALE: target when a dependency from .depend is missing. 2688 o job.c: add Job_RunTarget() for the above and .BEGIN 2689 26902013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 2691 2692 * Makefile (MAKE_VERSION): 20130303 2693 Merge with NetBSD make, pick up 2694 o main.c: set .MAKE.OS to utsname.sysname 2695 o job.c: more checks for read and poll errors 2696 o var.c: lose VarChangeCase() saves 4% time 2697 26982013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 2699 2700 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 2701 want to use MAKEOBJDIR 2702 27032013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 2704 2705 * Merge with NetBSD make, pick up 2706 o make.1: more info on how shell commands are handled. 2707 o job.c,main.c: detect write errors to job pipes. 2708 27092013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 2710 2711 * Makefile (MAKE_VERSION): 20130123 2712 Merge with NetBSD make, pick up 2713 o meta.c: if script uses .OODATE and meta_oodate() decides 2714 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 2715 o var.c: in debug output indicate which variabale modifiers 2716 apply to. 2717 o remove Check_Cwd logic the makefiles have been fixed. 2718 27192012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2720 2721 * makefile.in: add a simple makefile for folk who insist on 2722 ./configure; make; make install 2723 it just runs boot-strap 2724 * include mk/* to accommodate the above 2725 * boot-strap: re-work to accommodate the above 2726 mksrc defaults to $Mydir/mk 2727 allow op={configure,build,install,clean,all} 2728 add options to facilitate install 2729 * Makefile.config.in: just the bits set by configure 2730 * Makefile: bump version to 20121212 2731 abandon Makefile.in (NetBSD Makefile) 2732 leverage mk/* instead 2733 * configure.in: ensure srcdir is absolute 2734 27352012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2736 2737 * Makefile.in (MAKE_VERSION): 20121111 2738 fix generation of bmake.cat1 2739 27402012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 2741 2742 * Makefile.in (MAKE_VERSION): 20121109 2743 Merge with NetBSD make, pick up 2744 o make.c: MakeBuildChild: return 0 so search continues if a 2745 .ORDER dependency is detected. 2746 o unit-tests/order: test the above 2747 27482012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 2749 2750 * Makefile.in (MAKE_VERSION): 20121102 2751 Merge with NetBSD make, pick up 2752 o cond.c: allow cond_state[] to grow. 2753 In meta mode with a very large tree, we can hit the limit 2754 while processing dirdeps. 2755 27562012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 2757 2758 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 2759 27602012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2761 2762 * Makefile.in (MAKE_VERSION): 20121010 2763 o protect syntax that only bmake parses correctly. 2764 o remove auto setting of FORCE_MACHINE, use configure's 2765 --with-force-machine=whatever if that is desired. 2766 27672012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 2768 2769 * Makefile.in: do not lose history from make.1 when generating bmake.1 2770 27712012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 2772 2773 * Makefile.in (MAKE_VERSION): 20121007 2774 Merge with NetBSD make, pick up 2775 o compat.c: ignore empty commands - same as jobs mode. 2776 o make.1: document meta chars that cause use of shell 2777 27782012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 2779 2780 * Makefile.in (MAKE_VERSION): bump version to 20120911 2781 * bsd.after-import.mk: include Makefile.inc early and allow it to 2782 override PROG 2783 27842012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 2785 2786 * Makefile.in (MAKE_VERSION): bump version to 20120831 2787 Merge with NetBSD make, pick up 2788 o cast sizeof() to int for comparison 2789 o minor make.1 tweak 2790 27912012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2792 2793 * Makefile.in (MAKE_VERSION): bump version to 20120830 2794 Merge with NetBSD make, pick up 2795 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 2796 o debug flag -dV causes -V to show raw value regardless. 2797 27982012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 2799 2800 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 2801 gets SRCTOP set. 2802 28032012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 2804 2805 * Makefile.in (MAKE_VERSION): bump version to 20120704 2806 Merge with NetBSD make, pick up 2807 o Job_ParseShell should call Shell_Init if it has been 2808 previously called. 2809 * Makefile.in: set USE_META based on configure result. 2810 also .PARSEDIR is safer indicator of bmake. 2811 28122012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 2813 2814 * Makefile.in: bump version to 20120626 2815 ensure CPPFLAGS is in CFLAGS 2816 * meta.c: avoid nested externs 2817 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 2818 28192012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2820 2821 * Makefile.in (MAKE_VERSION): bump version to 20120620 2822 Merge with NetBSD make, pick up 2823 o make_malloc.c: avoid including make_malloc.h again 2824 2825 * Makefile.in: avoid bmake only syntax or protect with 2826 .if defined(.MAKE.LEVEL) 2827 * bsd.after-import.mk: replace .-include with .sinclude 2828 ensure? SRCTOP gets a value 2829 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 2830 28312012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 2832 2833 * Makefile.in (MAKE_VERSION): bump version to 20120612 2834 Merge with NetBSD make, pick up 2835 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 2836 for greater portability. 2837 o unit-tests/forloop: check that .for works as expected wrt 2838 number of times and with "quoted strings". 2839 28402012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2841 2842 * Makefile.in (MAKE_VERSION): bump version to 20120606 2843 Merge with NetBSD make, pick up 2844 o compat.c: use kill(2) rather than raise(3). 2845 * configure.in: look for sys/dev/filemon 2846 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 2847 and pass BOOTSTRAP_XTRAS to boot-strap. 2848 28492012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2850 2851 * Makefile.in (MAKE_VERSION): bump version to 20120604 2852 Merge with NetBSD make, pick up 2853 o util.c and var.c share same var for tracking if environ 2854 has been reallocated. 2855 o util.c provide getenv with setenv. 2856 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 2857 when the shell actively strips .MAKE.* from the environment. 2858 We still refer to the variable always as .MAKE.LEVEL 2859 * util.c fix bug in findenv() was finding prefix of name. 2860 * compat.c: re-raising SIGINT etc after running .INTERRUPT 2861 results in more reliable termination of all activity on many 2862 platforms. 2863 28642012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2865 2866 * Makefile.in (MAKE_VERSION): bump version to 20120602 2867 Merge with NetBSD make, pick up 2868 o for.c: handle quoted items in .for list 2869 28702012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 2871 2872 * Makefile.in (MAKE_VERSION): bump version to 20120530 2873 Merge with NetBSD make, pick up 2874 o compat.c: ignore empty command. 2875 28762012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 2877 2878 * Makefile.in (MAKE_VERSION): bump version to 20120524 2879 * FILES: add bsd.after-import.mk: 2880 A simple means of integrating bmake into a BSD build system. 2881 28822012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2883 2884 * Makefile.in (MAKE_VERSION): bump version to 20120520 2885 Merge with NetBSD make, pick up 2886 o increased limit for nested conditionals. 2887 28882012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2889 2890 * Makefile.in (MAKE_VERSION): bump version to 20120518 2891 Merge with NetBSD make, pick up 2892 o use _exit(2) in signal hanlder 2893 o Don't use the [dir] cache when building nodes that might have 2894 changed since the last exec. 2895 o Avoid nested extern declaration warnings. 2896 28972012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 2898 2899 * meta.c (fgetLine): avoid %z - not portable. 2900 * parse.c: Since we moved include of sys/mman.h 2901 and def's of MAP_COPY etc. we got dups from a merge. 2902 29032012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 2904 2905 * Makefile.in (MAKE_VERSION): bump version to 20120420 2906 Merge with NetBSD make, pick up 2907 o restore duplicate supression in .MAKE.MAKEFILES 2908 runtime saving can be significant. 2909 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 2910 consumption up to 20%. 2911 29122012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2913 2914 * Makefile.in (MAKE_VERSION): bump version to 20120420 2915 Merge with NetBSD make, pick up 2916 o remove duplicate supression in .MAKE.MAKEFILES 2917 o improved dir cache behavior 2918 o gmake'ish export command 2919 29202012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 2921 2922 * Makefile.in (MAKE_VERSION): bump version to 20120325 2923 Merge with NetBSD make, pick up 2924 o fix parsing of :[#] in conditionals. 2925 29262012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 2927 2928 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 2929 since some systems cannot cope with .Nx <version> 2930 29312011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 2932 2933 * Makefile.in (MAKE_VERSION): bump version to 20111111 2934 Merge with NetBSD make, pick up 2935 o debug output for .PARSEDIR and .PARSEFILE 2936 29372011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2938 2939 * Makefile.in (MAKE_VERSION): bump version to 20111010 2940 29412011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2942 2943 * boot-strap: check for an expected file in the dirs we look for. 2944 * make-bootstrap.sh: pass on LDSTATIC 2945 29462011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2947 2948 * Makefile.in (MAKE_VERSION): bump version to 20111001 2949 Merge with NetBSD make, pick up 2950 o ensure .PREFIX is set for .PHONY 2951 and .TARGET set for .PHONY run via .END 2952 o __dead used consistently 2953 29542011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2955 2956 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 2957 29582011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 2959 2960 * Makefile.in (MAKE_VERSION): bump version to 20110905 2961 Merge with NetBSD make, pick up 2962 o meta_oodate: ignore makeDependfile 2963 29642011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2965 2966 * Makefile.in (MAKE_VERSION): bump version to 20110828 2967 Merge with NetBSD make, pick up 2968 o silent=yes in .MAKE.MODE causes meta mode to mark targets 2969 as SILENT if a .meta file is created 2970 29712011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2972 2973 * Makefile.in (MAKE_VERSION): bump version to 20110818 2974 Merge with NetBSD make, pick up 2975 o in meta mode, if target flagged .META a missing .meta file 2976 means target is out-of-date 2977 o fixes for gcc 4.5 warnings 2978 o simplify job printing code 2979 29802011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 2981 2982 * Makefile.in (MAKE_VERSION): bump version to 20110808 2983 Merge with NetBSD make, pick up 2984 o do not touch OP_SPECIAL targets when doing make -t 2985 29862011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 2987 2988 * Makefile.in (MAKE_VERSION): bump version to 20110622 2989 Merge with NetBSD make, pick up 2990 o meta_oodate detect corrupted .meta file and declare oodate. 2991 * configure.in: add check for setsid 2992 29932011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 2994 2995 * Merge with NetBSD make, pick up 2996 o unit-tests/modts now works on MirBSD 2997 29982011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2999 3000 * Makefile.in (MAKE_VERSION): bump version to 20110606 3001 Merge with NetBSD make, pick up 3002 o ApplyModifiers: when we parse a variable which is not 3003 the entire modifier string, or not followed by ':', do not 3004 consider it as containing modifiers. 3005 o loadfile: ensure newline at end of mapped file. 3006 30072011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3008 3009 * Makefile.in (MAKE_VERSION): bump version to 20110505 3010 Merge with NetBSD make, pick up 3011 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3012 of make's control. In meta mode, any generated file within 3013 said bailiwick, which is found to be missing, causes current 3014 target to be out-of-date. 3015 30162011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3017 3018 * Makefile.in (MAKE_VERSION): bump version to 20110411 3019 Merge with NetBSD make, pick up 3020 o when long modifiers fail to match, check sysV style. 3021 - add a test case 3022 30232011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3024 3025 * Makefile.in (MAKE_VERSION): bump version to 20110410 3026 Merge with NetBSD make, pick up 3027 o :hash - cheap 32bit hash of value 3028 o :localtime, :gmtime - use value as format string for strftime. 3029 30302011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3031 3032 * Makefile.in (MAKE_VERSION): bump version to 20110330 3033 mostly because its a cooler version. 3034 Merge with NetBSD make, pick up 3035 o NetBSD tags for meta.[ch] 3036 o job.c call meta_job_finish() after meta_job_error(). 3037 o meta_job_error() should call meta_job_finish() to ensure 3038 .meta file is closed, and safe to copy - if .ERROR target wants. 3039 meta_job_finish() is safe to call repeatedly. 3040 30412011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3042 3043 * unit-tests/modts: use printf if it is a builtin, 3044 to save us from MirBSD 3045 3046 * Makefile.in (MAKE_VERSION): bump version to 20110329 3047 Merge with NetBSD make, pick up 3048 o fix for use after free() in CondDoExists(). 3049 o meta_oodate() report extra commands and return earlier. 3050 30512011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3052 3053 * Makefile.in (MAKE_VERSION): bump version to 20110327 3054 Merge with NetBSD make, pick up 3055 o meta.c, if .MAKE.MODE contains curdirOk=yes 3056 allow creating .meta files in .CURDIR 3057 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3058 formats the output of 'type' differently - so eat any "()" 3059 30602011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3061 3062 * Makefile.in (MAKE_VERSION): bump version to 20110306 3063 Merge with NetBSD make, pick up 3064 o meta.c, only do getcwd() once 3065 30662011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3067 3068 * Makefile.in (MAKE_VERSION): bump version to 20110305 3069 Merge with NetBSD make, pick up 3070 o correct sysV substitution handling of empty lhs and variable 3071 o correct exists() check for dir with trailing / 3072 o correct handling of modifiers for non-existant variables 3073 during evaluation of conditionals. 3074 o ensure MAP_FILE is defined. 3075 o meta.c use curdir[] now exported by main.c 3076 30772011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3078 3079 * Makefile.in (MAKE_VERSION): bump version to 20110225 3080 Merge with NetBSD make, pick up 3081 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3082 makefiles have been read. 3083 o fix example of :? modifier in man page. 3084 30852011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3086 3087 * Makefile.in (MAKE_VERSION): bump version to 20110214 3088 Merge with NetBSD make, pick up 3089 o meta.c handle realpath() failing when generating meta file 3090 name. 3091 3092 * sigcompat.c: convert to ansi so we can use higher warning levels. 3093 3094 30952011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3096 3097 * Makefile.in (MAKE_VERSION): bump version to 20110207 3098 Merge with NetBSD make, pick up 3099 o fix for bug in meta mode. 3100 31012011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3102 3103 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3104 31052011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3106 3107 * Makefile.in (MAKE_VERSION): bump version to 20110101 3108 Merge with NetBSD make, pick up 3109 o use mmap(2) if available, for reading makefiles 3110 31112010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3112 3113 * Makefile.in (MAKE_VERSION): bump version to 20101215 3114 Merge with NetBSD make, pick up 3115 o ensure meta_job_error() does not report a previous .meta file 3116 as being culprit. 3117 31182010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3119 3120 * Makefile.in (MAKE_VERSION): bump version to 20101210 3121 Merge with NetBSD make, pick up 3122 o meta_oodate: track cwd per process, and only consider target 3123 out-of-date if missing file is outside make's CWD. 3124 Ignore files in /tmp/ etc. 3125 o to ensure unit-tests results match, need to control LC_ALL 3126 as well as LANG. 3127 o fix for parsing bug in var.c 3128 31292010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3130 3131 * Makefile.in (MAKE_VERSION): bump version to 20101126 3132 Merge with NetBSD make, pick up 3133 o if stale dependency is an IMPSRC, search via .PATH 3134 o meta_oodate: if a referenced file is missing, target is 3135 out-of-date. 3136 o meta_oodate: if a target uses .OODATE in its commands, 3137 it (.OODATE) needs to be recomputed. 3138 o keep a pointer to youngest child node, rather than just its 3139 mtime. 3140 31412010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3142 3143 * Makefile.in (MAKE_VERSION): bump version to 20101101 3144 31452010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3146 3147 * machine.sh: like os.sh, 3148 allow for uname -p producing useless drivel 3149 31502010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3151 3152 * boot-strap: document configure knobs for meta and filemon. 3153 3154 * Makefile.in (MAKE_VERSION): bump version to 20100911 3155 Merge with NetBSD make, pick up 3156 o meta.c - meta mode 3157 3158 * make-bootstrap.sh.in: handle meta.c 3159 * configure.in: add knobs for use_meta and filemon_h 3160 also, look for dirname, str[e]sep and strlcpy 3161 * util.c: add simple err[x] and warn[x] 3162 31632010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3164 3165 * boot-strap (TOOL_DIFF): set this to ensure tests use 3166 the same version of diff that configure tested 3167 3168 * Makefile.in (MAKE_VERSION): bump version to 20100808 3169 Merge with NetBSD make, pick up 3170 o in jobs mode, when we discover we cannot make something, 3171 call PrintOnError before exit. 3172 31732010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3174 3175 * Makefile.in (MAKE_VERSION): bump version to 20100806 3176 Merge with NetBSD make, pick up 3177 o formatting fixes for ignored errors 3178 o ensure jobs are cleaned up regardless of where wait() was called. 3179 31802010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3181 3182 * Makefile.in (MAKE_VERSION): bump version to 20100618 3183 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3184 31852010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3186 3187 * Makefile.in (MAKE_VERSION): bump version to 20100616 3188 Merge with NetBSD make, pick up 3189 o man page update 3190 o call PrintOnError from JobFinish when we detect an error we 3191 are not ignoring. 3192 31932010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3194 3195 * Makefile.in (MAKE_VERSION): bump version to 20100606 3196 Merge with NetBSD make, pick up 3197 o man page update 3198 31992010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3200 3201 * Makefile.in (MAKE_VERSION): bump version to 20100605 3202 Merge with NetBSD make, pick up 3203 o use bmake_signal() which is a wrapper around sigaction() 3204 in place of signal() 3205 o add .export-env to allow exporting variables to environment 3206 without tracking (so no re-export when the internal value is 3207 changed). 3208 32092010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3210 3211 * Makefile.in (MAKE_VERSION): bump version to 20100524 3212 Merge with NetBSD make, pick up 3213 o fix for .info et al being greedy. 3214 32152010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3216 3217 * Makefile.in (MAKE_VERSION): bump version to 20100520 3218 Merge with NetBSD make, pick up 3219 o back to using realpath on argv[0] 3220 but only if contains '/' and does not start with '/'. 3221 32222010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3223 3224 * boot-strap: use absolute path for bmake when running tests. 3225 3226 * Makefile.in (MAKE_VERSION): bump version to 20100510 3227 Merge with NetBSD make, pick up 3228 o revert use of realpath on argv[0] 3229 too many corner cases. 3230 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3231 32322010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3233 3234 * Makefile.in (MAKE_VERSION): bump version to 20100505 3235 Merge with NetBSD make, pick up 3236 o fix for missed SIGCHLD when compiled with SunPRO 3237 actually for bmake, defining FORCE_POSIX_SIGNALS would have 3238 done the job. 3239 32402010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 3241 3242 * Makefile.in (MAKE_VERSION): bump version to 20100430 3243 Merge with NetBSD make, pick up 3244 o fflush stdout before writing to stdout 3245 32462010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 3247 3248 * Makefile.in (MAKE_VERSION): bump version to 20100423 3249 Merge with NetBSD make, pick up 3250 o updated unit tests for Haiku (this time for sure). 3251 * boot-strap: based on patch from joerg 3252 honor --with-default-sys-path better. 3253 * boot-strap: remove mention of --with-prefix-sys-path 3254 32552010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 3256 3257 * Makefile.in (MAKE_VERSION): bump version to 20100422 3258 * Merge with NetBSD make, pick up 3259 o fix for vfork() on Darwin. 3260 o fix for bogus $TMPDIR. 3261 o set .MAKE.MODE=compat for -B 3262 o set .MAKE.JOBS=max_jobs for -j max_jobs 3263 o allow unit-tests to run without any *.mk 3264 o unit-tests/modmisc be more conservative in dirs presumed to exist. 3265 * boot-strap: ignore /usr/share/mk except on NetBSD. 3266 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 3267 ensure sort(1) behaves as expected. 3268 32692010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3270 3271 * boot-strap: add FindHereOrAbove so we can use -m .../mk 3272 32732010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3274 3275 * Makefile.in (MAKE_VERSION): bump version to 20100420 3276 * Merge with NetBSD make, pick up 3277 o fix for variable realpath() behavior. 3278 we have to stat(2) the result to be sure. 3279 o fix for .export (all) when nested vars use :sh 3280 32812010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 3282 3283 * Makefile.in (MAKE_VERSION): bump version to 20100414 3284 * Merge with NetBSD make, pick up 3285 o use realpath to resolve argv[0] (for .MAKE) if needed. 3286 o add realpath from libc. 3287 o add :tA to resolve variable via realpath(3) if possible. 3288 32892010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 3290 3291 * Makefile.in (MAKE_VERSION): bump version to 20100408 3292 * Merge with NetBSD make, pick up 3293 o unit tests for .ERROR, .error 3294 o fix for .ERROR to ensure it cannot be default target. 3295 32962010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 3297 3298 * Makefile.in (MAKE_VERSION): bump version to 20100406 3299 * Merge with NetBSD make, pick up 3300 o fix for compat mode "Error code" going to debug_file. 3301 o fix for .ALLSRC being populated twice. 3302 o support for .info, .warning and .error directives 3303 o .MAKE.MODE to control make's operational mode 3304 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 3305 name(s). 3306 o .MAKE.DEPENDFILE to control the name of the depend file 3307 o .ERROR target - run on failure. 3308 33092010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 3310 3311 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 3312 3313 * os.sh,arch.c: patch for Haiku from joerg at netbsd 3314 33152010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 3316 3317 * Makefile.in (MAKE_VERSION): bump version to 20100222 3318 * Merge with NetBSD make, pick up 3319 o better error msg for .for with mutiple inter vars 3320 3321 * boot-strap: 3322 o use make-bootstrap.sh from joerg at netbsd 3323 to avoid the need for a native make when bootstrapping. 3324 o add "" everywhere ;-) 3325 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 3326 otherwise the pre-formated version. 3327 33282010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 3329 3330 * Makefile.in (MAKE_VERSION): bump version to 20100102 3331 * Merge with NetBSD make, pick up: 3332 o fix for -m .../ 3333 33342009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 3335 3336 * Makefile.in (MAKE_VERSION): bump version to 20091118 3337 * Merge with NetBSD make, pick up: 3338 o .unexport 3339 o report lines that start with '.' and should have ':' 3340 (catch typo's of .el*if). 3341 33422009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3343 3344 * configure.in: Ensure that srcdir and mksrc are absolute paths. 3345 33462009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3347 3348 * Makefile.in (MAKE_VERSION): fix version to 20091007 3349 33502009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 3351 3352 * Makefile.in (MAKE_VERSION): bump version to 200910007 3353 * Merge with NetBSD make, pick up: 3354 o fix for parsing of :S;...;...; applied to .for loop iterator 3355 appearing in a dependency line. 3356 33572009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3358 3359 * Makefile.in (MAKE_VERSION): bump version to 20090909 3360 * Merge with NetBSD make, pick up: 3361 o fix for -C, .CURDIR and .OBJDIR 3362 * boot-strap: 3363 o allow share_dir to be set independent of prefix. 3364 o select default share_dir better when prefix ends in $HOST_TARGET 3365 o if FORCE_BSD_MK etc were set, include them in the suggested 3366 install-mk command. 3367 33682009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 3369 3370 * Makefile.in (MAKE_VERSION): bump version to 20090908 3371 * Merge with NetBSD make, pick up: 3372 o .MAKE.LEVEL for recursion tracking 3373 o fix for :M scanning \: 3374 33752009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3376 3377 * configure.in: Don't -D__EXTENSIONS__ if 3378 AC_USE_SYSTEM_EXTENSIONS says "no". 3379 33802009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 3381 3382 * Makefile.in (MAKE_VERSION): bump version to 20090826 3383 Simplify MAKE_VERSION to just the bare date. 3384 * Merge with NetBSD make, pick up: 3385 o -C directory support. 3386 o support for SIGINFO 3387 o use $TMPDIR for temp files. 3388 o child of vfork should be careful about modifying parent's state. 3389 3390 33912009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 3392 3393 * Appy some patches for MiNT from David Brownlee 3394 33952009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 3396 3397 * Makefile.in (BMAKE_VERSION): bump version to 20090222 3398 * Merge with NetBSD make, pick up: 3399 o Possible null pointer de-ref in Var_Set. 3400 34012009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 3402 3403 * Makefile.in (BMAKE_VERSION): bump version to 20090204 3404 * Merge with NetBSD make, pick up: 3405 o bmake_malloc et al moved to their own .c 3406 o Count both () and {} when looking for the end of a :M pattern 3407 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 3408 o strlist.c - functions for processing extendable arrays of pointers to strings. 3409 o ClientData replaced with void *, so const void * can be used. 3410 o New debug flag C for DEBUG_CWD 3411 34122008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 3413 3414 * Makefile.in (BMAKE_VERSION): bump version to 20081111 3415 Apply patch from Joerg Sonnenberge to 3416 configure.in: 3417 o remove some redundant checks 3418 o check for emlloc etc only in libutil and require the whole family. 3419 util.c: 3420 o remove [v]asprintf which is no longer used. 3421 34222008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3423 3424 * Makefile.in (BMAKE_VERSION): bump version to 20081101 3425 * Merge with NetBSD make, pick up: 3426 o util.c: avoid use of putenv() - christos 3427 34282008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3429 3430 * Makefile.in (BMAKE_VERSION): bump version to 20081030 3431 pick up man page tweaks. 3432 34332008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 3434 3435 * Makefile.in: move processing of LIBOBJS to after is definition! 3436 thus we'll have getenv.c in SRCS only if needed. 3437 3438 * make.1: add examples of how to use :? 3439 3440 * Makefile.in (BMAKE_VERSION): bump version to 20081029 3441 * Merge with NetBSD make, pick up: 3442 o fix for .END processing with -j 3443 o segfault from Parse_Error when no makefile is open 3444 o handle numeric expressions in any variable expansion 3445 o debug output now defaults to stderr, -dF to change it - apb 3446 o make now uses bmake_malloc etc so that it can build natively 3447 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 3448 34492008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 3450 3451 * Makefile.in (BMAKE_VERSION): bump version to 20080808 3452 * Merge with NetBSD make, pick up: 3453 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 3454 long lines in Makefiles 3455 o optimizations for VarQuote by joerg 3456 o fix for PR/38756: dominik: make dumps core on invalid makefile 3457 34582008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 3459 3460 * Makefile.in (BMAKE_VERSION): bump version to 20080515 3461 * Merge with NetBSD make, pick up: 3462 o fix skip setting vars in VAR_GLOBAL context, to handle 3463 cases where VAR_CMD is used for other than command line vars. 3464 34652008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 3466 3467 * boot-strap (make_version): we may need to look in 3468 $prefix/share/mk for sys.mk 3469 3470 * Makefile.in (BMAKE_VERSION): bump version to 20080514 3471 * Merge with NetBSD make, pick up: 3472 o skip setting vars in VAR_GLOBAL context, when already set in 3473 VAR_CMD which takes precedence. 3474 34752008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 3476 3477 * Makefile.in (BMAKE_VERSION): bump version to 20080330 3478 * Merge with NetBSD make, pick up: 3479 o fix for ?= when LHS contains variable reference. 3480 34812008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3482 3483 * merge some patches from NetBSD pkgsrc. 3484 3485 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 3486 the MAKSYSPATH used during bootstrap. 3487 3488 * Makefile.in (BMAKE_VERSION): bump version to 20080215 3489 * Merge with NetBSD make, pick up: 3490 o warn if non-space chars follow 'empty' in a conditional. 3491 34922008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3493 3494 * Makefile.in (BMAKE_VERSION): bump version to 20080118 3495 * Merge with NetBSD make, pick up: 3496 o consider dependencies read from .depend as optional - dsl 3497 o remember when buffer for reading makefile grows - dsl 3498 o add -dl (aka LOUD) - David O'Brien 3499 35002007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 3501 3502 * Makefile.in (BMAKE_VERSION): bump version to 20071022 3503 * Merge with NetBSD make, pick up: 3504 o Allow .PATH<suffix> to be used for .include "" 3505 3506 * boot-strap: source default settings from .bmake-boot-strap.rc 3507 35082007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 3509 3510 * Makefile.in: fix maninstall on various systems 3511 provided that our man.mk is used. 3512 For non-BSD systems we install the preformatted page 3513 into $MANDIR/cat1 3514 35152007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 3516 3517 * boot-strap: make bmake.1 too, so maninstall works. 3518 35192007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 3520 3521 * Makefile.in (BMAKE_VERSION): bump version to 20071014 3522 * Merge with NetBSD make, pick up: 3523 o revamped handling of defshell - configure no longer needs to 3524 know the content of the shells array - apb 3525 o stop Var_Subst modifying its input - apb 3526 o avoid calling ParseTrackInput too often - dsl 3527 35282007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 3529 3530 * Makefile.in (BMAKE_VERSION): bump version to 20071011 3531 * Merge with NetBSD make, pick up: 3532 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 3533 3534 * sigcompat.c: some tweaks for HP-UX 11.x based on 3535 patch from Tobias Nygren 3536 3537 * configure.in: update handling of --with-defshell to match 3538 new make behavior. --with-defshell=/usr/xpg4/bin/sh 3539 will now do what one might hope - provided the chosen shell 3540 behaves enough like sh. 3541 35422007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 3543 3544 * Makefile.in (BMAKE_VERSION): bump to 20071008 3545 * Merge with NetBSD make, pick up: 3546 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 3547 o .export/.MAKE.EXPORTED - export of variables - sjg 3548 o .MAKE.MAKEFILES - track all makefiles read - sjg 3549 o performance improvements - dsl 3550 o revamp parallel job scheduling - dsl 3551 35522006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3553 3554 * Makefile.in (BMAKE_VERSION): bump to 20060728 3555 * Merge with NetBSD make, pick up: 3556 o extra debug info during variable and cond processing - sjg 3557 o shell definition now covers newline - rillig 3558 o minor mem leak in PrintOnError - sjg 3559 35602006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3561 3562 * Makefile.in (BMAKE_VERSION): bump to 20060511 3563 * Merge with NetBSD make, pick up: 3564 o more memory leaks - coverity 3565 o possible overflow in ArchFindMember - coverity 3566 o extract variable modifier code out of Var_Parse() 3567 so it can be called recursively - sjg 3568 o unit-tests/moderrs - sjg 3569 35702006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 3571 3572 * Makefile.in (BMAKE_VERSION): bump to 20060412 3573 * Merge with NetBSD make, pick up: 3574 o fixes for some memory leaks - coverity 3575 o only read first sys.mk etc when searching sysIncPath - sjg 3576 3577 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 3578 setting ${MAKEFILE} - OBATA Akio 3579 35802006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 3581 3582 * Makefile.in (BMAKE_VERSION): bump to 20060318 3583 * Merge with NetBSD make, pick up: 3584 o cleanup of job.c to remove remote handling, distcc is more 3585 useful and this code was likely bit-rotting - dsl 3586 o fix for :P modifier - sjg 3587 * boot-strap: set default prefix to something reasonable 3588 (for me anyway). 3589 35902006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 3591 3592 * Makefile.in (BMAKE_VERSION): bump to 20060301 3593 * Merge with NetBSD make, pick up: 3594 o make .WAIT apply recursively, document and test case - apb 3595 o allow variable modifiers in a variable appear anywhere in 3596 modifier list, document and test case - sjg 3597 35982006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 3599 3600 * Makefile.in (BMAKE_VERSION): bump to 20060222 3601 * Merge with NetBSD make, pick up: 3602 o improved job token handling - dsl 3603 o SIG_DFL the correct signal before exec - dsl 3604 o more debug info during parsing - dsl 3605 o allow variable modifiers to be specified via variable - sjg 3606 * boot-strap: explain why we died if no mksrc 3607 36082005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 3609 3610 * Makefile.in (BMAKE_VERSION): bump to 20051105 3611 * configure.in: always set default_sys_path 3612 default is ${prefix}/share/mk 3613 - remove prefix_sys_path, anyone wanting more than above 3614 needs to set it manually. 3615 36162005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3617 3618 * boot-strap: make this a bit easier for pkgsrc folk. 3619 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 3620 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 3621 36222005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 3623 3624 * Makefile.in (BMAKE_VERSION): bump to 20051102 3625 * job.c (JobFinish): fix likely ancient merge lossage 3626 fix from Todd Vierling. 3627 * boot-strap (srcdir): allow setting mksrc=none 3628 36292005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 3630 3631 * Makefile.in (BMAKE_VERSION): bump to 20051031 3632 * ranlib.h: skip on OSF too. 3633 (NetBSD PR 31864) 3634 36352005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 3636 3637 * Makefile.in (BMAKE_VERSION): bump to 20051002 3638 fix a silly typo 3639 36402005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3641 3642 * Makefile.in (BMAKE_VERSION): bump to 20051001 3643 support for UnixWare and some other systems, 3644 based on patches from pkgsrc/bootstrap 3645 36462005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3647 3648 * Makefile.in (BMAKE_VERSION): bump to 20050901 3649 * Merge with NetBSD make, pick up: 3650 o possible parse error causing us to wander off. 3651 36522005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 3653 3654 * Makefile.in (BMAKE_VERSION): bump to 20050606 3655 * Merge with NetBSD make, pick up: 3656 o :0x modifier for randomizing a list 3657 o fixes for a number of -Wuninitialized issues. 3658 36592005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 3660 3661 * Makefile.in (BMAKE_VERSION): bump to 20050530 3662 * Merge with NetBSD make, pick up: 3663 o Handle dependencies for .BEGIN, .END and .INTERRUPT 3664 3665 * README: was seriously out of date. 3666 36672005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 3668 3669 * Important to use .MAKE rather than MAKE. 3670 36712005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 3672 3673 * Makefile.in (BMAKE_VERSION): bump to 20050315 3674 * Merge with NetBSD make, pick up: 3675 o don't mistake .elsefoo for .else 3676 o use suffix-specific search path correctly 3677 o bunch of style nits 3678 36792004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3680 3681 * boot-strap: 3682 o ensure that args to --src and --with-mksrc 3683 are resolved before giving them to configure. 3684 o add -o "objdir" so that builder can control it, 3685 default is $OS as determined by os.sh 3686 o add -q to suppress all the install instructions. 3687 36882004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 3689 3690 * Remove __IDSTRING() 3691 3692 * Makefile.in (BMAKE_VERSION): bump to 20040508 3693 * Merge with NetBSD make, pick up: 3694 o posix fixes 3695 - remove '-e' from compat mode 3696 - add support for '+' command-line prefix. 3697 o fix for handling '--' on command-line. 3698 o fix include in lst.lib/lstInt.h to simplify '-I's 3699 o we also picked up replacement of MAKE_BOOTSTRAP 3700 with !MAKE_NATIVE which is a noop, but possibly confusing. 3701 37022004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 3703 3704 * Makefile.in (BMAKE_VERSION): bump to 20040414 3705 * Merge with NetBSD make, pick up: 3706 o allow quoted strings on lhs of conditionals 3707 o issue warning when extra .else is seen 3708 o print line numer when errors encountered during parsing from 3709 string. 3710 37112004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 3712 3713 * Makefile.in (BMAKE_VERSION): bump to 20040220 3714 * Merge with NetBSD make, pick up: 3715 o fix for old :M parsing bug. 3716 o re-jigged unit-tests 3717 37182004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3719 3720 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 3721 so that './bmake -f Makefile test' works. 3722 37232004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 3724 3725 * Makefile.in: (BMAKE_VERSION): bump to 20040214 3726 * Merge with NetBSD make, pick up: 3727 o search upwards for *.mk 3728 o fix for double free of var substitution buffers 3729 o use of getopt replaced with custom code, since the usage 3730 (re-scanning) isn't posix compatible. 3731 37322004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 3733 3734 * arch.c: don't include ranlib.h on ELF systems 3735 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 3736 37372004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3738 3739 * Makefile.in (BMAKE_VERSION): bump to 20040118 3740 3741 * boot-strap (while): export vars we assign to on cmdline 3742 * unit-test/Makefile.in: ternary is .PHONY 3743 37442004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 3745 3746 * Makefile.in (BMAKE_VERSION): bump version to 20040108 3747 * Merge with NetBSD make, pick up: 3748 o fix for ternary modifier 3749 37502004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 3751 3752 * Makefile.in (BMAKE_VERSION): bump version to 20040105 3753 * Merge with NetBSD make, pick up: 3754 o fix for cond.c to handle compound expressions better 3755 o variable expansion within sysV style replacements 3756 37572003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 3758 3759 * Make portable snprintf safer - output to /dev/null first to 3760 check space needed. 3761 3762 * Makefile.in (BMAKE_VERSION): bump version to 20031222 3763 * Merge with NetBSD make, pick up: 3764 o -dg3 to show input graph when things go wrong. 3765 o explicitly look for makefiles in objdir if not found in curdir so 3766 that errors in .depend etc will be reported accurarely. 3767 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 3768 instead as it more accurately reflects the expected behavior and 3769 is more consistently implemented. 3770 o avoid use of asprintf. 3771 37722003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 3773 3774 * util.c: Add asprintf and vasprintf. 3775 3776 * Makefile.in (BMAKE_VERSION): bump version to 20030928 3777 * Merge with NetBSD make, pick up: 3778 :[] modifier - allows picking words from a variable. 3779 :tW modifier - allows treating value as one big word. 3780 W flag for :C and :S - allows treating value as one big word. 3781 37822003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 3783 3784 * Merge with NetBSD make 3785 pick up -de flag to enable printing failed command. 3786 don't skip 1st two dir entries (normally . and ..) since 3787 coda does not have them. 3788 37892003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3790 3791 * Makefile.in (BMAKE_VERSION): bump version to 20030909 3792 * Merge with NetBSD make, pick up: 3793 - changes for -V '${VAR}' to print fully expanded value 3794 cf. -V VAR 3795 - CompatRunCommand now prints the command that failed. 3796 - several files got updated 3 clause Berkeley license. 3797 37982003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 3799 3800 * boot-strap: Allow setting configure args on command line. 3801 38022003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 3803 3804 * configure.in: add --with-defshell to allow sh or ksh 3805 to be selected as default shell. 3806 3807 * Makefile.in: bump version to 20030731 3808 3809 * Merge with NetBSD make 3810 Pick up .SHELL spec for ksh and associate man page changes. 3811 Also compat mode now uses the same shell specs. 3812 38132003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 3814 3815 * var.c (Var_Parse): ensure delim is initialized. 3816 3817 * unit-tests/Makefile.in: use single quotes to avoid problems from 3818 some shells. 3819 3820 * makefile.boot.in: 3821 Run the unit-tests as part of the bootstrap procedure. 3822 38232003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3824 3825 * unit-tests/Makefile.in: always force complaints from 3826 ${TEST_MAKE} to be from 'make'. 3827 3828 * configure.in: add check for 'diff -u' 3829 also fix some old autoconf'isms 3830 3831 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 3832 if using GCC add -Wno-cast-qual to CFLAGS for var.o 3833 3834 * Merge with NetBSD make 3835 Pick up fix for :ts parsing error in some cases. 3836 Pick unit-tests. 3837 38382003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 3839 3840 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 3841 3842 * var.c (Var_Parse): fix bug in :ts modifier, after const 3843 correctness fixes, must pass nstr to VarModify. 3844 38452003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 3846 3847 * Makefile.in: BMAKE_VERSION switch to a date based version. 3848 We'll generally use the date of last import from NetBSD. 3849 3850 * Merge with NetBSD make 3851 Pick up fixes for const-correctness, now passes WARNS=3 on 3852 NetBSD. 3853 Pick up :ts modifier, allows controlling the separator used 3854 between words in variable expansion. 3855 38562003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 3857 3858 * FILES: include boot-strap and os.sh 3859 3860 * Makefile.in: only set WARNS if we are NetBSD, the effect on 3861 FreeBSD is known to be bad. 3862 3863 * makefile.boot.in (bootstrap): make this the default target. 3864 3865 * Makefile.in: bump version to 3.1.19 3866 3867 * machine.sh: avoid A-Z with tr as it is bound to lose. 3868 38692003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 3870 3871 * Merge with NetBSD make 3872 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 3873 Plus some doc fixes. 3874 38752003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 3876 3877 * Merge with NetBSD make 3878 Pick up fix for PR/1523 - don't count a library as built, if there 3879 is no way to build it 3880 3881 * Bump version to 3.1.18 3882 38832003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 3884 3885 * Merge with NetBSD make 3886 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 3887 appears in src list. 3888 38892003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 3890 3891 * Merge with NetBSD make (mmm 10th anniversary!) 3892 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 3893 pick up -X which tells us to not export VAR=val via setenv if 3894 we are already doing so via MAKEFLAGS. This saves valuable env 3895 space on systems like Darwin. 3896 set MAKE_VERSION to 3.1.17 3897 3898 * parse.c: pix up fix for suffix rules 3899 39002003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 3901 3902 * Merge with NetBSD make. 3903 pick up fix for propagating -B via MAKEFLAGS. 3904 set MAKE_VERSION to 3.1.16 3905 3906 * Apply some patches from pkgsrc-bootstrap/bmake 3907 Originally by Grant Beattie <grant@netbsd.org> 3908 I may have missed some - since they are based on bmake-3.1.12 3909 39102002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 3911 3912 * makefile.boot.in (bmake): update install targets for those that 3913 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 3914 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 3915 3916 * bmake.cat1: update the pre-formatted man page! 3917 39182002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 3919 3920 * Merge with NetBSD make. 3921 pick up fix for premature free of pointer used in call 3922 to Dir_InitCur(). 3923 set MAKE_VERSION to 3.1.15 3924 39252002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 3926 3927 * configure.in: determine suitable value for MKSRC. 3928 override using --with-mksrc=PATH. 3929 3930 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 3931 configs(8) will use 'sun4' as an alias for 'sparc'. 3932 39332002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 3934 3935 * Merge with NetBSD make. 3936 pick up ${.PATH} 3937 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 3938 set MAKE_VERSION to 3.1.14 3939 add configure checks for killpg and sys/socket.h 3940 39412002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 3942 3943 * tag bmake-3-1-13 3944 3945 * makefile.boot.in (bmake): use install-mk 3946 Also setup ./mk before trying to invoke bmake.boot incase we 3947 needed install-mk to create a sys.mk for us. 3948 3949 * configure.in: If we need to add -I${srcdir}/missing, make it an 3950 absolute path so that it works for lst.lib too. 3951 3952 * make.h: always include sys/cdefs.h since we provide one if the 3953 host does not. 3954 3955 * Makefile.in (install-mk): 3956 use MKSRC/install-mk which will do the right thing. 3957 use uname -p for ARCH if possible. 3958 since install-mk will setup links bsd.prog.mk -> prog.mk if 3959 needed, just .include bsd.prog.mk 3960 3961 * Merge with NetBSD make (NetBSD-1.6) 3962 Code is ansi-C only now. 3963 Bug in handling of dotLast is fixed. 3964 Can now assign .OBJDIR and make will reset its notions of life. 3965 New modifiers :tu :tl for toUpper and toLower. 3966 3967Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 3968 3969 * Merge with NetBSD make 3970 pick up fix for .END failure in compat mode. 3971 pick up fix for extra va_end() in ParseVErrorInternal. 3972 3973Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 3974 3975 * configure.in: for systems that have sys/cdefs.h check if it is 3976 compatible. If not, include the one under missing, but tell it to 3977 include the native one too - necessary on Linux. 3978 3979 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 3980 include_next (for gcc) to get the native sys/cdefs.h 3981 3982Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3983 3984 * job.c (JobFinish): Fix an earlier merge bug that resulted in 3985 leaking descriptors when using -jN. 3986 3987 * job.c (JobPrintCommand): See if "curdir" exists before 3988 attempting to chdir(). Doing the chdir directly in make (when in 3989 compat mode) fails silently, so let the -jN version do the same. 3990 This can happen when building kernels in an object tree and 3991 playing clever games to reset .CURDIR. 3992 3993 * Merged with NetBSD make 3994 pick up .USEBEFORE 3995 3996Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3997 3998 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 3999 4000Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4001 4002 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4003 us not to export the iterator variable when using VAR_CMD context. 4004 4005Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4006 4007 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4008 its the wrong "fix". 4009 4010Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4011 4012 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4013 We now simply append the variable names to .MAKEOVERRIDES, and 4014 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4015 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4016 Apart from fixing quoting bugs in previous version, this allows us 4017 to export vars to the environment by simply doing: 4018 .MAKEOVERRIDES+= PATH 4019 Merged again with NetBSD make, but the above is the only change. 4020 4021 * configure.in: added 4022 --disable-pwd-override disable $PWD overriding getcwd() 4023 --disable-check-make-chdir disable make trying to guess 4024 when it should automatically cd ${.CURDIR} 4025 4026 * Merge with NetBSD make, changes include: 4027 parse.c (ParseDoDependency): Spot that the syntax error is 4028 caused by an unresolved cvs/rcs conflict and say so. 4029 var.c: most of Var* functions now take a ctxt as 1st arg. 4030 now does variable substituion on rhs of sysv style modifiers. 4031 4032 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4033 is now done here. We append the name='value' to .MAKEOVERRIDES 4034 rather than directly into MAKEFLAGS as this allows a Makefile to 4035 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4036 very similar mechanism. Note that in adding name='value' to 4037 .MAKEOVERRIDES we do the moral equivalent of: 4038 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4039 4040Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4041 4042 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4043 4044 * Merged with NetBSD make 4045 make -dx can now be used to run commands via sh -x 4046 better error messages on exec failures. 4047 4048Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4049 4050 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4051 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4052 MACHINE etc otherwise they propagate from the previous bmake. 4053 4054 * configure.in (machine): allow --with-machine=generic to make 4055 configure use machine.sh to set MACHINE. 4056 4057 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4058 4059 * Makefile.in: mention in bmake.1 that we use autoconf. 4060 4061 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4062 4063Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4064 4065 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4066 as that rather defeats the usefulness of ${MAKEFILE}. 4067 4068 * main.c (MainParseArgs): append command line variable assignments 4069 to MAKEFLAGS so that they get propagated to child make's. 4070 Apparently this is required POSIX behaviour? Its useful anyway. 4071 4072Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4073 4074 * compat.c (CompatRunCommand): don't use perror() since stdio may 4075 cause problems in child of vfork(). 4076 4077 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4078 This routine prints out the .curdir where we stopped and will also 4079 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4080 4081 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4082 :@ expansion. 4083 4084 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4085 4086 * Added RCSid's for the files we've touched. 4087 4088Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4089 4090 * configure.in: Thanks to some clues from mdb@juniper.net, 4091 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4092 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4093 4094 --with-machine=MACHINE explicitly set MACHINE 4095 --with-force-machine=MACHINE set FORCE_MACHINE 4096 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4097 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4098 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4099 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4100 4101 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4102 4103 * makefile: added a pathetically simple makefile to drive 4104 bootstrapping. Running configure by hand is more useful. 4105 4106 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4107 dependent on NetBSD bsd.*.mk 4108 4109 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4110 _PATH_OBJDIRPREFIX for those that don't want a default. 4111 construct _PATH_DEFSYSPATH from the info we get from configure. 4112 4113 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4114 if MAKE_VERSION is defined. 4115 4116 * compat.c: when we bail, print out the .CURDIR we were in. 4117 4118Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4119 4120 * Merged with NetBSD make 4121 4122 * var.c: fixed a bug in the handling of the modifier :P 4123 if the node as found but the path was null, we segfault trying to 4124 duplicate it. 4125 4126Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4127 4128 * Merged with NetBSD make 4129 4130 * make.c: Make_OODate's test for a library out of date was using 4131 cmtime where it should have used mtime (my bug). 4132 4133 * compat.c: Use perror() to tell us what really went wrong when we 4134 cannot exec a command. 4135 4136Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4137 4138 * Merged with NetBSD make 4139 4140Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4141 4142 * Merged with NetBSD make 4143 4144Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4145 4146 * Merged with NetBSD make 4147 4148Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4149 4150 * Merged with NetBSD make 4151 4152Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4153 4154 * util.c: don't provide signal() since we use sigcompat.c 4155 4156 * Makefile.in: added a build target. 4157 4158 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4159 These allow some quite clever magic. 4160 4161 * main.c (main): added support for getenv(MAKESYSPATH). 4162 4163Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4164 4165 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4166 This avoids objdir having a different value depending on how a 4167 directory was reached (via command line, or subdir.mk). 4168 4169 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4170 4171Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4172 4173 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4174 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4175 I've been testing this in NetBSD's make for some weeks. 4176 4177 * Turn Makefile into Makefile.in and make it useful. 4178 4179Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4180 4181 * Imported NetBSD's -current make(1) and resolve conflicts. 4182 4183 * Applied autoconf patches from bmake v2 4184 4185 * Imported clean code base from NetBSD-1.0 4186