12023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20230622 4 Merge with NetBSD make, pick up 5 o optimize string matching for ':M' and ':N' 6 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 7 82023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 9 10 * VERSION (_MAKE_VERSION): 20230621 11 Merge with NetBSD make, pick up 12 o more extensive tests for include guards 13 o parse.c: if a guard is already defined a file that uses the same 14 guard is still guarded by it. 15 162023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 17 18 * VERSION (_MAKE_VERSION): 20230620 19 Merge with NetBSD make, pick up 20 o allow guards to be targets as well as variables 21 The guard targets may include variable references like 22 __${.PARSEDIR:tA}/${.PARSEFILE}__ 23 242023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 25 26 * VERSION (_MAKE_VERSION): 20230619 27 Merge with NetBSD make, pick up 28 o unit test for .undef of readOnly vars 29 o optimization for makefiles protected from multiple-inclusion 30 skip even opening the file after first include. 31 Initially this only handles makefiles guarded by a variable 32 target guards are next. 33 342023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 35 36 * VERSION (_MAKE_VERSION): 20230616 37 Merge with NetBSD make, pick up 38 o var.c: do not allow delete of readOnly variable 39 402023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 41 42 * VERSION (_MAKE_VERSION): 20230601 43 Merge with NetBSD make, pick up 44 o parse.c: .break takes no args 45 o lots of unit test updates 46 472023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 48 49 * unit-tests/Makefile: skip tests that require /dev/filemon 50 if it does not exists - issue a warning. 51 522023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 53 54 * VERSION (_MAKE_VERSION): 20230522 55 Fix building on darwin ppc 56 57 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 58 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 59 602023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 61 62 * VERSION (_MAKE_VERSION): 20230515 63 64 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 65 compile filemon_ktrace.c 66 672023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 68 69 * VERSION (_MAKE_VERSION): 20230512 70 o sys.dirdeps.mk - broke after-import target 71 722023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 73 74 * VERSION (_MAKE_VERSION): 20230510 75 Merge with NetBSD make, pick up 76 o parse.c: don't print null filename in stack traces 77 o var.c: :mtime operate on each word in variable value 78 792023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 80 81 * VERSION (_MAKE_VERSION): 20230509 82 Merge with NetBSD make, pick up 83 o for.c: skip syntactically wrong .for loops 84 o var.c: allow for :gmtime=${mtime} 85 add :mtime[=timestamp] where timestamp is used if stat(2) 86 fails, if :mtime=error stat(2) failure causes error. 87 882023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 89 90 * VERSION (_MAKE_VERSION): 20230504 91 Merge with NetBSD make, pick up 92 o compat.c: fix compile on NetBSD 7.2 93 o make.1: fix documentation of .PREFIX to match reality and POSIX 94 o unit-tests: improved var-scope-local 95 962023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 97 98 * VERSION (_MAKE_VERSION): 20230414 99 Merge with NetBSD make, pick up 100 o minor cleanup 101 1022023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 103 104 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 105 unlimited results in an insane number (0x7fffffffffffffff). 106 If BMAKE_NOFILE_MAX is defined, use that instead. 107 1082023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 109 110 * VERSION (_MAKE_VERSION): 20230321 111 Merge with NetBSD make, pick up 112 * make.1: document seemingly unexplained Error code 6. 113 1142023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 115 116 * VERSION (_MAKE_VERSION): 20230317 117 Merge with NetBSD make, pick up 118 o compat.c: CompatDeleteTarget skip .PHONY targets to be 119 consistent with JobDeleteTarget. 120 o job.c: fix memory leak in handling sysv :from=to modifiers 121 1222023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 123 124 * VERSION (_MAKE_VERSION): 20230303 125 Merge with NetBSD make, pick up 126 o several updated unit-tests 127 1282023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 129 130 * VERSION (_MAKE_VERSION): 20230222 131 Merge with NetBSD make, pick up 132 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 133 1342023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 135 136 * VERSION (_MAKE_VERSION): 20230218 137 Merge with NetBSD make, pick up 138 o var.c: fix parsing of unevaluated subexpressions with 139 unbalanced '{}' 140 1412023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 142 143 * VERSION (_MAKE_VERSION): 20230215 144 Merge with NetBSD make, pick up 145 o inline macros for some variable names 146 o cond.c: reduce complexity of evaluating expressions 147 1482023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 149 150 * VERSION (_MAKE_VERSION): 20230208 151 Merge with NetBSD make, pick up 152 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 153 when it has been used within conditional expressions 154 1552023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 156 157 * VERSION (_MAKE_VERSION): 20230127 158 159 * install-sh: if making directories ensure umask is set 160 to match mode. 161 162 * Makefile: use DIRMODE for directories and 163 NONBINMODE for man pages and mk files 164 1652023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 166 167 * VERSION (_MAKE_VERSION): 20230126 168 Merge with NetBSD make, pick up 169 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 170 should be read-only. 171 1722023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 173 174 * VERSION (_MAKE_VERSION): 20230123 175 Merge with NetBSD make, pick up 176 o .[NO]READONLY: for control of read-only variables 177 o .SYSPATH: for controlling the path searched for makefiles 178 1792023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 180 181 * VERSION (_MAKE_VERSION): 20230120 182 Merge with NetBSD make, pick up 183 o allow for white-space between command specifiers @+- 184 o add more details to warning 'Extra targets ignored' 185 1862023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 187 188 * machine.sh: leverage os.sh rather than duplicate 189 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 190 for that purpose for the past decade or so. 191 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 192 1932023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 194 195 * VERSION (_MAKE_VERSION): 20230101 196 Merge with NetBSD make, pick up 197 o cleanup comments, inline some LazyBuf_ methods 198 o unit-tests/ add/improve comments in tests 199 o make.1: sync list of built-in variables with reality 200 sort list of built-in variables 201 reduce indentation of the long list of variable names 202 use consistent markup for boolean flags 203 move description of .MAKE.MODE below the .MAKE.META block 204 clarify in which case an expression may omit braces 205 2062022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 207 208 * VERSION (_MAKE_VERSION): 20221024 209 Merge with NetBSD make, pick up 210 o change return type of unlink_file back to int 211 2122022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 213 214 * Makefile: Darwin and Linux can handle MANTARGET=man 215 2162022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 217 218 * VERSION (_MAKE_VERSION): 20220928 219 Merge with NetBSD make, pick up 220 o fix more ignored returns from snprintf 221 o compile with higher warnings 222 2232022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 224 225 * main.c meta.c: do not ignore return from snprintf 226 227 * meta.c strlcpy.c: we need prototype for strlcpy 228 229 * sigcompat.c: fix unused function warnings 230 2312022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 232 233 * VERSION (_MAKE_VERSION): 20220924 234 Merge with NetBSD make, pick up 235 o fix bug in .break reset of conditional depth 236 o overhaul and simplify tracking of conditional depth 237 2382022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 239 240 * VERSION (_MAKE_VERSION): 20220912 241 Merge with NetBSD make, pick up 242 o man page updates 243 2442022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 245 246 * VERSION (_MAKE_VERSION): 20220909 247 Merge with NetBSD make, pick up 248 o update unit-tests to handle deprecation of egrep 249 o cond.c: add more details to error message for numeric comparison 250 251 * configure.in: allow for deprecation of egrep 252 253 * Makefile: Linux can handle MANTARGET=man 254 2552022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 256 257 * VERSION (_MAKE_VERSION): 20220903 258 Merge with NetBSD make, pick up 259 o job.c: fix handling of null bytes in output 260 2612022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 262 263 * VERSION (_MAKE_VERSION): 20220902 264 Merge with NetBSD make, pick up 265 o Allow .break to terminate a .for loop early 266 2672022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 268 269 * VERSION (_MAKE_VERSION): 20220901 270 Merge with NetBSD make, pick up 271 o var.c: fix out-of-bounds errors when parsing 272 2732022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 274 275 * VERSION (_MAKE_VERSION): 20220824 276 Merge with NetBSD make, pick up 277 o var.c: revert change to modifier parsing that breaks 278 shell variable references within ':@var@body@' 279 o adjust unit-tests 280 2812022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 282 283 * VERSION (_MAKE_VERSION): 20220818 284 Merge with NetBSD make, pick up 285 o fix exit status for '-q' (since 1994) 286 2872022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 288 289 * VERSION (_MAKE_VERSION): 20220808 290 Merge with NetBSD make, pick up 291 o var.c: fix parsing of modifiers containing unbalanced subexpressions 292 extract parsing of ':D' and ':U' modifiers into separate function 293 2942022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 295 296 * VERSION (_MAKE_VERSION): 20220726 297 298 * Auto-create objdir for bmake/unit-tests if appropriate 299 3002022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 301 302 * VERSION (_MAKE_VERSION): 20220724 303 Merge with NetBSD make, pick up 304 o make.1: describe variable assignment and evaluation more precisely 305 o parse.c: fix out-of-bounds read when parsing an invalid line 306 o var.c: simplify return type of IsShortVarnameValid 307 3082022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 309 310 * VERSION (_MAKE_VERSION): 20220612 311 Merge with NetBSD make, pick up 312 o allow to randomize build order of targets 313 .MAKE.MODE += randomize-targets can help uncover dependency bugs 314 within a makefile. 315 o compat.c: rename Compat_Run to Compat_MakeAll 316 o make.c: inline MakeBuildParent 317 inline make_abort, improve error details 318 o parse.c: reorganize Parse_Error 319 fix memory leak in wildcard targets and sources 320 separate cases in HandleDependencyTargetMundane 321 extract HandleSingleDependencyTargetMundane 322 rename loadfile to LoadFile 323 split IncludeFile into separate functions 324 condense code for searching a file in the paths 325 fix off-by-one error in buffer for .WAIT nodes 326 o str.c: condense Str_Match 327 make code for string matching syntactically more consistent 328 3292022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 330 331 * VERSION (_MAKE_VERSION): 20220418 332 Merge with NetBSD make, pick up 333 o ignore '.POSIX:' if not in first non-comment line 334 of Makefile as specified by POSIX. 335 add unit-tests for above. 336 o meta.c: make it easier to find usage of identifiers 337 o targ.c: add .USEBEFORE to Targ_PrintType 338 3392022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 340 341 * VERSION (_MAKE_VERSION): 20220414 342 343 * unit-tests/Makefile: simplify checks for shells with 344 BROKEN_TESTS, this helps with other Linux distros that 345 use dash. 346 3472022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 348 349 * VERSION (_MAKE_VERSION): 20220330 350 Merge with NetBSD make, pick up 351 o var.c: fix spacing, and a typo in a test 352 3532022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 354 355 * VERSION (_MAKE_VERSION): 20220326 356 Merge with NetBSD make, pick up 357 o parse.c: try to include 'posix.mk' the first time 358 .POSIX: is encountered, to allow for beter POSIX compliance. 359 o var.c: make debug logs more readable 360 prefer 'long long' over 'long' on 32-bit C99 platforms 361 fix crash on .undef of an environment variable 362 3632022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 364 365 * VERSION (_MAKE_VERSION): 20220303 366 Merge with NetBSD make, pick up 367 o tell meta mode unit tests not to expect filemon 368 o cond.c: make debug logging for comparisons less technical 369 o lst.c: fix mem leak in Lst_Remove 370 o str.c: make code for string matching syntactically more consistent 371 o var.c: simplify ParseModifier_Match 372 3732022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 374 375 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 376 377 * VERSION (_MAKE_VERSION): 20220214 378 Merge with NetBSD make, pick up 379 o cond.c: simplify control flow in CondParser_Comparison 380 o job.c: fix echoing of command with '-' in silent target in jobs mode 381 o main.c: prefix the warning about read-only .OBJDIR with a colon 382 o parse.c: remove redundant conditions 383 o var.c: simplify control flow in ModifyWord_SysVSubst 384 3852022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 386 387 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 388 is any chance we have dash as .SHELL 389 390 * VERSION (_MAKE_VERSION): 20220208 391 Merge with NetBSD make, pick up 392 o more unit tests 393 o meta.c: use a variable to hold command line to be filtered 394 to avoid any side effects from content of command line. 395 3962022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 397 398 * VERSION (_MAKE_VERSION): 20220204 399 Merge with NetBSD make, pick up 400 o use unsigned consistently for line numbers, avoid the need for %z 401 o parse.c: do not step off end of input in Parse_IsVar 402 when checking for target local variable assignments 403 4042022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 405 406 * VERSION (_MAKE_VERSION): 20220202 407 Merge with NetBSD make, pick up 408 o remove redundant declaration of HashIter_Init 409 o make DEBUG0 simpler 410 4112022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 412 413 * cast gn->lineno to avoid %z 414 415 * VERSION (_MAKE_VERSION): 20220130 416 Merge with NetBSD make, pick up 417 o more unit tests 418 o make GNode lineno unsigned to please lint 419 o print location of recursive variable references in commands 420 o print "stack trace" (makefile includes) on fatal errors 421 o make.1: refine documentation for target local assignments 422 4232022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 424 425 * VERSION (_MAKE_VERSION): 20220128 426 Merge with NetBSD make, pick up 427 o inline functions called only once 428 o for.c: clean up AddEscape for building the body of a .for loop 429 o hash.c: merge duplicate code for finding an entry in a hash table 430 replace HashEntry_KeyEquals with strncmp 431 o make.1: document quirks of target local variable assignments. 432 o parse.c: cleanup white-space 433 4342022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 435 436 * VERSION (_MAKE_VERSION): 20220126 437 Merge with NetBSD make, pick up 438 o allow setting target local variables 439 o more unit tests 440 o add missing newline after "cannot continue" message 441 o meta.c: clean up eat_dots 442 o parse.c: fix filename in warning about duplicate script 443 o var.c: when expanding nested variables, check simple things first 444 4452022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 446 447 * VERSION (_MAKE_VERSION): 20220116 448 Merge with NetBSD make, pick up 449 o fix for unit-tests/varname-makeflags on non-BSD systems 450 o use Var_Exists rather than Var_Value where appropriate 451 o remove unnecessary functions for expanding variable names 452 o cond.c: inline EvalBare 453 o main.c: lint cleanup 454 o parse.c: condense code in Parse_IsVar 455 use islower for parsing directives (none have upper case) 456 4572022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 458 459 * VERSION (_MAKE_VERSION): 20220112 460 Merge with NetBSD make, pick up 461 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 462 comparion, rarely needed but useful when it is. 463 4642022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 465 466 * VERSION (_MAKE_VERSION): 20220110 467 Merge with NetBSD make, pick up 468 o inline Buf_Clear 469 o remove redundant braces 470 o rename and inline Targ_Precious 471 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 472 o for.c: clean up handling of .for loops 473 fix reported line numbers of continuation lines 474 add details about .for loop variables to stack traces 475 o job.c: reduce code for initializing error handling in shell 476 o main.c: in Cmd_Exec, return error message instead of format string 477 have as few statements as possible between va_start and va_end 478 add debug logging for capturing the output of external commands 479 o make.c: use consistent variable names for varargs 480 o make_malloc.c: remove duplicate code from bmake_strdup 481 o parse.c: add missing printflike annotations 482 remove redundant lines from stack traces 483 fix stack traces in -dp mode 484 reduce confusing code in ParseForLoop 485 fix line number in debug log after returning from a file 486 rename IFile and its fields to match their actual content 487 clean up ParseDependencySources 488 o var.c: shorten ApplyModifier_Assign 489 rename is_shell_metachar, fix character conversion warning 490 merge calls to ApplyModifier_Time 491 merge duplicate code for modifiers 'gmtime' and 'localtime' 492 4932022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 494 495 * parse.c: loadfile restore extra byte in buffer. 496 4972022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 498 499 * VERSION (_MAKE_VERSION): 20220101 500 Merge with NetBSD make, pick up 501 o more unit-tests 502 o remove unnecessary words from command line options in CmdOpts 503 o rename eunlink to unlink_file 504 o cond.c: make ParseWord in condition parser simpler 505 internally return false for irrelevant leaves in conditions 506 replace table for function lookup in conditions with simple code 507 merge duplicate types CondEvalResult and CondResult 508 o for.c: clean up handling of .for loops and .include directives 509 o main.c: constify cached_realpath 510 clean up Cmd_Exec 511 o parse.c: sync API documentation 512 fix error message when reading more than 1 GB from stdin 513 clean up parsing of makefiles 514 fix line number in error message about open conditionals 515 unexport types VarAssignOp and VarAssign 516 clean up function names 517 remove redundant parameters in dependency parsing functions 518 reduce scope of the list of wildcard target names 519 extract OP_NOTARGET into separate function 520 clean up variable names for parsing dependency lines 521 make debug logging a bit more human-friendly 522 o var.c: condense code in ApplyModifier_Assign 523 5242021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 525 526 * VERSION (_MAKE_VERSION): 20211221 527 Merge with NetBSD make, pick up 528 o more unit-tests 529 o style cleanup 530 o in CLEANUP mode, free interned strings at the very end 531 o fix memory leak for filenames in .for loops 532 o buf.c: avoid memory leak 533 o cond.c: condense CondParser_ComparisonOp 534 o hash.c: change return type of HashTable_Set to void 535 o job.c: change return type of Compat_RunCommand from int to bool 536 o main.c: remove bmake_free 537 o parse.c: condense repetetive code in ParseDirective 538 remove dead code for handling traditional include directives 539 clean up parsing of variable assignments 540 remove unreachable code for parsing the dependency operator 541 clean up loading of files 542 fix memory leak in IncludeFile 543 o var.c: fix memory leak when parsing a variable name 544 fix memory leak from ${.SUFFIXES} 545 reduce memory allocation in modifier ':?' and ':C' 546 condense RegexReplace for the modifier ':C' and avoid strlen 547 merge duplicate code for memory handling in Var_Parse 548 distinguish between short-lived and environment variables 549 rename VarFreeEnv to VarFreeShortLived 550 5512021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 552 553 * cond.c: fix mem leak in CondParser_Leaf 554 5552021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 556 557 * VERSION (_MAKE_VERSION): 20211212 558 Merge with NetBSD make, pick up 559 o rename Parse_SetInput to Parse_PushInput 560 o remove remove period from end of error messages and warnings 561 to be more consistent 562 o arch.c: use simpler memory management for parsing archive members 563 o cond.c: rework and reduce recursion 564 o for.c: rename some functions to better reflect purpose 565 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 566 o var.c: in parse errors, mark whitespace more clearly 567 inline ParseEmptyArg into CondParser_FuncCallEmpty 568 minimize calls to LazyBuf_Get in ParseVarnameLong 569 treat .SUFFIXES as a read-only variable 570 5712021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 572 573 * VERSION (_MAKE_VERSION): 20211207 574 Merge with NetBSD make, pick up 575 o inline HashIter_Init 576 o parse.c: inline common subexpression in ParseRawLine 577 o var.c: merge branches for modifiers ':D' and ':U' 578 extract common code into Expr_Words 579 extract common code into Expr_Str 580 move low-level implementation details out of Var_Parse 581 5822021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 583 584 * VERSION (_MAKE_VERSION): 20211206 585 Merge with NetBSD make, pick up 586 o add unit-tests/varmod-loop-delete 587 o for.c: inline Str_Words - reduce memory allocation 588 o parse.c: do not try to expand fixed variable names 589 only allocate the name of an included file if necessary 590 clean up ParseInclude 591 o var.c: fix use-after-free in modifier ':@' 592 save a memory allocation in each modifier ':O' and ':u' 593 save a memory allocation in the modifier ':[...]' 594 in UnexportVars, replace Str_Words with Substring_Words to 595 reduce allocations and copying. 596 5972021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 598 599 * VERSION (_MAKE_VERSION): 20211204 600 Merge with NetBSD make, pick up 601 o flesh out a number of tests 602 o replace enums with bitfields, this simplifies a lot of code. 603 o var.c: refactor ParseModifierPartSubst 604 6052021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 606 607 * VERSION (_MAKE_VERSION): 20211024 608 Merge with NetBSD make, pick up 609 o Punt on write errors - ENOSPC etc. 610 6112021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 612 613 * configure.in: use_defshell, set both DEFSHELL_INDEX 614 and defshell_path if appropriate. 615 This makes it easier to use say the KSH specification with 616 and alternate path for the shell. 617 618 * configure.in compat.c: for SCO we need to force UseShell 619 620 * configure.in: SCO /bin/sh is not usable, provide a list of 621 alternatives for use as .SHELL. 622 We still have to mark some tests as broken, plus more if we end up 623 with ksh as .SHELL. 624 Issue a warning about skipped tests. 625 626 * boot-strap: leave TOOL_DIFF to configure 627 628 * configure.in: on SCO native cc is not usable, 629 gcc is to be found in /usr/gnu/bin 630 and while ancient is at least able to compile bmake. 631 Thus we add /usr/gnu/bin to PATH if it exists, and later 632 check if $CC would have been found via $PATH. 633 If not we set CC to the full path of $CC. 634 Also gnu diff is known to support -u, so if it exists use it. 635 636 * configure.in: move getopt to AC_REPLACE_FUNCS 637 also add AC_C_INLINE - in an attempt to compile using 638 native cc on SCO. 639 640 * configure.in: check for stresep as well as strsep, since we 641 define the later to the former if necessary, and if we have to 642 provide stresep we also need to provide a prototype. 643 644 * configure.in: we no longer need to worry about 645 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 646 647 * make.h: make sure we have __RCSID 648 649 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 650 can control it. 651 6522021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 653 654 * VERSION: 20211020 655 Merge with NetBSD make, pick up 656 o confirm sync of unit-tests 657 6582021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 659 660 * configure.in: check if timezone Europe/Berlin is supported 661 if not try UTC-1 662 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 663 symlink unit-tests -> ../unit-tests/obj so that 664 unit-tests/Makefile.config is put in the right place. 665 * refine filtering of .OBJDIR in unit-tests 666 6672021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 668 669 * Fix unit-tests on Minix 3.2.0 670 o job.c: do not punt if read of token pipe fails for EAGAIN. 671 On Minix at least, we are not ready to read the childExitJob pipe 672 when poll says we are. 673 There should actually be no reason for this pipe to be 674 non-blocking, but while that works fine on {Net,Free}BSD it 675 breaks another test case on Minix. 676 o unit-tests/Makefile: deal with variants of error messages 677 and use of obj as .OBJDIR 678 6792021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 680 681 * configure.in: add sigaction to AC_REPLACE_FUNCS 682 we also need to check for sigaddset etc just for the benefit of 683 sigact.c 684 685 * Add sigact.c as sigaction.c so this "just works". 686 This should have been done back when bmake_signal started using 687 sigaction (I only just noticed that sigact.c wasn't here ;-) 688 Note: I no longer have access to any system where this would matter. 689 6902021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 691 692 * VERSION (_MAKE_VERSION): 20211011 693 694 * Makefile: cleanup a little 695 696 * configure.in: check for sigsetmask 697 6982021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 699 700 * VERSION (_MAKE_VERSION): 20211001 701 Merge with NetBSD make, pick up 702 o reduce locations reducing text size 703 o remove unnecessary const 704 o cond.c: fix lint warning on i386 705 do not allow unquoted 'left == right' after modifier ':?' 706 o hash.c: fix build for DEBUG_HASH_LOOKUP 707 o var.c: fix memory leak in error case of the ':?' modifier 708 7092021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 710 711 * VERSION (_MAKE_VERSION): 20210911 712 Merge with NetBSD make, pick up 713 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 714 7152021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 716 717 * VERSION (_MAKE_VERSION): 20210906 718 Merge with NetBSD make, pick up 719 o more unit tests 720 o lint cleanup 721 o rename some functions to better fit purpose 722 o for.c: cleanup - remove unnecessary optimization 723 fix embedded newlines 724 o parse.c: correct case for CVS/RCS 725 7262021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 727 728 * VERSION (_MAKE_VERSION): 20210808 729 Merge with NetBSD make, pick up 730 o var.c: remove redundant initialization in ApplyModifier_Order 731 732 * mk/options.mk: issue warning for incorrect usage 733 7342021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 735 736 * var.c: use long for :On if we don't have a 64bit int type 737 738 * VERSION (_MAKE_VERSION): 20210803 739 Merge with NetBSD make, pick up 740 o rework varmod-order tests to avoid qsort instability 741 o make.1: clarify :On entry 742 7432021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 744 745 * VERSION (_MAKE_VERSION): 20210731 746 Merge with NetBSD make, pick up 747 o fix some lint issues 748 o more unit tests 749 o var.c: rework of ApplyModifier_Order 750 7512021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 752 753 * util.c: add strto*l if HAVE_STRTO*L not defined 754 755 * VERSION (_MAKE_VERSION): 20210730 756 Merge with NetBSD make, pick up 757 o var.c: add :On and :Orn for numeric sort 758 disabled if no 64bit type available. 759 o _strtol.h: to implement strto*l functions 760 7612021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 762 763 * VERSION (_MAKE_VERSION): 20210704 764 Merge with NetBSD make, pick up 765 o unit-tests: fix some tests to be more portable 766 - job-output-null not all shells do the same number of write calls 767 - objdir-writable if TMPDIR is set; /tmp may not be usable 768 7692021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 770 771 * VERSION (_MAKE_VERSION): 20210701 772 Merge with NetBSD make, pick up 773 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 774 some tests just cannot work in some environments. 775 o buf.c: simpler upper bound for length in Buf_AddInt 776 o cond.c: fix grammar in error message for malformed conditional 777 o for.c: prevent newline injection (from ${.newline}) in .for loops 778 o var.c: use more practical data type in RegexReplace 779 (avoid need for %zu) 780 extract RegexReplace from ModifyWord_SubstRegex 781 7822021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 783 784 * VERSION (_MAKE_VERSION): 20210621 785 Merge with NetBSD make, pick up 786 o var.c: only report error for unmatched regex subexpression 787 when linting (-dL) since we cannot tell when an unmatched 788 subexpression is an expected result. 789 o move unmatched regex subexpression tests to 790 varmod-subst-regex.mk and enable strict (lint) mode 791 7922021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 793 794 * VERSION (_MAKE_VERSION): 20210616 795 Merge with NetBSD make, pick up 796 o more unit tests 797 o cond.c: rename If_Eval to EvalBare 798 improve function names for parsing conditions 799 o job.c: fix error handling of targets that cannot be made 800 o var.c: uncompress code in ApplyModifier_Unique 801 8022021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 803 804 * VERSION (_MAKE_VERSION): 20210518 805 Merge with NetBSD make, pick up 806 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 807 o job.c: Print -de error information when running multiple jobs 808 8092021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 810 811 * VERSION (_MAKE_VERSION): 20210420 812 Merge with NetBSD make, pick up 813 o use C99 bool type 814 o convert VarEvalFlags back into an enum 815 o cond.c: do not complain when skipping the condition 'no >= 10' 816 o hash.c: avoid allocating memory for simple variable names 817 o job.c: use distinct wording for writing to the shell commands file 818 remove type name for the abort status in job handling 819 rename PrintOutput to PrintFilteredOutput to avoid confusion 820 o main.c: avoid double slash in name of temporary directory 821 o var.c: use straight quotes for error 'Bad conditional expression' 822 reduce memory allocations in the modifiers ':D' and ':U' 823 rename members of ModifyWord_LoopArgs 824 clean up pattern flags for the modifiers ':S' and ':C' 825 reduce memory allocation and strlen calls in modifier ':from=to' 826 in the ':Q' modifier, only allocate memory if necessary 827 improve performance for LazyBuf 828 remove redundant parameter from ParseVarnameLong 829 migrate ParseModifierPart to use Substring 830 avoid unnecessary calls to strlen when evaluating modifiers 831 migrate ModifyWord functions to use Substring 832 migrate handling of the modifier ':S,from,to,' to Substring 833 reduce debug logging and memory allocation for ${:U...} 834 reduce verbosity of the -dv debug logging for standard cases 835 clean up debug logging for ':M' and ':N' 836 disallow '$' in the variable name of the modifier ':@' 837 simplify access to the name of an expression during evaluation 838 8392021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 840 841 * VERSION (_MAKE_VERSION): 20210330 842 Merge with NetBSD make, pick up 843 o replace enum bit-field with struct bit-field for VarEvalFlags 844 o rename VARE_NONE to VARE_PARSE_ONLY 845 o var.c: rename ApplyModifiersState to ModChain 846 fix double varname expansion in the variable modifier '::=' 847 change debug log for variable evaluation flags to lowercase 848 8492021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 850 851 * VERSION (_MAKE_VERSION): 20210314 852 Merge with NetBSD make, pick up 853 o var.c: avoid evaluating many modifiers in parse only mode 854 in strict mode (-dL) many variable references are parsed twice, 855 the first time just to report parse errors early, so we want to 856 avoid side effects and wasted effort to the extent possible. 857 8582021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 859 860 * VERSION (_MAKE_VERSION): 20210226 861 Merge with NetBSD make, pick up 862 o remove freestanding freeIt variables 863 link via FStr 864 o var.c: restructure code in ParseVarname to target human readers 865 improve error message for; 866 bad modifier in variable expression 867 unclosed modifier 868 unknown modifier 869 remove redundant parameter of ApplySingleModifier 870 explain non-obvious code around indirect variable modifiers 871 quote ':S' in error message about missing delimiter 872 extract ParseModifier_Match into separate function 873 add context information to error message about ':range' modifier 874 add quotes around variable name in an error message 875 reorder code in ModifyWords 876 use more common parameter order for VarSelectWords 877 make ModifyWord_Subst a little easier to understand 878 do not expand variable name from the command line twice 879 extract ExistsInCmdline from Var_SetWithFlags 880 save a hash map lookup when defining a cmdline variable 881 clean up VarAdd, Var_Delete, Var_ReexportVars 882 use bit-shift expressions for VarFlags constants 883 rename constants for VarFlags 884 rename ExprDefined constants for debug logging 885 rename ExprStatus to ExprDefined 886 split parameters for evaluating variable expressions 887 reduce redundant code around ModifyWords 888 print error about failed shell command before overwriting variable 889 clean up ValidShortVarname, ParseVarnameShort 890 rename VarExprStatus to ExprStatus 891 add functions for assigning the value of an expression 892 rename ApplyModifiersState_Define to Expr_Define 893 condense the code for parsing :S and :C modifiers 894 8952021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 896 897 * VERSION (_MAKE_VERSION): 20210206 898 Merge with NetBSD make, pick up 899 o unit-tests: use private TMPDIR to avoid errors from other users 900 9012021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 902 903 * VERSION (_MAKE_VERSION): 20210205 904 Merge with NetBSD make, pick up 905 o avoid strdup in mkTempFile 906 o always use vfork 907 o rename context and ctxt to scope 908 o rename some VAR constants to SCOPE 909 o Var_ functions, move the scope to the front 910 o use shortcut functions Global_Set and Global_Append 911 o add shortcut Global_Delete for deleting a global variable 912 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 913 o compat.c: when exiting due to an error, print graph information 914 o enum.c: remove overengineered Enum_ValueToString 915 o make.c: remove unused INTERNAL flag 916 remove unused return type of MakeBuildParent 917 o parse.c: replace parse error "Need an operator" with better message 918 o var.c: improve documentation about variable scopes 919 rename Var_ValueDirect to GNode_ValueDirect 920 rename old Var_SetWithFlags to Var_SetExpandWithFlags 921 merge SetVar into Var_SetWithFlags 922 split Var_Exists into plain Var_Exists and Var_ExistsExpand 923 split Var_Append into Var_Append and Var_AppendExpand 924 replace enum bit-set with bit-field 925 o unit-tests/var-op-shell: use kill rather than kill -14 926 which broke on darwin with recent update. 927 9282021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 929 930 * configure.in: check for sig_atomic_t and define it as 'int' 931 if missing. 932 933 * VERSION (_MAKE_VERSION): 20210201 934 Merge with NetBSD make, pick up 935 o use sig_atomic_t for caught_sigchld 936 9372021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 938 939 * VERSION (_MAKE_VERSION): 20210130 940 Merge with NetBSD make, pick up 941 o more unit tests 942 o convert SearchPath to struct 943 o split Buf_Destroy into Buf_Done and Buf_DoneData 944 o for.c: split For_Eval into separate functions 945 rename struct For to struct ForLoop 946 o job.c: do not create empty shell files in jobs mode 947 rename JobOpenTmpFile to JobWriteShellCommands 948 reduce unnecessary calls to waitpid 949 o parse.c: in -dp mode, print stack trace with each diagnostic 950 9512021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 952 953 * VERSION (_MAKE_VERSION): 20210123 954 Merge with NetBSD make, pick up 955 o rename Dir_Expand to SearchPath_Expand 956 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 957 o cond.c: fix debug output for comparison operators in conditionals 958 o dir.c: split Dir_FindFile into separate functions 959 9602021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 961 962 * VERSION (_MAKE_VERSION): 20210120 963 Merge with NetBSD make, pick up 964 o fix some more lint nits 965 o refine some unit tests for portability 966 o cond.c: rework parsing 967 9682021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 969 970 * VERSION (_MAKE_VERSION): 20210110 971 Merge with NetBSD make, pick up 972 o fix lint warnings 973 o consistently use boolean expressions in conditions 974 9752021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 976 977 * VERSION (_MAKE_VERSION): 20210108 978 Merge with NetBSD make, pick up 979 o job.c: back to polling token pipe if we want a token 980 o main.c: always print 'stopped in' on first call 981 The execption is if we bail because of an abort token 982 in which case just exit 6. 983 9842021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 985 986 * VERSION (_MAKE_VERSION): 20210101 987 Merge with NetBSD make, pick up 988 o Happy New Year! 989 o rename CmdOpts.lint to strict 990 o exit 2 on technical errors 991 o replace pointers in controlling conditions with booleans 992 o replace global preserveUndefined with VARE_KEEP_UNDEF 993 o compat.c: re-export variables from the actual make process 994 if using vfork this is the effect anyway 995 o cond.c: clean up VarParseResult constants 996 o for.c: fix undefined behavior in SubstVarLong 997 make control flow in SubstVarLong of .for loops more obvious 998 clean up SubstVarShort in .for loops 999 extract ForSubstBody from ForReadMore 1000 clean up ForReadMore 1001 simplify termination condition for .for loop 1002 add error handling for .for loop items 1003 job.c: re-export variables from the actual make process 1004 parse.c: remove mmap for loading files, only allow files < 1 GiB 1005 fix edge case in := with undefined in variable name 1006 skip variable expansion in ParseDependencyTargetWord 1007 var.c: split ExportVar into separate functions 1008 clean up code in extracted ExportVar functions 1009 remove dead code from ApplyModifiersIndirect 1010 split Var_Subst into easily understandable functions 1011 clean up VarParseResult constants 1012 10132020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1014 1015 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1016 10172020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1018 1019 * VERSION (_MAKE_VERSION): 20201222 1020 Merge with NetBSD make, pick up 1021 o make DEBUG macro return boolean 1022 o parse.c: fix assertion failure for files without trailing newline 1023 o var.c: allow .undef to undefine multiple variables at once 1024 remove excess newline from parse errors 1025 10262020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1027 1028 * VERSION (_MAKE_VERSION): 20201221 1029 Merge with NetBSD make, pick up 1030 o some unit-test updates 1031 10322020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1033 1034 * VERSION (_MAKE_VERSION): 20201220 1035 Merge with NetBSD make, pick up 1036 o more unit tests 1037 o return FStr from Var_Parse and Var_Value 1038 o spell nonexistent consistently 1039 o add str_basename to reduce duplicate code 1040 o compat.c: fix .ERROR_TARGET in compat -k mode 1041 extract InitSignals from Compat_Run 1042 extract UseShell from Compat_RunCommand 1043 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1044 o for.c: rename ForIterate to ForReadMore 1045 o hash.c: clean up hash function for HashTable 1046 o lst.c: rename Vector.priv_cap to cap 1047 o main.c: remove constant parameter from MakeMode 1048 o make.c: use symbolic time for 0 in Make_Recheck 1049 extract MakeChildren from MakeStartJobs 1050 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1051 fix error message for .info/.warning/.error without argument 1052 extract Var_Undef from ParseDirective 1053 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1054 rename mode constants for ParseGetLine to be more expressive 1055 reduce debugging details in Parse_SetInput 1056 fix line numbers in .for loops 1057 split ParseGetLine into separate functions 1058 fix garbled output for failed shell command 1059 var.c: remove redundant assignment in ApplyModifier_SysV 1060 error out on unknown variable modifiers at parse time 1061 remove wrong error message for indirect modifier in lint mode 1062 extract ApplySingleModifier from ApplyModifiers 1063 use FStr for memory management in Var_SetWithFlags 1064 extract SetVar from Var_SetWithFlags 1065 use FStr in VarNew 1066 extract string functions from ApplyModifier_To 1067 error out if .undef has not exactly 1 argument 1068 extract Var_DeleteVar from Var_Delete 1069 extract Var_Undef from ParseDirective 1070 clean up memory management for expanding variable expressions 1071 10722020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1073 1074 * avoid %zu 1075 1076 * lst.c: avoid anonymous union 1077 1078 * VERSION (_MAKE_VERSION): 20201212 1079 Merge with NetBSD make, pick up 1080 o more unit tests 1081 o inline Targ_Ignore and Targ_Silent 1082 o split JobFlags into separate fields 1083 o remove const from function parameters (left overs from refactoring) 1084 o eliminate boolean argument of Var_Export 1085 o make API of Buf_Init simpler 1086 o rename ParseRunOptions to ParseCommandFlags 1087 o replace *line with line[0] 1088 o compat.c: fix wrong exit status for multiple failed main targets 1089 refactor Compat_Run to show the error condition more clearly 1090 don't make .END if the main targets already failed (-k mode) 1091 fix exit status in -k mode if a dependency fails 1092 o for.c: clean up Buf_AddEscaped in .for loops 1093 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1094 make Job_Touch simpler 1095 refactor JobFinish 1096 rename Shell.exitFlag to errFlag 1097 move Job.xtraced to ShellWriter 1098 make printing of shell commands independent from the job 1099 rename shell flags in struct Shell 1100 extract JobOpenTmpFile from JobStart 1101 rename RunFlags to CommandFlags 1102 split various Job.* into separate fields 1103 rename commandShell to shell 1104 extract InitShellNameAndPath from Shell_Init 1105 replace signal handling macros with local functions 1106 replace macro MESSAGE with local function 1107 parse.c: error out on null bytes in makefiles 1108 error out on misspelled directives 1109 rename IFile.nextbuf to readMore 1110 fix undefined behavior in ParseEOF 1111 str.c: remove redundant call to strlen in Str_Words 1112 var.c: error out on misspelled .unexport-env 1113 error out on misspelled .export directives 1114 extract ExportVars from Var_Export 1115 extract ExportVarsExpand from Var_Export 1116 eliminate boolean argument of Var_Export 1117 fix undefined behavior when exporting ${:U } 1118 rename Var_ExportVars to Var_ReexportVars 1119 rename Var_Export1 to ExportVar 1120 11212020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1122 1123 * VERSION (_MAKE_VERSION): 20201206 1124 Merge with NetBSD make, pick up 1125 o more unit tests 1126 o inline macros for debug logging 1127 o use consistent variable names for list nodes 1128 o define constants for enum zero-values 1129 o dir.c: use fixed format for debug output of the directory cache 1130 remove Dir_InitDir 1131 o lst.c: inline Lst_Enqueue, Vector_Done 1132 o meta.c: remove unused parameter from meta_needed 1133 o parse.c: rename parse functions 1134 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1135 o targ.c: don't concatenate identifiers in Targ_PrintType 1136 o var.c: remove comment decoration 1137 extract UnexportVars from Var_UnExport 1138 extract GetVarnamesToUnexport from Var_UnExport 1139 extract UnexportEnv from Var_UnExport 1140 extract UnexportVar from Var_UnExport 1141 move CleanEnv to UnexportVars 1142 replace pointer comparisons with enum 1143 add FStr to var.c to make memory handling simpler 1144 use FStr in Var_UnExport 1145 move type definitions in var.c to the top 1146 extract FreeEnvVar from Var_Parse 1147 extract ShuffleStrings from ApplyModifier_Order 1148 11492020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1150 1151 * VERSION (_MAKE_VERSION): 20201130 1152 Merge with NetBSD make, pick up 1153 o add unit tests for META MODE 1154 o reduce memory allocation for dirSearchPath, GNode.parents, 1155 GNode.children, OpenDirs 1156 o reduce pointer indirection for GNode.cohorts and 1157 GNode.implicitParents 1158 o remove pointer indirection from GNode.commands 1159 o inline Lst_ForEachUntil in meta mode 1160 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1161 clean up memory management for CachedDirs 1162 fix the reference count of dotLast going negative 1163 add debug logging for OpenDirs_Done 1164 extract CacheNewDir from Dir_AddDir 1165 add debug logging for reference counting of CachedDir 1166 rename some Dir functions to SearchPath 1167 o job.c: rename some global variables 1168 o main.c: reduce memory allocation in ReadBuiltinRules 1169 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1170 CmdOpts.makefiles 1171 Add .MAKE.UID and .MAKE.GID 1172 o make.c: reduce memory allocation for/in toBeMade, 1173 Make_ProcessWait, Make_ExpandUse 1174 o meta.c: reduce memory allocation in meta_oodate 1175 o parse.c: reduce memory allocations for parsing dependencies and 1176 targets 1177 o suff.c: reduce memory allocation in suffix handling 1178 11792020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1180 1181 * VERSION (_MAKE_VERSION): 20201124 1182 Merge with NetBSD make, pick up 1183 o .MAKE.{UID,GID} represent uid and gid running make. 1184 o fix error handling for .BEGIN and .END dependency in -k mode 1185 o fix missing "Stop." after failed .END node in -k mode 1186 o use properly typed comparisons in boolean contexts 1187 o replace a few HashTable_CreateEntry with HashTable_Set 1188 o add HashSet type 1189 o compat.c: split Compat_Make into smaller functions 1190 extract DebugFailedTarget from Compat_RunCommand 1191 o dir.c: refactor Dir_UpdateMTime 1192 migrate CachedDir.files from HashTable to HashSet 1193 o make.c: add high-level API for GNode.made 1194 11952020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1196 1197 * VERSION (_MAKE_VERSION): 20201122 1198 Merge with NetBSD make, pick up 1199 o rename GNode.context to vars 1200 o suff.c: cleanup and refactor 1201 rename some functions and vars to better reflect usage 1202 add high-level API for CandidateSearcher 1203 o targ.c: add more debug logging for suffix handling 1204 o more unit tests 1205 o add debug logging for setting and resetting the main target 1206 12072020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1208 1209 * VERSION (_MAKE_VERSION): 20201117 1210 Merge with NetBSD make, pick up 1211 o fix some unit-tests when .SHELL is dash 1212 o rename Targ_NewGN to GNode_New 1213 o make some GNode functions const 1214 o main.c: call Targ_Init before Var_Init 1215 cleanup PrintOnError, getTmpdir and ParseBoolean 1216 o var.c: fix error message of failed :!cmd! modifier 1217 12182020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1219 1220 * VERSION (_MAKE_VERSION): 20201114 1221 Merge with NetBSD make, pick up 1222 o replace a few HashTable_CreateEntry with HashTable_Set 1223 o clean up cached_stats 1224 o rename DEFAULT to defaultNode 1225 o remove redundant struct make_stat 1226 o cond.c: in lint mode, check for ".else <cond>" 1227 use bitset for IfState 1228 replace large switch with if-else in Cond_EvalLine 1229 o job.c: clean up JobExec, JobStart, JobDoOutput 1230 use stderr for error message about failed touch 1231 clean up Job_Touch 1232 replace macro DBPRINTF with JobPrintln 1233 rename JobState to JobStatus 1234 main.c: switch cache for realpath from GNode to HashTable 1235 clean up Fatal 1236 clean up InitDefSysIncPath 1237 use progname instead of hard-coded 'make' in warning 1238 rename Main_SetVarObjdir to SetVarObjdir 1239 make.1: document the -S option 1240 make.c: fix debug output for GNode details 1241 use symbolic names in debug output of GNodes 1242 12432020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1244 1245 * configure.in: fix --with-force-machine-arch 1246 1247 * VERSION (_MAKE_VERSION): 20201112 1248 Merge with NetBSD make, pick up 1249 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1250 checks in InitObjdir. Explicit .OBJDIR target always allows 1251 read-only directory. 1252 o cond.c: clean up Cond_EvalLine 1253 12542020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1255 1256 * VERSION (_MAKE_VERSION): 20201111 1257 Merge with NetBSD make, pick up 1258 o more unit-tests 1259 o style cleanup 1260 remove redundant parentheses from sizeof operator 1261 replace character literal 0 with '\0'. 1262 replace pointer literal 0 with NULL. 1263 remove redundant parentheses. 1264 replace (expr & mask) == 0 with !(expr & mask). 1265 use strict typing in conditions of the form !var 1266 o rename Make_OODate to GNode_IsOODate 1267 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1268 o rename Var_Set_with_flags to Var_SetWithFlags 1269 o rename dieQuietly to shouldDieQuietly 1270 o buf.c: make API of Buf_Init simpler 1271 o compat.c: clean up Compat_Make, Compat_RunCommand, 1272 CompatDeleteTarget and CompatInterrupt 1273 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1274 clean up CondParser_Comparison 1275 o main.c: rename getBoolean and s2Boolean 1276 rename MAKEFILE_PREFERENCE for consistency 1277 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1278 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1279 replace emptyString with allocated empty string 1280 error out on unclosed expressions after the colon 1281 12822020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1283 1284 * VERSION (_MAKE_VERSION): 20201101 1285 Merge with NetBSD make, pick up 1286 o negate NoExecute to GNode_ShouldExecute 1287 o job.c: rename JobMatchShell to FindShellByName 1288 extract EscapeShellDblQuot from JobPrintCommand 1289 extract ParseRunOptions from JobPrintCommand 1290 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1291 treat malformed :range, :ts and :[...] as errors 1292 add tests for the variable modifiers :[words] and :range 1293 12942020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1295 1296 * VERSION (_MAKE_VERSION): 20201031 1297 Merge with NetBSD make, pick up 1298 o format #include directives consistently 1299 o do not look up local variables like .TARGET anywhere else 1300 o main.c: Main_SetObjdir is first called for curdir which may be 1301 readonly 1302 reduce the scope where recursive expressions are detected 1303 remove redundant :tl from getBoolean 1304 clean up mkTempFile 1305 o meta.c: simplify memory allocation in meta_create and meta_oodate 1306 o parse.c: extract loadedfile_mmap from loadfile 1307 o trace.c: document possible undefined behavior with .CURDIR 1308 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1309 rename ismeta to is_shell_metachar 1310 remove debug logging for the :Q variable modifier 1311 rename VarIsDynamic to VarnameIsDynamic 1312 use consistent parameter order in varname parsing functions 1313 extract ParseVarnameLong from Var_Parse 1314 extract ParseVarnameShort from Var_Parse 1315 fix type of ParseModifierPart parameter delim 1316 extract IsEscapedModifierPart from ParseModifierPart 1317 clean up ModifyWords 1318 add test for combining the :@ and :? variable modifiers 1319 13202020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1321 1322 * VERSION (_MAKE_VERSION): 20201030 1323 Merge with NetBSD make, pick up 1324 o change char * to void * in Var_Value 1325 o make iterating over HashTable simpler 1326 o rename VAR_CMD to VAR_CMDLINE 1327 o cond.c: clean up is_separator 1328 fix parse error in string literal in conditional 1329 o main.c: do not use objdir that is not writable 1330 in lint mode, exit with error status on errors 1331 o parse.c: clean up StrContainsWord 1332 fix out-of-bounds pointer in ParseTrackInput 1333 o var.c: rename Str_SYSVMatch and its parameters 1334 remove unsatisfiable conditions in Var_Set_with_flags 1335 document where the variable name is expanded 1336 fix documentation for VARP_SUB_ONE 1337 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 1338 document VAR_READONLY 1339 prevent appending to read-only variables 1340 extract MayExport from Var_Export1 1341 remove redundant evaluations in VarFind 1342 replace VarFindFlags with a simple Boolean 1343 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 1344 13452020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 1346 1347 * VERSION (_MAKE_VERSION): 20201028 1348 Merge with NetBSD make, pick up 1349 o rename defIncPath to defSysIncPath 1350 o initialize all CmdOpts fields 1351 o lst.c: inline Vector_Get 1352 o main.c: refactor main extract 1353 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 1354 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 1355 InitDefIncPath,CmdOpts_Init,UnlimitFiles 1356 o parse.c: merge curFile into includes 1357 rename predecessor to order_pred 1358 sort ParseSpecial alphabetically 1359 remove unused, undocumented .NOEXPORT 1360 rename ParseSpecial enum values consistently 1361 rename some fields of struct IFile 1362 13632020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 1364 1365 * VERSION (_MAKE_VERSION): 20201026 1366 Merge with NetBSD make, pick up 1367 o group the command line options and arguments into a struct 1368 o rename GNode.cmgn to youngestChild 1369 o rename hash functions to identify the type name 1370 o negate OP_NOP and rename it to GNode_IsTarget 1371 o add GNode_Path to access the path of a GNode 1372 o remove macros MIN and MAX 1373 o remove unused Lst_Find and Lst_FindFrom 1374 o arch.c: and make Arch_FindLib simpler 1375 clean up code layout 1376 make Arch_ParseArchive simpler 1377 o cond.c: inline CondFindStrMatch into FuncMake 1378 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 1379 omit trailing space in debug output for expanding file patterns 1380 refactor DirMatchFiles 1381 document that the SearchPath of Dir_FindFile may be NULL 1382 remove UNCONST from Dir_Expand 1383 inline DirFindName 1384 o for.c: clean up code for handling .for loops 1385 o hash.c: print hash in debug log with fixed width 1386 clean up hash table functions 1387 reduce amount of string hashing 1388 o job.c: refactor JobDeleteTarget 1389 use proper enum constants for aborting 1390 convert result of JobStart from macros to enum 1391 convert abort reason macros to enum 1392 rework Job_CheckCommands to reduce indentation 1393 rename Shell fields 1394 add field names in declaration of DEFSHELL_CUSTOM 1395 convert JobState and JobFlags to enum types 1396 move handling of the "..." command to JobPrintCommands 1397 o lst.c: clean up 1398 refactor LstNodeNew 1399 remove Lst_Open, Lst_Next, Lst_Close 1400 remove code for circular lists from Lst_Next 1401 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 1402 /dev/null or anything starting with "no" 1403 convert macros for debug flags into enum 1404 o make.c: inline Lst_Copy in Make_ExpandUse 1405 o meta.c: inline Lst_Find in meta_oodate 1406 make Lst_RemoveIf simpler in meta_oodate 1407 o parse.c: convert error level for Parse_Error to an enum 1408 o suff.c: properly terminate debug output with newline 1409 add more details to DEBUG_SRC log 1410 replace Dir_CopyDir with Dir_CopyDirSearchPath 1411 don't modify GNode name while rebuilding the suffix graph 1412 o var.c: reduce duplicate code in VarFind 1413 14142020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1415 1416 * VERSION (_MAKE_VERSION): 20201022 1417 Merge with NetBSD make, pick up 1418 o more refactoring and simplification to reduce code size 1419 o var.c: extract CanonicalVarname from VarFind 1420 o make.c: extract UpdateImplicitParentsVars from Make_Update 1421 o main.c: extract PrintVar from doPrintVars 1422 extract HandlePWD from main 1423 o lst.c: inline simple Lst getters 1424 remove unused Lst_ForEach 1425 o job.c: move struct Shell from job.h to job.c 1426 o more unit tests 1427 14282020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 1429 1430 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 1431 14322020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1433 1434 * VERSION (_MAKE_VERSION): 20201018 1435 Merge with NetBSD make, pick up 1436 o remove USE_IOVEC 1437 o rename some Hash_* apis to Hash* 1438 o replace execError with execDie 1439 o rename Lst_Init to Lst_New 1440 o add tags to enum types 1441 o rename Stack to Vector 1442 o parse.c: more refactoring 1443 o unit-tests: make some tests use line buffered stdout 1444 o unit-tests/Makefile: in meta mode do not make all tests depend on 1445 Makefile, it isn't necessary. 1446 14472020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 1448 1449 * main.c: check for CTL_HW being defined. 1450 * unit-tests/Makefile: ensure export tests output are POSIX compliant 1451 disable opt-debug-jobs test until it works on ubuntu 1452 1453 * VERSION (_MAKE_VERSION): 20201010 1454 Merge with NetBSD make, pick up 1455 o dir.c: remove pathname limit for Dir_FindHereOrAbove 1456 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 1457 o main.c: extract init_machine and init_machine_arch from main 1458 allow to disable debug logging options 1459 o parse.c: enable format string truncation warnings 1460 extract parsing of sources from ParseDoDependency 1461 split ParseDoSrc into smaller functions 1462 hide implementation details from Parse_DoVar 1463 clean up parsing of variable assignments 1464 split Parse_DoVar into manageable pieces 1465 don't modify the given line during Parse_DoVar 1466 fix out-of-bounds memory access in Parse_DoVar 1467 fix parsing of the :sh assignment modifier 1468 o var.c: rework memory allocation for the name of variables 1469 extract ApplyModifier_Literal into separate function 1470 in lint mode, reject modifiers without delimiter 1471 do not export variable names starting with '-' 1472 o fix double-free bug in -DCLEANUP mode 1473 o more cleanup to enable higher warnings level 1474 o more unit tests 1475 14762020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 1477 1478 * VERSION (_MAKE_VERSION): 20201002 1479 Merge with NetBSD make, pick up 1480 o dir.c: use hash table for looking up open directories by name 1481 o main.c: clean up option handling 1482 o parse.c: add missing const for Parse_AddIncludeDir 1483 o var.c: ApplyModifier_To, update pp in each branch 1484 o remove redundant function prototypes 1485 o more unit tests 1486 14872020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1488 1489 * VERSION (_MAKE_VERSION): 20201001 1490 Merge with NetBSD make, pick up 1491 o compat.c: comment about "..." 1492 14932020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 1494 1495 * VERSION (_MAKE_VERSION): 20200930 1496 Merge with NetBSD make, pick up 1497 o job.c: split Job.jobPipe into 2 separate fields 1498 replace Lst_Open with direct iteration 1499 o lst.c: remove redundant assertions 1500 o targ.c: replace Lst_Open with direct iteration 1501 o var.c: fix bug in evaluation of indirect variable modifiers 1502 extract ApplyModifier_Quote into separate function 1503 o make debug logging simpler 1504 15052020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 1506 1507 * VERSION (_MAKE_VERSION): 20200927 1508 Merge with NetBSD make, pick up 1509 o parse.c: ensure parse errors result in 'stopped in' message. 1510 o compat.c: make parameter of Compat_RunCommand const 1511 o main.c: extract InitVarTarget from main 1512 o parse.c: rename ParseFinishLine to FinishDependencyGroup 1513 refactor ParseDoDependency 1514 o var.c: Var_Subst no longer returns string result 1515 rename Var_ParsePP back to Var_Parse 1516 in lint mode, improve error handling for undefined variables 1517 extract ParseVarname from Var_Parse 1518 o rename Lst_ForEach to Lst_ForEachUntil 1519 o inline Lst_ForEachUntil in several cases 1520 o clean up API for finding and creating GNodes 1521 o fix assertion failure in -j mode with .END node 1522 o inline and remove LstNode_Prev and LstNode_Next 1523 o use fine-grained type names for lists and their nodes 1524 o more unit tests 1525 15262020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1527 1528 * VERSION (_MAKE_VERSION): 20200911 1529 Merge with NetBSD make, pick up 1530 o cond.c: split EvalComparison into smaller functions 1531 reorder parameters of condition parsing functions 1532 reduce code size in CondParser_Eval 1533 rename CondGetString to CondParser_String 1534 add CondLexer_SkipWhitespace 1535 group the condition parsing state into a struct 1536 in CondGetString, replace repeated Buf_Add with Buf_AddStr 1537 o migrate Var_Parse to Var_ParsePP 1538 o add wrappers around ctype.h functions 1539 o lst.c: use a stack instead of a list for the nested include path 1540 o more unit tests 1541 15422020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 1543 1544 * make-bootstrap.sh.in: adjust object list 1545 15462020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1547 1548 * VERSION (_MAKE_VERSION): 20200902 1549 Merge with NetBSD make, pick up 1550 o use make_stat to ensure no confusion over valid fields 1551 returned by cached_stat 1552 o var.c: make VarQuote const-correct 1553 o add unit tests for .for 1554 15552020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1556 1557 * VERSION (_MAKE_VERSION): 20200901 1558 Merge with NetBSD make, pick up 1559 o rename Hash_Table fields 1560 o make data types in Dir_HasWildcards more precise 1561 15622020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 1563 1564 * VERSION (_MAKE_VERSION): 20200831 1565 Merge with NetBSD make, pick up 1566 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 1567 o lst.c: Lst_Open renable assert that list isn't open 1568 o unit test for .TARGET dependent flags 1569 o var.c: fix aliasing bug in VarUniq 1570 o more unit tests for :u 1571 15722020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 1573 1574 * VERSION (_MAKE_VERSION): 20200830 1575 Merge with NetBSD make, pick up 1576 o allow for strict type checking for Boolean 1577 o Var_Parse never returns NULL 1578 o Var_Subst never returns NULL 1579 o Lst_Find now takes boolean match function 1580 o rename Lst_Memeber to Lst_FindDatum 1581 o rename LstNode functions to match their type 1582 o rename GNode.iParents to implicitParents 1583 o fix assertion failure for .SUFFIXES in archives 1584 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 1585 remove unreachable code from CompatRunCommand 1586 o main.c: simplify getBoolean 1587 o stc.c: replace brk_string with simpler Str_Words 1588 o suff.c: add debug macros 1589 15902020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 1591 1592 * VERSION (_MAKE_VERSION): 20200828 1593 Merge with NetBSD make, pick up 1594 o lst.c: inline LstIsValid and LstNodeIsValid 1595 o remove trailing S from Lst function names after migration complete 1596 o more comment cleanup/clarification 1597 o suff.c: clean up suffix handling 1598 o more unit tests 1599 16002020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 1601 1602 * VERSION (_MAKE_VERSION): 20200826 1603 Merge with NetBSD make, pick up 1604 o enum.c: distinguish between bitsets containing flags and 1605 ordinary enums 1606 o var.c: fix error message for ::!= modifier with shell error 1607 o fix bugs in -DCLEANUP mode 1608 16092020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1610 1611 * VERSION (_MAKE_VERSION): 20200824 1612 Merge with NetBSD make, pick up 1613 o in debug mode, print GNode details in symbols 1614 16152020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 1616 1617 * VERSION (_MAKE_VERSION): 20200823 1618 Merge with NetBSD make, pick up 1619 o lst.c: more asserts, 1620 make args to Lst_Find match others. 1621 o var.c: pass flags to VarAdd 1622 o arch.c: use Buffer 1623 o str.c: brk_string return size_t for nwords 1624 o more unit tests 1625 16262020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 1627 1628 * VERSION (_MAKE_VERSION): 1629 Merge with NetBSD make, pick up 1630 o var.c: support for read-only variables eg .SHELL 1631 being the shell used to run scripts. 1632 o lst.c: more simplification 1633 o more documentation and style cleanup 1634 o more unit tests 1635 o ensure unit-test/Makefile is run by TEST_MAKE 1636 o reduce duplication of header inclusion 1637 16382020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 1639 1640 * VERSION (_MAKE_VERSION): 20200821 1641 Merge with NetBSD make, pick up 1642 o lst.c: revert invalid assertion - but document it 1643 o dir.c: split Dir_Init into two functions 1644 16452020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 1646 1647 * lst.c: needs inttypes.h on Linux 1648 1649 * VERSION (_MAKE_VERSION): 20200820 1650 Merge with NetBSD make, pick up 1651 o make.1: clarify some passages 1652 o var.c: more cleanup, clarify comments 1653 o make_malloc.c: remove unreachable code 1654 o cond.c: make CondGetString easier to debug 1655 o simplify list usage 1656 o unit-tests: more 1657 16582020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 1659 1660 * VERSION (_MAKE_VERSION): 20200816 1661 Merge with NetBSD make, pick up 1662 o refactor unit-tests to be more fine grained 1663 not all tests moved yet 1664 16652020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 1666 1667 * VERSION (_MAKE_VERSION): 20200814 1668 Merge with NetBSD make, pick up 1669 o more str_concat variants 1670 o more enums for flags 1671 o var.c: cleanup for higher warnings level 1672 16732020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 1674 1675 * VERSION (_MAKE_VERSION): 20200810 1676 Merge with NetBSD make, pick up 1677 o more unit tests 1678 o general comment and style cleanup 1679 16802020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1681 1682 * VERSION (_MAKE_VERSION): 20200808 1683 Merge with NetBSD make, pick up 1684 o enum.[ch]: streamline, enums for use in flags and debug output 1685 o cond.c: cleanup 1686 o var.c: reduce duplicate code for modifiers 1687 debug logging for Var_Parse 1688 more detailed debug output 1689 o more unit tests 1690 16912020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 1692 1693 * unit-tests/Makefile: -r for recursive and include Makefile.inc 1694 so I can run tests in meta mode 1695 supress extra noise if in meta mode 1696 1697 * VERSION (_MAKE_VERSION): 20200806 1698 Merge with NetBSD make, pick up 1699 o parse.c: remove VARE_WANTRES for LINT 1700 we just want to check parsing (for now). 1701 17022020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 1703 1704 * VERSION (_MAKE_VERSION): 20200805 1705 Merge with NetBSD make, pick up 1706 o make.1: Rework the description of dependence operators 1707 17082020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1709 1710 * VERSION (_MAKE_VERSION): 20200803 1711 Merge with NetBSD make, pick up 1712 o revert some C99 usage, for max portability 1713 o unit-tests/lint 1714 17152020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 1716 1717 * VERSION (_MAKE_VERSION): 20200802 1718 Merge with NetBSD make, pick up 1719 o more unit tests 1720 17212020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 1722 1723 * Remove NetBSD specific plumbing from unit-tests/Makefile 1724 1725 * VERSION (_MAKE_VERSION): 20200801 1726 Merge with NetBSD make, pick up 1727 o make Var_Value return const 1728 o size_t for buf sizes 1729 o optimize some buffer operations - avoid strlen 1730 17312020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1732 1733 * VERSION (_MAKE_VERSION): 20200731 1734 Merge with NetBSD make, pick up 1735 o var.c: fix undefinded behavior for incomplete :t modifier 1736 fixes unit-test/moderrs on Ubuntu 1737 o parse.c: When parsing variable assignments other than := 1738 if DEBUG(LINT) test substition of value, so we get a file and 1739 line number in the resulting error. 1740 o dir.c: fix parsing of nested braces in dependency lines 1741 add unit-tests 1742 17432020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1744 1745 * VERSION (_MAKE_VERSION): 20200730 1746 Merge with NetBSD make, pick up 1747 o var.c: minor cleanup 1748 o unit-tests: more tests to improve code coverage 1749 17502020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 1751 1752 * VERSION (_MAKE_VERSION): 20200728 1753 Merge with NetBSD make, pick up 1754 o var.c: more optimizations 1755 17562020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1757 1758 * VERSION (_MAKE_VERSION): 20200726 1759 Merge with NetBSD make, pick up 1760 o collapse lsd.lib into lst.c - reduce code size and allow inlining 1761 o lots of function comment updates 1762 o var.c: more optimizations 1763 o make return of Var_Parse const 1764 17652020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 1766 1767 * VERSION (_MAKE_VERSION): 20200720 1768 Merge with NetBSD make, pick up 1769 o DEBUG_HASH report stats at end and tone down the noise 1770 o var.c: each flag type gets its own prefix. 1771 move SysV string matching to var.c 1772 make ampersand in ${VAR:from=to&} an ordinary character 1773 cleanup and simplify implementation of modifiers 1774 o make.1: move documentation for assignment modifiers 1775 17762020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 1777 1778 * VERSION (_MAKE_VERSION): 20200718 1779 Merge with NetBSD make, pick up 1780 o DEBUG_HASH to see how well the hash tables are working 1781 17822020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 1783 1784 * bsd.after-import.mk: make sure we update unit-tests/Makefile 1785 17862020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 1787 1788 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 1789 1790 * VERSION (_MAKE_VERSION): 20200710 1791 Merge with NetBSD make, pick up 1792 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 1793 o meta.c: target flagged .META is out-of-date if meta file missing 1794 17952020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 1796 1797 * VERSION (_MAKE_VERSION): 20200709 1798 Merge with NetBSD make, pick up 1799 o cond.c: fix for compare_expression when doEval=0 1800 o unit-tests/Makefile: rework 1801 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 1802 18032020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1804 1805 * VERSION (_MAKE_VERSION): 20200704 1806 Merge with NetBSD make, pick up 1807 (most of this by rillig@) 1808 o lots of style and white-space cleanup 1809 o lots more unit tests for variable modifiers 1810 o simplified description of some functions 1811 o str.c: refactor Str_Match 1812 o var.c: debugging output for :@ 1813 constify VarModify parameter 1814 fix :hash modifier on 16-bit platforms 1815 remove unnecessary forward declarations 1816 refactor ApplyModifier_SysV to have less indentation 1817 simplify code for :E and :R 1818 clean up code for :H and :T 1819 refactor ApplyModifiers 1820 1821 * var.c: we need stdint.h on some platforms to get uint32_t 1822 * unit-test/Makefile: we need to supress the specific error 1823 for RE substitution error in modmisc, since it varies accross 1824 different OS. 1825 18262020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 1827 1828 * VERSION (_MAKE_VERSION): 20200702 1829 Merge with NetBSD make, pick up 1830 o var.c: more improvements to avoiding unnecessary evaluation 1831 use enums for flags 1832 o remove flags arg to Var_Set which outside of var.c is always 0 1833 18342020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1835 1836 * VERSION (_MAKE_VERSION): 20200701 1837 Merge with NetBSD make, pick up 1838 o var.c: with change to cond.c; ensure that nested variables 1839 within a variable name are expanded. 1840 o unit-tests/varmisc.mk: test for nested varname 1841 18422020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 1843 1844 * VERSION (_MAKE_VERSION): 20200629 1845 Merge with NetBSD make, pick up 1846 o cond.c: do not eval unnecessary terms of conditionals. 1847 18482020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 1849 1850 * VERSION (_MAKE_VERSION): 20200625 1851 Merge with NetBSD make, pick up 1852 o meta.c: report error if lseek in filemon_read fails 1853 18542020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 1855 1856 * VERSION (_MAKE_VERSION): 20200622 1857 Merge with NetBSD make, pick up 1858 o dieQuietly: ignore OP_SUBMAKE as too aggressive 1859 18602020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 1861 1862 * VERSION (_MAKE_VERSION): 20200619 1863 Merge with NetBSD make, pick up 1864 o str.c: performance improvement for Str_Match for multiple '*' 1865 o dieQuietly: supress the failure output from make 1866 when failing node is a sub-make or a sibling failed. 1867 This cuts down greatly on unhelpful noise at the end of 1868 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 1869 18702020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 1871 1872 * FILES: add LICENSE to appease some packagers. 1873 This is an attempt to fairly represent the license on almost 1874 200 files, which are almost all BSD-3-Clause 1875 The few exceptions being more liberal. 1876 1877 * VERSION (_MAKE_VERSION): 20200610 1878 Merge with NetBSD make, pick up 1879 o unit test for :Or 1880 18812020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 1882 1883 * VERSION (_MAKE_VERSION): 20200606 1884 Merge with NetBSD make, pick up 1885 o make.1: cleanup 1886 1887 * Makefile: fix depends for main.o which broke MAKE_VERSION 1888 18892020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 1890 1891 * VERSION (_MAKE_VERSION): 20200605 1892 Merge with NetBSD make, pick up 1893 o dir.c: cached_stats - don't confuse stat and lstat results. 1894 o var.c: add :Or for reverse sort. 1895 18962020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 1897 1898 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 1899 also if --with-filemon= specifies path to filemon.h 1900 set use_filemon=dev 1901 * dirname.c: remove include of namespace.h 1902 19032020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 1904 1905 * VERSION (_MAKE_VERSION): 20200517 1906 Merge with NetBSD make, pick up 1907 o modified dollar tests to avoid shell dependencies 1908 o new tests for .INCLUDEFROM 1909 19102020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 1911 1912 * unit-tests/dollar.mk: tweak '1 dollar literal' test 1913 to not depend so much on shell behavior 1914 19152020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 1916 1917 * VERSION (_MAKE_VERSION): 20200510 1918 Merge with NetBSD make, pick up 1919 o unit test for dollar handling 1920 19212020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 1922 1923 * VERSION (_MAKE_VERSION): 20200506 1924 Merge with NetBSD make, pick up 1925 o str.c: empty string does not match % pattern 1926 plus unit-test changes 1927 19282020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 1929 1930 * VERSION (_MAKE_VERSION): 20200504 1931 May the 4th be with you 1932 Merge with NetBSD make, pick up 1933 o var.c: import handling of old sysV style modifier using '%' 1934 o str.c: refactor brk_string 1935 o unit-tests: add test case for lazy conditions 1936 19372020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1938 1939 * VERSION (_MAKE_VERSION): 20200418 1940 1941 * configure.in: use_makefile=no for cygwin et al. 1942 case insensitive filesystems just don't work if both 1943 makefile and Makefile exist. 1944 NOTE: bmake does not support cygwin and likely never will, 1945 but if brave souls want to try it - help them out. 1946 19472020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 1948 1949 * VERSION (_MAKE_VERSION): 20200402 1950 Merge with NetBSD make, pick up 1951 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 1952 a blank command is perfectly valid. 1953 19542020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1955 1956 * VERSION (_MAKE_VERSION): 20200330 1957 Merge with NetBSD make, pick up 1958 o make.h: extern debug_file 1959 19602020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 1961 1962 * VERSION (_MAKE_VERSION): 20200318 1963 Merge with NetBSD make, pick up 1964 o meta.c: meta_oodate, check for corrupted meta file 1965 earlier and more often. 1966 19672020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 1968 1969 * VERSION (_MAKE_VERSION): 20200220 1970 19712020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 1972 1973 * boot-strap: unset MAKEFLAGS 1974 19752020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 1976 1977 * VERSION (_MAKE_VERSION): 20200212 1978 * meta.c: meta_compat_parent check for USE_FILEMON 1979 patch from Soeren Tempel 1980 19812020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1982 1983 * VERSION: 20200205 1984 Merge with NetBSD make, pick up 1985 o meta.c: fix compat mode, need to call meta_job_output() 1986 o job.c: extra fds for meta mode not needed if using filemon_dev 1987 19882020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 1989 1990 * VERSION: 20200122 1991 Merge with NetBSD make, pick up 1992 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 1993 returns FALSE. 1994 19952020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 1996 1997 * VERSION: 20200121 1998 Merge with NetBSD make, pick up 1999 o filemon/filemon_{dev,ktrace}.c: allow selection of 2000 filemon implementation. filemon_dev.c uses the kernel module 2001 while filemon_ktrace.c leverages the fktrace api available in 2002 NetBSD. filemon_ktrace.c can hopefully form the basis for 2003 adding support for other tracing mechanisms such as strace on 2004 Linux. 2005 o meta.c: when target is out-of-date per normal make rules 2006 record value of .OODATE in meta file. 2007 20082019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2009 2010 * VERSION: 20190926 2011 Merge with NetBSD make, pick up 2012 o parse.c: don't pass NULL to realpath(3) 2013 some versions cannot handle it. 2014 20152019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2016 2017 * VERSION: 20190409 2018 Merge with NetBSD make, pick up 2019 o parse.c: ParseDoDependency: free paths rather than assert 2020 20212018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2022 2023 * VERSION: 20181222 2024 2025 * configure.in: add --without-makefile to avoid generating 2026 makefile and make-bootstrap.sh 2027 2028 * include Makefile.inc if it exists 2029 2030 * Use Makefile and Makefile.config.in in unit-tests 2031 so we can use just: make obj && make && make test 2032 when bmake is already available. 2033 We add --without-makefile to CONFIGURE_ARGS in this case. 2034 2035 * tweak bsd.after-import.mk (captures Makefile.config etc 2036 after import to FreeBSD for example) to cope with all the above. 2037 20382018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2039 2040 * VERSION: 20181221 2041 Merge with NetBSD make, pick up 2042 o parse.c: ParseVErrorInternal use .PARSEDIR 2043 and apply if relative, and then use .PARSEFILE 2044 for consistent result. 2045 20462018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2047 2048 * VERSION: 20181220 2049 Merge with NetBSD make, pick up 2050 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2051 is relative 2052 o var.c: avoid SEGFAULT in .unexport-env 2053 when MAKELEVEL is not set 2054 20552018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2056 2057 * VERSION: 20181216 2058 Merge with NetBSD make, pick up 2059 o fix for unit-tests/varquote.mk on Debian 2060 20612018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2062 2063 * VERSION: 20180919 2064 Merge with NetBSD make, pick up 2065 o var.c: add :q 2066 o dir.c: cleanup caching of stats 2067 20682018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2069 2070 * Makefile.config.in: use += where it makes sense. 2071 20722018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2073 2074 * VERSION: 20180512 2075 Merge with NetBSD make, pick up 2076 o job.c: skip polling job token pipe 2077 20782018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2079 2080 * VERSION: 20180405 2081 Merge with NetBSD make, pick up 2082 o parse.c: be more cautious about detecting depenency line 2083 rather than sysV style include. 2084 20852018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2086 2087 * VERSION: 20180222 2088 Merge with NetBSD make, pick up 2089 o parse.c: avoid calling sysconf for every call to loadfile 2090 20912018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2092 2093 * VERSION: 20180218 2094 Merge with NetBSD make, pick up 2095 o var.c: Var_Set handle NULL value anytime. 2096 20972018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2098 2099 * VERSION: 20180212 2100 Merge with NetBSD make, pick up 2101 o parse.c: do not treat .info as warning with -W 2102 21032017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2104 2105 * VERSION: 20171207 2106 Merge with NetBSD make, pick up 2107 o var.c: Var_Append use Var_Set if var not previously set 2108 so that VAR_CMD is handled correctly. 2109 Add a suitable unit-test. 2110 21112017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2112 2113 * VERSION (_MAKE_VERSION): 20171126 2114 2115 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2116 since AC_TRY_COMPILE puts input inside main() 2117 which upsets modern compilers. 2118 21192017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2120 2121 * VERSION: 20171118 2122 Merge with NetBSD make, pick up 2123 o var.c: do not append to variable set on command line 2124 add unit-test to catch this. 2125 21262017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2127 2128 * VERSION: 20171028 2129 Merge with NetBSD make, pick up 2130 o main.c: ignore empty MAKEOBJDIR 2131 2132 * Makefile.config.in: 2133 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2134 21352017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2136 2137 * VERSION: 20171005 2138 2139 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2140 consistent result on some platforms. 2141 21422017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2143 2144 * machine.sh: entry for AIX 2145 21462017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2147 2148 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2149 to a file that can be included by configure as well as make. 2150 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2151 21522017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2153 2154 * Makefile (_MAKE_VERSION): 20170810 2155 Merge with NetBSD make, pick up 2156 o meta.c: if target is in subdir we only need subdir name in 2157 meta_name. 2158 21592017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2160 2161 * Makefile (_MAKE_VERSION): 20170720 2162 Merge with NetBSD make, pick up 2163 o compat.c: pass SIGINT etc onto child and wait for it to exit 2164 before we self-terminate. 2165 21662017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2167 2168 * Makefile (_MAKE_VERSION): 20170711 2169 forgot to update after merge on 20170708 ;-) 2170 o main.c: refactor to reduce size of main function. 2171 add -v option to always fully expand values. 2172 o meta.c: ensure command output in meta file has ending newline 2173 even when filemon not being used. 2174 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2175 pathname via ':L' since any ':' in pathname breaks that. 2176 Instead set a '${.p.}' to pathname in the target context and 2177 use that. 2178 21792017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2180 2181 * Makefile (_MAKE_VERSION): 20170510 2182 Merge with NetBSD make, pick up 2183 o main.c: Main_SetObjdir: ensure buf2 is in scope 2184 21852017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2186 2187 * Makefile (_MAKE_VERSION): 20170505 2188 see mk/ChangeLog 2189 21902017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2191 2192 * parse.c: not everyone has stdint.h 2193 21942017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2195 2196 * Makefile (_MAKE_VERSION): 20170501 2197 see mk/ChangeLog 2198 21992017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2200 2201 * Makefile (_MAKE_VERSION): 20170421 2202 Merge with NetBSD make, pick up 2203 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2204 22052017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2206 2207 * Makefile (_MAKE_VERSION): 20170420 2208 Merge with NetBSD make, pick up 2209 o main.c: only use -C arg "as is" if it contains no 2210 relative component. 2211 22122017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2213 2214 * Makefile (_MAKE_VERSION): 20170418 2215 Merge with NetBSD make, pick up 2216 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2217 22182017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2219 2220 * Makefile (_MAKE_VERSION): 20170417 2221 Merge with NetBSD make, pick up 2222 o fixes a number of coverity complaints 2223 - check return value of fseek, fcntl 2224 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2225 JobPrintCommand, ParseTraditionalInclude 2226 - use bmake_malloc() where NULL is not tollerated 2227 - use MAKE_ATTR_UNUSED rather that kludges like 2228 return(unused ? 0 : 0) 2229 - use purge_cached_realpaths() rather than abuse cached_realpath() 2230 22312017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2232 2233 * Makefile (_MAKE_VERSION): 20170413 2234 Merge with NetBSD make, pick up 2235 o main.c: when setting .OBJDIR ignore '$' in paths. 2236 2237 * job.c: use MALLOC_OPTIONS to set malloc_options. 2238 22392017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2240 2241 * Makefile (_MAKE_VERSION): 20170411 2242 Merge with NetBSD make, pick up 2243 o str.c: Str_Match: allow [^a-z] to behave as expected. 2244 22452017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2246 2247 * Makefile (_MAKE_VERSION): 20170326 2248 Merge with NetBSD make, pick up 2249 o main.c: purge relative paths from realpath cache when .OBJDIR 2250 is changed. 2251 22522017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2253 2254 * Makefile (_MAKE_VERSION): 20170311 2255 Merge with NetBSD make, pick up 2256 o main.c: only use -C arg "as is" if it starts with '/'. 2257 22582017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2259 2260 * Makefile (_MAKE_VERSION): 20170301 2261 Merge with NetBSD make, pick up 2262 o main.c: use -C arg "as is" rather than getcwd() 2263 if they identify the same directory. 2264 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2265 22662017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2267 2268 * Makefile (_MAKE_VERSION): 20170201 2269 Merge with NetBSD make, pick up 2270 o var.c: allow :_=var and avoid use of special context. 2271 22722017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2273 2274 * Makefile (_MAKE_VERSION): 20170130 2275 Merge with NetBSD make, pick up 2276 o var.c: add :range and :_ 2277 o main.c: partially initialize Dir_* before MainParseArgs() 2278 can be called. 2279 If -V, skip Main_ExportMAKEFLAGS() 2280 22812017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2282 2283 * Makefile (_MAKE_VERSION): 20170114 2284 Merge with NetBSD make, pick up 2285 o var.c: allow specifying the utc value used by :{gm,local}time 2286 22872016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2288 2289 * Makefile (_MAKE_VERSION): 20161212 2290 Merge with NetBSD make, pick up 2291 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2292 22932016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2294 2295 * Makefile (_MAKE_VERSION): 20161209 2296 Merge with NetBSD make, pick up 2297 o main.c: cleanup setting of .OBJDIR 2298 o parse.c: avoid coredump from (var)=val 2299 23002016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2301 2302 * Makefile (_MAKE_VERSION): 20161126 2303 Merge with NetBSD make, pick up 2304 o make.c: Make_OODate: report src node name if path not set 2305 23062016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2307 2308 * Makefile (_MAKE_VERSION): 20160926 2309 Merge with NetBSD make, pick up 2310 o support for .DELETE_ON_ERROR: (remove targets that fail) 2311 23122016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2313 2314 * Makefile MAN: tweak .Dt to match ${PROG} 2315 23162016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2317 2318 * Makefile (_MAKE_VERSION): 20160818 2319 its a neater number; pick up whitespace fixes to man page. 2320 23212016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2322 2323 * Makefile (_MAKE_VERSION): 20160817 2324 Merge with NetBSD make, pick up 2325 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2326 so we can call it before adding entries to missingFiles. 2327 Thus we do not track files we have been told to ignore. 2328 23292016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2330 2331 * Makefile (_MAKE_VERSION): 20160815 2332 Merge with NetBSD make, pick up 2333 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 2334 pathnames, and skip if the expansion is empty. 2335 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 2336 23372016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2338 2339 * Makefile (_MAKE_VERSION): 20160812 2340 Merge with NetBSD make, pick up 2341 o meta.c: remove all missingFiles entries that match a deleted 2342 dir. 2343 o main.c: set .ERROR_CMD if possible. 2344 23452016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2346 2347 * Makefile (_MAKE_VERSION): 20160606 2348 Merge with NetBSD make, pick up 2349 o dir.c: extend mtimes cache to others via cached_stat() 2350 23512016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2352 2353 * Makefile (_MAKE_VERSION): 20160604 2354 Merge with NetBSD make, pick up 2355 o meta.c: missing filemon data is only relevant if we read a 2356 meta file. 2357 Also do not return oodate for a missing metafile if gn->path 2358 points to .CURDIR 2359 23602016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2361 2362 * Makefile (_MAKE_VERSION): 20160602 2363 Merge with NetBSD make, pick up 2364 o cached_realpath(): avoid hitting filesystem more than necessary. 2365 o meta.c: refactor need_meta decision, add knobs for 2366 missing meta file and filemon data wrt out-of-datedness. 2367 23682016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2369 2370 * Makefile (_MAKE_VERSION): 20160528 2371 2372 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 2373 23742016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2375 2376 * Makefile (_MAKE_VERSION): 20160512 2377 Merge with NetBSD make, pick up 2378 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 2379 this is useful for gcov builds. 2380 o propagate errors from filemon(4). 2381 23822016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 2383 2384 * Makefile (_MAKE_VERSION): 20160509 2385 Merge with NetBSD make, pick up 2386 o remove use of non-standard types u_int etc. 2387 o meta.c: apply realpath() before matching against metaIgnorePaths 2388 23892016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 2390 2391 * Makefile (_MAKE_VERSION): 20160404 2392 Merge with NetBSD make, pick up 2393 o allow makefile to set .MAKE.JOBS 2394 2395 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 2396 23972016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 2398 2399 * Makefile (_MAKE_VERSION): 20160315 2400 Merge with NetBSD make, pick up 2401 o fix handling of archive members 2402 24032016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2404 2405 * Makefile (_MAKE_VERSION): rename variable to avoid interference 2406 with checks for ${MAKE_VERSION} 2407 24082016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 2409 2410 * Makefile (MAKE_VERSION): 20160310 2411 Merge with NetBSD make, pick up 2412 o meta.c: treat missing Read file same as Write, incase we Delete it. 2413 24142016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 2415 2416 * Makefile (MAKE_VERSION): 20160307 2417 Merge with NetBSD make, pick up 2418 o var.c: fix :ts\nnn to be octal by default. 2419 o meta.c: meta_finish() to cleanup memory. 2420 24212016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 2422 2423 * Makefile (MAKE_VERSION): 20160226 2424 Merge with NetBSD make, pick up 2425 o meta.c: allow meta file for makeDepend if makefiles want it. 2426 24272016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 2428 2429 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 2430 for backwards compatability. 2431 2432 * Makefile (MAKE_VERSION): 20160220 2433 Merge with NetBSD make, pick up 2434 o var.c: add knob to control handling of '$$' in := 2435 24362016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2437 2438 * Makefile (MAKE_VERSION): 20160218 2439 Merge with NetBSD make, pick up 2440 o var.c: add .export-literal allows us to fix sys.clean-env.mk 2441 post the changes to Var_Subst. 2442 Var_Subst now takes flags, and does not consume '$$' in := 2443 24442016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 2445 2446 * Makefile (MAKE_VERSION): 20160217 2447 Merge with NetBSD make, pick up 2448 o var.c: preserve '$$' in := 2449 o parse.c: add .dinclude for handling included 2450 makefile like .depend 2451 24522015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 2453 2454 * Makefile (MAKE_VERSION): 20151220 2455 Merge with NetBSD make, pick up 2456 o suff.c: re-initialize suffNull when clearing suffixes. 2457 24582015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 2459 2460 * Makefile (MAKE_VERSION): 20151201 2461 Merge with NetBSD make, pick up 2462 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 2463 o meta.c: meta_oodate: use lstat(2) for checking link target 2464 in case it is a symlink. 2465 o var.c: avoid calling brk_string and Var_Export1 with empty 2466 strings. 2467 24682015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2469 2470 * Makefile (MAKE_VERSION): 20151126 2471 Merge with NetBSD make, pick up 2472 o parse.c: ParseTrackInput don't access beyond 2473 end of old value. 2474 24752015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 2476 2477 * Makefile (MAKE_VERSION): 20151022 2478 2479 * Add support for BSD/OS which lacks inttypes.h 2480 and really needs sys/param.h for sys/sysctl.h 2481 also 'type' is not a shell builtin. 2482 2483 * var.c: eliminate uint32_t and need for inttypes.h 2484 2485 * main.c: PrintOnError flush stdout before run .ERROR 2486 2487 * parse.c: cope with _SC_PAGESIZE not being defined. 2488 2489 24902015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 2491 2492 * Makefile (MAKE_VERSION): 20151020 2493 Merge with NetBSD make, pick up 2494 o var.c: fix uninitialized var 2495 24962015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 2497 2498 * var.c: the conditional expressions used with ':?' can be 2499 expensive, if already discarding do not evaluate or expand 2500 anything. 2501 25022015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2503 2504 * Makefile (MAKE_VERSION): 20151010 2505 Merge with NetBSD make, pick up 2506 o Add Boolean wantit flag to Var_Subst and Var_Parse 2507 when FALSE we know we are discarding the result and can 2508 skip operations like Cmd_Exec. 2509 25102015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2511 2512 * Makefile (MAKE_VERSION): 20151009 2513 Merge with NetBSD make, pick up 2514 o var.c: don't check for NULL before free() 2515 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 2516 25172015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2518 2519 * Makefile (MAKE_VERSION): 20150910 2520 Merge with NetBSD make, pick up 2521 o main.c: with -w print Enter/Leaving messages for objdir too 2522 if necessary. 2523 o centralize shell metachar handling 2524 2525 * FILES: add metachar.[ch] 2526 25272015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2528 2529 * Makefile (MAKE_VERSION): 20150606 2530 Merge with NetBSD make, pick up 2531 o make.1: document .OBJDIR target 2532 25332015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2534 2535 * Makefile (MAKE_VERSION): 20150505 2536 Merge with NetBSD make, pick up 2537 o cond.c: be strict about lhs of comparison when evaluating .if 2538 but less so when called from variable expansion. 2539 o unit-tests/cond2.mk: test various error conditions 2540 25412015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 2542 2543 * machine.sh (MACHINE): Add Bitrig 2544 patch from joerg@netbsd.org 2545 25462015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2547 2548 * Makefile (MAKE_VERSION): 20150418 2549 Merge with NetBSD make, pick up 2550 o job.c: use memmove() rather than memcpy() 2551 2552 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 2553 case, so skip it. 2554 25552015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2556 2557 * Makefile (MAKE_VERSION): 20150411 2558 bump version - only mk/ changes. 2559 25602015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2561 2562 * Makefile (MAKE_VERSION): 20150410 2563 Merge with NetBSD make, pick up 2564 o document different handling of '-' in jobs mode vs compat 2565 o fix jobs mode so that '-' only applies to whole job 2566 when shell lacks hasErrCtl 2567 o meta.c: use separate vars to track lcwd and latestdir (read) 2568 per process 2569 25702015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 2571 2572 * Makefile (MAKE_VERSION): 20150401 2573 Merge with NetBSD make, pick up 2574 o meta.c: close meta file in child 2575 2576 * Makefile: use BINDIR.bmake if set. 2577 Same for MANDIR and SHAREDIR 2578 Handy for testing release candidates 2579 in various environments. 2580 25812015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2582 2583 * move initialization of savederr to block where it is used 2584 to avoid spurious warning from gcc5 2585 25862014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2587 2588 * Makefile (MAKE_VERSION): 20141111 2589 just a cooler number 2590 25912014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 2592 2593 * Makefile (MAKE_VERSION): 20141105 2594 Merge with NetBSD make, pick up 2595 o revert major overhaul of suffix handling 2596 and POSIX compliance - too much breakage 2597 and impossible to make backwards compatible. 2598 o we still have the new unit test structure which is ok. 2599 o meta.c ensure "-- filemon" is at start of line. 2600 26012014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 2602 2603 * configure.in: test that result of getconf PATH_MAX is numeric 2604 and discard if not. Apparently needed for Hurd. 2605 26062014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2607 2608 * Makefile (MAKE_VERSION): 20140830 2609 Merge with NetBSD make, pick up 2610 o major overhaul of suffix handling 2611 o improved POSIX compliance 2612 o overhauled unit-tests 2613 26142014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2615 2616 * Makefile (MAKE_VERSION): 20140620 2617 Merge with NetBSD make, pick up 2618 o var.c return varNoError rather than var_Error for ::= modifiers. 2619 26202014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 2621 2622 * Makefile (MAKE_VERSION): 20140522 2623 Merge with NetBSD make, pick up 2624 o var.c detect some parse errors. 2625 26262014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2627 2628 * Fix spelling errors - patch from Pedro Giffuni 2629 26302014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 2631 2632 * Makefile (MAKE_VERSION): 20140214 2633 Merge with NetBSD make, pick up 2634 o .INCLUDEFROM* 2635 o use Var_Value to get MAKEOBJDIR[PREFIX] 2636 o reduced realloc'ign in brk_string. 2637 * configure.in: add a check for compiler supporting __func__ 2638 26392014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2640 2641 * boot-strap: ignore mksrc=none 2642 26432014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 2644 2645 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 2646 26472014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2648 2649 * Makefile (MAKE_VERSION): 20140101 2650 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 2651 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 2652 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 2653 Hurd) 2654 * configure.in: Add AC_PREREQ and check for 2655 sysctl; patch from Andrew Shadura andrewsh at debian.org 2656 26572013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2658 2659 * Makefile (MAKE_VERSION): 20131010 2660 * lose the const from arg to systcl to avoid problems on older BSDs. 2661 26622013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2663 2664 * Makefile (MAKE_VERSION): 20131001 2665 Merge with NetBSD make, pick up 2666 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 2667 hw.machine_arch if necessary. 2668 o meta.c: meta_oodate - need to look at src of Link and target 2669 of Move as well. 2670 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 2671 provide __arraycount() if needed. 2672 26732013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 2674 2675 * Makefile (MAKE_VERSION): 20130904 2676 Merge with NetBSD make, pick up 2677 o Add VAR_INTERNAL context, so that internal setting of 2678 MAKEFILE does not override value set by makefiles. 2679 26802013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 2681 2682 * Makefile (MAKE_VERSION): 20130902 2683 Merge with NetBSD make, pick up 2684 o CompatRunCommand: only apply shellErrFlag when errCheck is true 2685 26862013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2687 2688 * Makefile (MAKE_VERSION): 20130828 2689 Merge with NetBSD make, pick up 2690 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 2691 o Call Job_SetPrefix() from Job_Init() so makefiles have 2692 opportunity to set .MAKE.JOB.PREFIX 2693 26942013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 2695 2696 * Makefile (MAKE_VERSION): 20130730 2697 Merge with NetBSD make, pick up 2698 o Allow suppression of --- job -- tokens by setting 2699 .MAKE.JOB.PREFIX empty. 2700 27012013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 2702 2703 * Makefile (MAKE_VERSION): 20130716 2704 Merge with NetBSD make, pick up 2705 o number of gmake compatibility tweaks 2706 -w for gmake style entering/leaving messages 2707 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 2708 handle MAKEFLAGS containing only letters. 2709 o when overriding a GLOBAL variable on the command line, 2710 delete it from GLOBAL context so -V doesn't show the wrong 2711 value. 2712 27132013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 2714 2715 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 2716 2717 * Makefile (MAKE_VERSION): 20130706 2718 Merge with NetBSD make, pick up 2719 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 2720 true so that CompatRunCommand() can use it, to ensure 2721 consistent behavior with jobs mode. 2722 o use MAKE_LEVEL_ENV to define the variable to propagate 2723 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 2724 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 2725 paths to ignore. 2726 27272013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2728 2729 * Makefile (MAKE_VERSION): 20130604 2730 Merge with NetBSD make, pick up 2731 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 2732 to avoid leaking descriptors. 2733 27342013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2735 2736 * Makefile (MAKE_VERSION): 20130528 2737 Merge with NetBSD make, pick up 2738 o var.c: cleanup some left-overs in VarHash() 2739 27402013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2741 2742 * Makefile (MAKE_VERSION): 20130520 2743 generate manifest from component FILES rather than have to 2744 update FILES when mk/FILES changes. 2745 27462013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2747 2748 * Makefile (MAKE_VERSION): 20130518 2749 Merge with NetBSD make, pick up 2750 o suff.c: don't skip all processsing for .PHONY targets 2751 else wildcard srcs do not get expanded. 2752 o var.c: expand name of variable to delete if necessary. 2753 27542013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2755 2756 * Makefile (MAKE_VERSION): 20130330 2757 Merge with NetBSD make, pick up 2758 o meta.c: refine the handling of .OODATE in commands. 2759 Rather than suppress command comparison for the entire script 2760 as though .NOMETA_CMP had been used, only suppress it for the 2761 one command line. 2762 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 2763 suppress comparison of a command without otherwise affecting it. 2764 o make.1: document that 2765 27662013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 2767 2768 * Makefile (MAKE_VERSION): 20130321 2769 yes, not quite right but its a cooler number. 2770 Merge with NetBSD make, pick up 2771 o parse.c: fix ParseGmakeExport to be portable 2772 and add a unit-test. 2773 * meta.c: call meta_init() before makefiles are read and if built 2774 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 2775 this let's makefiles test for support. 2776 Call meta_mode_init() to process .MAKE.MODE. 2777 27782013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2779 2780 * Makefile (MAKE_VERSION): 20130305 2781 Merge with NetBSD make, pick up 2782 o run .STALE: target when a dependency from .depend is missing. 2783 o job.c: add Job_RunTarget() for the above and .BEGIN 2784 27852013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 2786 2787 * Makefile (MAKE_VERSION): 20130303 2788 Merge with NetBSD make, pick up 2789 o main.c: set .MAKE.OS to utsname.sysname 2790 o job.c: more checks for read and poll errors 2791 o var.c: lose VarChangeCase() saves 4% time 2792 27932013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 2794 2795 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 2796 want to use MAKEOBJDIR 2797 27982013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 2799 2800 * Merge with NetBSD make, pick up 2801 o make.1: more info on how shell commands are handled. 2802 o job.c,main.c: detect write errors to job pipes. 2803 28042013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 2805 2806 * Makefile (MAKE_VERSION): 20130123 2807 Merge with NetBSD make, pick up 2808 o meta.c: if script uses .OODATE and meta_oodate() decides 2809 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 2810 o var.c: in debug output indicate which variabale modifiers 2811 apply to. 2812 o remove Check_Cwd logic the makefiles have been fixed. 2813 28142012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2815 2816 * makefile.in: add a simple makefile for folk who insist on 2817 ./configure; make; make install 2818 it just runs boot-strap 2819 * include mk/* to accommodate the above 2820 * boot-strap: re-work to accommodate the above 2821 mksrc defaults to $Mydir/mk 2822 allow op={configure,build,install,clean,all} 2823 add options to facilitate install 2824 * Makefile.config.in: just the bits set by configure 2825 * Makefile: bump version to 20121212 2826 abandon Makefile.in (NetBSD Makefile) 2827 leverage mk/* instead 2828 * configure.in: ensure srcdir is absolute 2829 28302012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2831 2832 * Makefile.in (MAKE_VERSION): 20121111 2833 fix generation of bmake.cat1 2834 28352012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 2836 2837 * Makefile.in (MAKE_VERSION): 20121109 2838 Merge with NetBSD make, pick up 2839 o make.c: MakeBuildChild: return 0 so search continues if a 2840 .ORDER dependency is detected. 2841 o unit-tests/order: test the above 2842 28432012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 2844 2845 * Makefile.in (MAKE_VERSION): 20121102 2846 Merge with NetBSD make, pick up 2847 o cond.c: allow cond_state[] to grow. 2848 In meta mode with a very large tree, we can hit the limit 2849 while processing dirdeps. 2850 28512012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 2852 2853 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 2854 28552012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2856 2857 * Makefile.in (MAKE_VERSION): 20121010 2858 o protect syntax that only bmake parses correctly. 2859 o remove auto setting of FORCE_MACHINE, use configure's 2860 --with-force-machine=whatever if that is desired. 2861 28622012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 2863 2864 * Makefile.in: do not lose history from make.1 when generating bmake.1 2865 28662012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 2867 2868 * Makefile.in (MAKE_VERSION): 20121007 2869 Merge with NetBSD make, pick up 2870 o compat.c: ignore empty commands - same as jobs mode. 2871 o make.1: document meta chars that cause use of shell 2872 28732012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 2874 2875 * Makefile.in (MAKE_VERSION): bump version to 20120911 2876 * bsd.after-import.mk: include Makefile.inc early and allow it to 2877 override PROG 2878 28792012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 2880 2881 * Makefile.in (MAKE_VERSION): bump version to 20120831 2882 Merge with NetBSD make, pick up 2883 o cast sizeof() to int for comparison 2884 o minor make.1 tweak 2885 28862012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2887 2888 * Makefile.in (MAKE_VERSION): bump version to 20120830 2889 Merge with NetBSD make, pick up 2890 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 2891 o debug flag -dV causes -V to show raw value regardless. 2892 28932012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 2894 2895 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 2896 gets SRCTOP set. 2897 28982012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 2899 2900 * Makefile.in (MAKE_VERSION): bump version to 20120704 2901 Merge with NetBSD make, pick up 2902 o Job_ParseShell should call Shell_Init if it has been 2903 previously called. 2904 * Makefile.in: set USE_META based on configure result. 2905 also .PARSEDIR is safer indicator of bmake. 2906 29072012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 2908 2909 * Makefile.in: bump version to 20120626 2910 ensure CPPFLAGS is in CFLAGS 2911 * meta.c: avoid nested externs 2912 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 2913 29142012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2915 2916 * Makefile.in (MAKE_VERSION): bump version to 20120620 2917 Merge with NetBSD make, pick up 2918 o make_malloc.c: avoid including make_malloc.h again 2919 2920 * Makefile.in: avoid bmake only syntax or protect with 2921 .if defined(.MAKE.LEVEL) 2922 * bsd.after-import.mk: replace .-include with .sinclude 2923 ensure? SRCTOP gets a value 2924 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 2925 29262012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 2927 2928 * Makefile.in (MAKE_VERSION): bump version to 20120612 2929 Merge with NetBSD make, pick up 2930 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 2931 for greater portability. 2932 o unit-tests/forloop: check that .for works as expected wrt 2933 number of times and with "quoted strings". 2934 29352012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2936 2937 * Makefile.in (MAKE_VERSION): bump version to 20120606 2938 Merge with NetBSD make, pick up 2939 o compat.c: use kill(2) rather than raise(3). 2940 * configure.in: look for sys/dev/filemon 2941 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 2942 and pass BOOTSTRAP_XTRAS to boot-strap. 2943 29442012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2945 2946 * Makefile.in (MAKE_VERSION): bump version to 20120604 2947 Merge with NetBSD make, pick up 2948 o util.c and var.c share same var for tracking if environ 2949 has been reallocated. 2950 o util.c provide getenv with setenv. 2951 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 2952 when the shell actively strips .MAKE.* from the environment. 2953 We still refer to the variable always as .MAKE.LEVEL 2954 * util.c fix bug in findenv() was finding prefix of name. 2955 * compat.c: re-raising SIGINT etc after running .INTERRUPT 2956 results in more reliable termination of all activity on many 2957 platforms. 2958 29592012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2960 2961 * Makefile.in (MAKE_VERSION): bump version to 20120602 2962 Merge with NetBSD make, pick up 2963 o for.c: handle quoted items in .for list 2964 29652012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 2966 2967 * Makefile.in (MAKE_VERSION): bump version to 20120530 2968 Merge with NetBSD make, pick up 2969 o compat.c: ignore empty command. 2970 29712012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 2972 2973 * Makefile.in (MAKE_VERSION): bump version to 20120524 2974 * FILES: add bsd.after-import.mk: 2975 A simple means of integrating bmake into a BSD build system. 2976 29772012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2978 2979 * Makefile.in (MAKE_VERSION): bump version to 20120520 2980 Merge with NetBSD make, pick up 2981 o increased limit for nested conditionals. 2982 29832012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2984 2985 * Makefile.in (MAKE_VERSION): bump version to 20120518 2986 Merge with NetBSD make, pick up 2987 o use _exit(2) in signal hanlder 2988 o Don't use the [dir] cache when building nodes that might have 2989 changed since the last exec. 2990 o Avoid nested extern declaration warnings. 2991 29922012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 2993 2994 * meta.c (fgetLine): avoid %z - not portable. 2995 * parse.c: Since we moved include of sys/mman.h 2996 and def's of MAP_COPY etc. we got dups from a merge. 2997 29982012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 2999 3000 * Makefile.in (MAKE_VERSION): bump version to 20120420 3001 Merge with NetBSD make, pick up 3002 o restore duplicate supression in .MAKE.MAKEFILES 3003 runtime saving can be significant. 3004 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3005 consumption up to 20%. 3006 30072012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3008 3009 * Makefile.in (MAKE_VERSION): bump version to 20120420 3010 Merge with NetBSD make, pick up 3011 o remove duplicate supression in .MAKE.MAKEFILES 3012 o improved dir cache behavior 3013 o gmake'ish export command 3014 30152012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3016 3017 * Makefile.in (MAKE_VERSION): bump version to 20120325 3018 Merge with NetBSD make, pick up 3019 o fix parsing of :[#] in conditionals. 3020 30212012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3022 3023 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3024 since some systems cannot cope with .Nx <version> 3025 30262011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3027 3028 * Makefile.in (MAKE_VERSION): bump version to 20111111 3029 Merge with NetBSD make, pick up 3030 o debug output for .PARSEDIR and .PARSEFILE 3031 30322011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3033 3034 * Makefile.in (MAKE_VERSION): bump version to 20111010 3035 30362011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3037 3038 * boot-strap: check for an expected file in the dirs we look for. 3039 * make-bootstrap.sh: pass on LDSTATIC 3040 30412011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3042 3043 * Makefile.in (MAKE_VERSION): bump version to 20111001 3044 Merge with NetBSD make, pick up 3045 o ensure .PREFIX is set for .PHONY 3046 and .TARGET set for .PHONY run via .END 3047 o __dead used consistently 3048 30492011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3050 3051 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3052 30532011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3054 3055 * Makefile.in (MAKE_VERSION): bump version to 20110905 3056 Merge with NetBSD make, pick up 3057 o meta_oodate: ignore makeDependfile 3058 30592011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3060 3061 * Makefile.in (MAKE_VERSION): bump version to 20110828 3062 Merge with NetBSD make, pick up 3063 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3064 as SILENT if a .meta file is created 3065 30662011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3067 3068 * Makefile.in (MAKE_VERSION): bump version to 20110818 3069 Merge with NetBSD make, pick up 3070 o in meta mode, if target flagged .META a missing .meta file 3071 means target is out-of-date 3072 o fixes for gcc 4.5 warnings 3073 o simplify job printing code 3074 30752011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3076 3077 * Makefile.in (MAKE_VERSION): bump version to 20110808 3078 Merge with NetBSD make, pick up 3079 o do not touch OP_SPECIAL targets when doing make -t 3080 30812011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3082 3083 * Makefile.in (MAKE_VERSION): bump version to 20110622 3084 Merge with NetBSD make, pick up 3085 o meta_oodate detect corrupted .meta file and declare oodate. 3086 * configure.in: add check for setsid 3087 30882011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3089 3090 * Merge with NetBSD make, pick up 3091 o unit-tests/modts now works on MirBSD 3092 30932011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3094 3095 * Makefile.in (MAKE_VERSION): bump version to 20110606 3096 Merge with NetBSD make, pick up 3097 o ApplyModifiers: when we parse a variable which is not 3098 the entire modifier string, or not followed by ':', do not 3099 consider it as containing modifiers. 3100 o loadfile: ensure newline at end of mapped file. 3101 31022011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3103 3104 * Makefile.in (MAKE_VERSION): bump version to 20110505 3105 Merge with NetBSD make, pick up 3106 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3107 of make's control. In meta mode, any generated file within 3108 said bailiwick, which is found to be missing, causes current 3109 target to be out-of-date. 3110 31112011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3112 3113 * Makefile.in (MAKE_VERSION): bump version to 20110411 3114 Merge with NetBSD make, pick up 3115 o when long modifiers fail to match, check sysV style. 3116 - add a test case 3117 31182011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3119 3120 * Makefile.in (MAKE_VERSION): bump version to 20110410 3121 Merge with NetBSD make, pick up 3122 o :hash - cheap 32bit hash of value 3123 o :localtime, :gmtime - use value as format string for strftime. 3124 31252011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3126 3127 * Makefile.in (MAKE_VERSION): bump version to 20110330 3128 mostly because its a cooler version. 3129 Merge with NetBSD make, pick up 3130 o NetBSD tags for meta.[ch] 3131 o job.c call meta_job_finish() after meta_job_error(). 3132 o meta_job_error() should call meta_job_finish() to ensure 3133 .meta file is closed, and safe to copy - if .ERROR target wants. 3134 meta_job_finish() is safe to call repeatedly. 3135 31362011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3137 3138 * unit-tests/modts: use printf if it is a builtin, 3139 to save us from MirBSD 3140 3141 * Makefile.in (MAKE_VERSION): bump version to 20110329 3142 Merge with NetBSD make, pick up 3143 o fix for use after free() in CondDoExists(). 3144 o meta_oodate() report extra commands and return earlier. 3145 31462011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3147 3148 * Makefile.in (MAKE_VERSION): bump version to 20110327 3149 Merge with NetBSD make, pick up 3150 o meta.c, if .MAKE.MODE contains curdirOk=yes 3151 allow creating .meta files in .CURDIR 3152 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3153 formats the output of 'type' differently - so eat any "()" 3154 31552011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3156 3157 * Makefile.in (MAKE_VERSION): bump version to 20110306 3158 Merge with NetBSD make, pick up 3159 o meta.c, only do getcwd() once 3160 31612011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3162 3163 * Makefile.in (MAKE_VERSION): bump version to 20110305 3164 Merge with NetBSD make, pick up 3165 o correct sysV substitution handling of empty lhs and variable 3166 o correct exists() check for dir with trailing / 3167 o correct handling of modifiers for non-existant variables 3168 during evaluation of conditionals. 3169 o ensure MAP_FILE is defined. 3170 o meta.c use curdir[] now exported by main.c 3171 31722011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3173 3174 * Makefile.in (MAKE_VERSION): bump version to 20110225 3175 Merge with NetBSD make, pick up 3176 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3177 makefiles have been read. 3178 o fix example of :? modifier in man page. 3179 31802011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3181 3182 * Makefile.in (MAKE_VERSION): bump version to 20110214 3183 Merge with NetBSD make, pick up 3184 o meta.c handle realpath() failing when generating meta file 3185 name. 3186 3187 * sigcompat.c: convert to ansi so we can use higher warning levels. 3188 3189 31902011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3191 3192 * Makefile.in (MAKE_VERSION): bump version to 20110207 3193 Merge with NetBSD make, pick up 3194 o fix for bug in meta mode. 3195 31962011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3197 3198 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3199 32002011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3201 3202 * Makefile.in (MAKE_VERSION): bump version to 20110101 3203 Merge with NetBSD make, pick up 3204 o use mmap(2) if available, for reading makefiles 3205 32062010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3207 3208 * Makefile.in (MAKE_VERSION): bump version to 20101215 3209 Merge with NetBSD make, pick up 3210 o ensure meta_job_error() does not report a previous .meta file 3211 as being culprit. 3212 32132010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3214 3215 * Makefile.in (MAKE_VERSION): bump version to 20101210 3216 Merge with NetBSD make, pick up 3217 o meta_oodate: track cwd per process, and only consider target 3218 out-of-date if missing file is outside make's CWD. 3219 Ignore files in /tmp/ etc. 3220 o to ensure unit-tests results match, need to control LC_ALL 3221 as well as LANG. 3222 o fix for parsing bug in var.c 3223 32242010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3225 3226 * Makefile.in (MAKE_VERSION): bump version to 20101126 3227 Merge with NetBSD make, pick up 3228 o if stale dependency is an IMPSRC, search via .PATH 3229 o meta_oodate: if a referenced file is missing, target is 3230 out-of-date. 3231 o meta_oodate: if a target uses .OODATE in its commands, 3232 it (.OODATE) needs to be recomputed. 3233 o keep a pointer to youngest child node, rather than just its 3234 mtime. 3235 32362010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3237 3238 * Makefile.in (MAKE_VERSION): bump version to 20101101 3239 32402010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3241 3242 * machine.sh: like os.sh, 3243 allow for uname -p producing useless drivel 3244 32452010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3246 3247 * boot-strap: document configure knobs for meta and filemon. 3248 3249 * Makefile.in (MAKE_VERSION): bump version to 20100911 3250 Merge with NetBSD make, pick up 3251 o meta.c - meta mode 3252 3253 * make-bootstrap.sh.in: handle meta.c 3254 * configure.in: add knobs for use_meta and filemon_h 3255 also, look for dirname, str[e]sep and strlcpy 3256 * util.c: add simple err[x] and warn[x] 3257 32582010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3259 3260 * boot-strap (TOOL_DIFF): set this to ensure tests use 3261 the same version of diff that configure tested 3262 3263 * Makefile.in (MAKE_VERSION): bump version to 20100808 3264 Merge with NetBSD make, pick up 3265 o in jobs mode, when we discover we cannot make something, 3266 call PrintOnError before exit. 3267 32682010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3269 3270 * Makefile.in (MAKE_VERSION): bump version to 20100806 3271 Merge with NetBSD make, pick up 3272 o formatting fixes for ignored errors 3273 o ensure jobs are cleaned up regardless of where wait() was called. 3274 32752010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3276 3277 * Makefile.in (MAKE_VERSION): bump version to 20100618 3278 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3279 32802010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3281 3282 * Makefile.in (MAKE_VERSION): bump version to 20100616 3283 Merge with NetBSD make, pick up 3284 o man page update 3285 o call PrintOnError from JobFinish when we detect an error we 3286 are not ignoring. 3287 32882010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3289 3290 * Makefile.in (MAKE_VERSION): bump version to 20100606 3291 Merge with NetBSD make, pick up 3292 o man page update 3293 32942010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3295 3296 * Makefile.in (MAKE_VERSION): bump version to 20100605 3297 Merge with NetBSD make, pick up 3298 o use bmake_signal() which is a wrapper around sigaction() 3299 in place of signal() 3300 o add .export-env to allow exporting variables to environment 3301 without tracking (so no re-export when the internal value is 3302 changed). 3303 33042010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3305 3306 * Makefile.in (MAKE_VERSION): bump version to 20100524 3307 Merge with NetBSD make, pick up 3308 o fix for .info et al being greedy. 3309 33102010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3311 3312 * Makefile.in (MAKE_VERSION): bump version to 20100520 3313 Merge with NetBSD make, pick up 3314 o back to using realpath on argv[0] 3315 but only if contains '/' and does not start with '/'. 3316 33172010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3318 3319 * boot-strap: use absolute path for bmake when running tests. 3320 3321 * Makefile.in (MAKE_VERSION): bump version to 20100510 3322 Merge with NetBSD make, pick up 3323 o revert use of realpath on argv[0] 3324 too many corner cases. 3325 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3326 33272010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3328 3329 * Makefile.in (MAKE_VERSION): bump version to 20100505 3330 Merge with NetBSD make, pick up 3331 o fix for missed SIGCHLD when compiled with SunPRO 3332 actually for bmake, defining FORCE_POSIX_SIGNALS would have 3333 done the job. 3334 33352010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 3336 3337 * Makefile.in (MAKE_VERSION): bump version to 20100430 3338 Merge with NetBSD make, pick up 3339 o fflush stdout before writing to stdout 3340 33412010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 3342 3343 * Makefile.in (MAKE_VERSION): bump version to 20100423 3344 Merge with NetBSD make, pick up 3345 o updated unit tests for Haiku (this time for sure). 3346 * boot-strap: based on patch from joerg 3347 honor --with-default-sys-path better. 3348 * boot-strap: remove mention of --with-prefix-sys-path 3349 33502010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 3351 3352 * Makefile.in (MAKE_VERSION): bump version to 20100422 3353 * Merge with NetBSD make, pick up 3354 o fix for vfork() on Darwin. 3355 o fix for bogus $TMPDIR. 3356 o set .MAKE.MODE=compat for -B 3357 o set .MAKE.JOBS=max_jobs for -j max_jobs 3358 o allow unit-tests to run without any *.mk 3359 o unit-tests/modmisc be more conservative in dirs presumed to exist. 3360 * boot-strap: ignore /usr/share/mk except on NetBSD. 3361 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 3362 ensure sort(1) behaves as expected. 3363 33642010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3365 3366 * boot-strap: add FindHereOrAbove so we can use -m .../mk 3367 33682010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3369 3370 * Makefile.in (MAKE_VERSION): bump version to 20100420 3371 * Merge with NetBSD make, pick up 3372 o fix for variable realpath() behavior. 3373 we have to stat(2) the result to be sure. 3374 o fix for .export (all) when nested vars use :sh 3375 33762010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 3377 3378 * Makefile.in (MAKE_VERSION): bump version to 20100414 3379 * Merge with NetBSD make, pick up 3380 o use realpath to resolve argv[0] (for .MAKE) if needed. 3381 o add realpath from libc. 3382 o add :tA to resolve variable via realpath(3) if possible. 3383 33842010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 3385 3386 * Makefile.in (MAKE_VERSION): bump version to 20100408 3387 * Merge with NetBSD make, pick up 3388 o unit tests for .ERROR, .error 3389 o fix for .ERROR to ensure it cannot be default target. 3390 33912010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 3392 3393 * Makefile.in (MAKE_VERSION): bump version to 20100406 3394 * Merge with NetBSD make, pick up 3395 o fix for compat mode "Error code" going to debug_file. 3396 o fix for .ALLSRC being populated twice. 3397 o support for .info, .warning and .error directives 3398 o .MAKE.MODE to control make's operational mode 3399 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 3400 name(s). 3401 o .MAKE.DEPENDFILE to control the name of the depend file 3402 o .ERROR target - run on failure. 3403 34042010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 3405 3406 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 3407 3408 * os.sh,arch.c: patch for Haiku from joerg at netbsd 3409 34102010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 3411 3412 * Makefile.in (MAKE_VERSION): bump version to 20100222 3413 * Merge with NetBSD make, pick up 3414 o better error msg for .for with mutiple inter vars 3415 3416 * boot-strap: 3417 o use make-bootstrap.sh from joerg at netbsd 3418 to avoid the need for a native make when bootstrapping. 3419 o add "" everywhere ;-) 3420 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 3421 otherwise the pre-formated version. 3422 34232010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 3424 3425 * Makefile.in (MAKE_VERSION): bump version to 20100102 3426 * Merge with NetBSD make, pick up: 3427 o fix for -m .../ 3428 34292009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 3430 3431 * Makefile.in (MAKE_VERSION): bump version to 20091118 3432 * Merge with NetBSD make, pick up: 3433 o .unexport 3434 o report lines that start with '.' and should have ':' 3435 (catch typo's of .el*if). 3436 34372009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3438 3439 * configure.in: Ensure that srcdir and mksrc are absolute paths. 3440 34412009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3442 3443 * Makefile.in (MAKE_VERSION): fix version to 20091007 3444 34452009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 3446 3447 * Makefile.in (MAKE_VERSION): bump version to 200910007 3448 * Merge with NetBSD make, pick up: 3449 o fix for parsing of :S;...;...; applied to .for loop iterator 3450 appearing in a dependency line. 3451 34522009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3453 3454 * Makefile.in (MAKE_VERSION): bump version to 20090909 3455 * Merge with NetBSD make, pick up: 3456 o fix for -C, .CURDIR and .OBJDIR 3457 * boot-strap: 3458 o allow share_dir to be set independent of prefix. 3459 o select default share_dir better when prefix ends in $HOST_TARGET 3460 o if FORCE_BSD_MK etc were set, include them in the suggested 3461 install-mk command. 3462 34632009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 3464 3465 * Makefile.in (MAKE_VERSION): bump version to 20090908 3466 * Merge with NetBSD make, pick up: 3467 o .MAKE.LEVEL for recursion tracking 3468 o fix for :M scanning \: 3469 34702009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3471 3472 * configure.in: Don't -D__EXTENSIONS__ if 3473 AC_USE_SYSTEM_EXTENSIONS says "no". 3474 34752009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 3476 3477 * Makefile.in (MAKE_VERSION): bump version to 20090826 3478 Simplify MAKE_VERSION to just the bare date. 3479 * Merge with NetBSD make, pick up: 3480 o -C directory support. 3481 o support for SIGINFO 3482 o use $TMPDIR for temp files. 3483 o child of vfork should be careful about modifying parent's state. 3484 3485 34862009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 3487 3488 * Appy some patches for MiNT from David Brownlee 3489 34902009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 3491 3492 * Makefile.in (BMAKE_VERSION): bump version to 20090222 3493 * Merge with NetBSD make, pick up: 3494 o Possible null pointer de-ref in Var_Set. 3495 34962009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 3497 3498 * Makefile.in (BMAKE_VERSION): bump version to 20090204 3499 * Merge with NetBSD make, pick up: 3500 o bmake_malloc et al moved to their own .c 3501 o Count both () and {} when looking for the end of a :M pattern 3502 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 3503 o strlist.c - functions for processing extendable arrays of pointers to strings. 3504 o ClientData replaced with void *, so const void * can be used. 3505 o New debug flag C for DEBUG_CWD 3506 35072008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 3508 3509 * Makefile.in (BMAKE_VERSION): bump version to 20081111 3510 Apply patch from Joerg Sonnenberge to 3511 configure.in: 3512 o remove some redundant checks 3513 o check for emlloc etc only in libutil and require the whole family. 3514 util.c: 3515 o remove [v]asprintf which is no longer used. 3516 35172008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3518 3519 * Makefile.in (BMAKE_VERSION): bump version to 20081101 3520 * Merge with NetBSD make, pick up: 3521 o util.c: avoid use of putenv() - christos 3522 35232008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3524 3525 * Makefile.in (BMAKE_VERSION): bump version to 20081030 3526 pick up man page tweaks. 3527 35282008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 3529 3530 * Makefile.in: move processing of LIBOBJS to after is definition! 3531 thus we'll have getenv.c in SRCS only if needed. 3532 3533 * make.1: add examples of how to use :? 3534 3535 * Makefile.in (BMAKE_VERSION): bump version to 20081029 3536 * Merge with NetBSD make, pick up: 3537 o fix for .END processing with -j 3538 o segfault from Parse_Error when no makefile is open 3539 o handle numeric expressions in any variable expansion 3540 o debug output now defaults to stderr, -dF to change it - apb 3541 o make now uses bmake_malloc etc so that it can build natively 3542 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 3543 35442008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 3545 3546 * Makefile.in (BMAKE_VERSION): bump version to 20080808 3547 * Merge with NetBSD make, pick up: 3548 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 3549 long lines in Makefiles 3550 o optimizations for VarQuote by joerg 3551 o fix for PR/38756: dominik: make dumps core on invalid makefile 3552 35532008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 3554 3555 * Makefile.in (BMAKE_VERSION): bump version to 20080515 3556 * Merge with NetBSD make, pick up: 3557 o fix skip setting vars in VAR_GLOBAL context, to handle 3558 cases where VAR_CMD is used for other than command line vars. 3559 35602008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 3561 3562 * boot-strap (make_version): we may need to look in 3563 $prefix/share/mk for sys.mk 3564 3565 * Makefile.in (BMAKE_VERSION): bump version to 20080514 3566 * Merge with NetBSD make, pick up: 3567 o skip setting vars in VAR_GLOBAL context, when already set in 3568 VAR_CMD which takes precedence. 3569 35702008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 3571 3572 * Makefile.in (BMAKE_VERSION): bump version to 20080330 3573 * Merge with NetBSD make, pick up: 3574 o fix for ?= when LHS contains variable reference. 3575 35762008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3577 3578 * merge some patches from NetBSD pkgsrc. 3579 3580 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 3581 the MAKSYSPATH used during bootstrap. 3582 3583 * Makefile.in (BMAKE_VERSION): bump version to 20080215 3584 * Merge with NetBSD make, pick up: 3585 o warn if non-space chars follow 'empty' in a conditional. 3586 35872008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3588 3589 * Makefile.in (BMAKE_VERSION): bump version to 20080118 3590 * Merge with NetBSD make, pick up: 3591 o consider dependencies read from .depend as optional - dsl 3592 o remember when buffer for reading makefile grows - dsl 3593 o add -dl (aka LOUD) - David O'Brien 3594 35952007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 3596 3597 * Makefile.in (BMAKE_VERSION): bump version to 20071022 3598 * Merge with NetBSD make, pick up: 3599 o Allow .PATH<suffix> to be used for .include "" 3600 3601 * boot-strap: source default settings from .bmake-boot-strap.rc 3602 36032007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 3604 3605 * Makefile.in: fix maninstall on various systems 3606 provided that our man.mk is used. 3607 For non-BSD systems we install the preformatted page 3608 into $MANDIR/cat1 3609 36102007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 3611 3612 * boot-strap: make bmake.1 too, so maninstall works. 3613 36142007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 3615 3616 * Makefile.in (BMAKE_VERSION): bump version to 20071014 3617 * Merge with NetBSD make, pick up: 3618 o revamped handling of defshell - configure no longer needs to 3619 know the content of the shells array - apb 3620 o stop Var_Subst modifying its input - apb 3621 o avoid calling ParseTrackInput too often - dsl 3622 36232007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 3624 3625 * Makefile.in (BMAKE_VERSION): bump version to 20071011 3626 * Merge with NetBSD make, pick up: 3627 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 3628 3629 * sigcompat.c: some tweaks for HP-UX 11.x based on 3630 patch from Tobias Nygren 3631 3632 * configure.in: update handling of --with-defshell to match 3633 new make behavior. --with-defshell=/usr/xpg4/bin/sh 3634 will now do what one might hope - provided the chosen shell 3635 behaves enough like sh. 3636 36372007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 3638 3639 * Makefile.in (BMAKE_VERSION): bump to 20071008 3640 * Merge with NetBSD make, pick up: 3641 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 3642 o .export/.MAKE.EXPORTED - export of variables - sjg 3643 o .MAKE.MAKEFILES - track all makefiles read - sjg 3644 o performance improvements - dsl 3645 o revamp parallel job scheduling - dsl 3646 36472006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3648 3649 * Makefile.in (BMAKE_VERSION): bump to 20060728 3650 * Merge with NetBSD make, pick up: 3651 o extra debug info during variable and cond processing - sjg 3652 o shell definition now covers newline - rillig 3653 o minor mem leak in PrintOnError - sjg 3654 36552006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3656 3657 * Makefile.in (BMAKE_VERSION): bump to 20060511 3658 * Merge with NetBSD make, pick up: 3659 o more memory leaks - coverity 3660 o possible overflow in ArchFindMember - coverity 3661 o extract variable modifier code out of Var_Parse() 3662 so it can be called recursively - sjg 3663 o unit-tests/moderrs - sjg 3664 36652006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 3666 3667 * Makefile.in (BMAKE_VERSION): bump to 20060412 3668 * Merge with NetBSD make, pick up: 3669 o fixes for some memory leaks - coverity 3670 o only read first sys.mk etc when searching sysIncPath - sjg 3671 3672 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 3673 setting ${MAKEFILE} - OBATA Akio 3674 36752006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 3676 3677 * Makefile.in (BMAKE_VERSION): bump to 20060318 3678 * Merge with NetBSD make, pick up: 3679 o cleanup of job.c to remove remote handling, distcc is more 3680 useful and this code was likely bit-rotting - dsl 3681 o fix for :P modifier - sjg 3682 * boot-strap: set default prefix to something reasonable 3683 (for me anyway). 3684 36852006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 3686 3687 * Makefile.in (BMAKE_VERSION): bump to 20060301 3688 * Merge with NetBSD make, pick up: 3689 o make .WAIT apply recursively, document and test case - apb 3690 o allow variable modifiers in a variable appear anywhere in 3691 modifier list, document and test case - sjg 3692 36932006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 3694 3695 * Makefile.in (BMAKE_VERSION): bump to 20060222 3696 * Merge with NetBSD make, pick up: 3697 o improved job token handling - dsl 3698 o SIG_DFL the correct signal before exec - dsl 3699 o more debug info during parsing - dsl 3700 o allow variable modifiers to be specified via variable - sjg 3701 * boot-strap: explain why we died if no mksrc 3702 37032005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 3704 3705 * Makefile.in (BMAKE_VERSION): bump to 20051105 3706 * configure.in: always set default_sys_path 3707 default is ${prefix}/share/mk 3708 - remove prefix_sys_path, anyone wanting more than above 3709 needs to set it manually. 3710 37112005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3712 3713 * boot-strap: make this a bit easier for pkgsrc folk. 3714 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 3715 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 3716 37172005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 3718 3719 * Makefile.in (BMAKE_VERSION): bump to 20051102 3720 * job.c (JobFinish): fix likely ancient merge lossage 3721 fix from Todd Vierling. 3722 * boot-strap (srcdir): allow setting mksrc=none 3723 37242005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 3725 3726 * Makefile.in (BMAKE_VERSION): bump to 20051031 3727 * ranlib.h: skip on OSF too. 3728 (NetBSD PR 31864) 3729 37302005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 3731 3732 * Makefile.in (BMAKE_VERSION): bump to 20051002 3733 fix a silly typo 3734 37352005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3736 3737 * Makefile.in (BMAKE_VERSION): bump to 20051001 3738 support for UnixWare and some other systems, 3739 based on patches from pkgsrc/bootstrap 3740 37412005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3742 3743 * Makefile.in (BMAKE_VERSION): bump to 20050901 3744 * Merge with NetBSD make, pick up: 3745 o possible parse error causing us to wander off. 3746 37472005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 3748 3749 * Makefile.in (BMAKE_VERSION): bump to 20050606 3750 * Merge with NetBSD make, pick up: 3751 o :0x modifier for randomizing a list 3752 o fixes for a number of -Wuninitialized issues. 3753 37542005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 3755 3756 * Makefile.in (BMAKE_VERSION): bump to 20050530 3757 * Merge with NetBSD make, pick up: 3758 o Handle dependencies for .BEGIN, .END and .INTERRUPT 3759 3760 * README: was seriously out of date. 3761 37622005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 3763 3764 * Important to use .MAKE rather than MAKE. 3765 37662005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 3767 3768 * Makefile.in (BMAKE_VERSION): bump to 20050315 3769 * Merge with NetBSD make, pick up: 3770 o don't mistake .elsefoo for .else 3771 o use suffix-specific search path correctly 3772 o bunch of style nits 3773 37742004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3775 3776 * boot-strap: 3777 o ensure that args to --src and --with-mksrc 3778 are resolved before giving them to configure. 3779 o add -o "objdir" so that builder can control it, 3780 default is $OS as determined by os.sh 3781 o add -q to suppress all the install instructions. 3782 37832004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 3784 3785 * Remove __IDSTRING() 3786 3787 * Makefile.in (BMAKE_VERSION): bump to 20040508 3788 * Merge with NetBSD make, pick up: 3789 o posix fixes 3790 - remove '-e' from compat mode 3791 - add support for '+' command-line prefix. 3792 o fix for handling '--' on command-line. 3793 o fix include in lst.lib/lstInt.h to simplify '-I's 3794 o we also picked up replacement of MAKE_BOOTSTRAP 3795 with !MAKE_NATIVE which is a noop, but possibly confusing. 3796 37972004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 3798 3799 * Makefile.in (BMAKE_VERSION): bump to 20040414 3800 * Merge with NetBSD make, pick up: 3801 o allow quoted strings on lhs of conditionals 3802 o issue warning when extra .else is seen 3803 o print line numer when errors encountered during parsing from 3804 string. 3805 38062004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 3807 3808 * Makefile.in (BMAKE_VERSION): bump to 20040220 3809 * Merge with NetBSD make, pick up: 3810 o fix for old :M parsing bug. 3811 o re-jigged unit-tests 3812 38132004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3814 3815 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 3816 so that './bmake -f Makefile test' works. 3817 38182004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 3819 3820 * Makefile.in: (BMAKE_VERSION): bump to 20040214 3821 * Merge with NetBSD make, pick up: 3822 o search upwards for *.mk 3823 o fix for double free of var substitution buffers 3824 o use of getopt replaced with custom code, since the usage 3825 (re-scanning) isn't posix compatible. 3826 38272004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 3828 3829 * arch.c: don't include ranlib.h on ELF systems 3830 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 3831 38322004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3833 3834 * Makefile.in (BMAKE_VERSION): bump to 20040118 3835 3836 * boot-strap (while): export vars we assign to on cmdline 3837 * unit-test/Makefile.in: ternary is .PHONY 3838 38392004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 3840 3841 * Makefile.in (BMAKE_VERSION): bump version to 20040108 3842 * Merge with NetBSD make, pick up: 3843 o fix for ternary modifier 3844 38452004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 3846 3847 * Makefile.in (BMAKE_VERSION): bump version to 20040105 3848 * Merge with NetBSD make, pick up: 3849 o fix for cond.c to handle compound expressions better 3850 o variable expansion within sysV style replacements 3851 38522003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 3853 3854 * Make portable snprintf safer - output to /dev/null first to 3855 check space needed. 3856 3857 * Makefile.in (BMAKE_VERSION): bump version to 20031222 3858 * Merge with NetBSD make, pick up: 3859 o -dg3 to show input graph when things go wrong. 3860 o explicitly look for makefiles in objdir if not found in curdir so 3861 that errors in .depend etc will be reported accurarely. 3862 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 3863 instead as it more accurately reflects the expected behavior and 3864 is more consistently implemented. 3865 o avoid use of asprintf. 3866 38672003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 3868 3869 * util.c: Add asprintf and vasprintf. 3870 3871 * Makefile.in (BMAKE_VERSION): bump version to 20030928 3872 * Merge with NetBSD make, pick up: 3873 :[] modifier - allows picking words from a variable. 3874 :tW modifier - allows treating value as one big word. 3875 W flag for :C and :S - allows treating value as one big word. 3876 38772003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 3878 3879 * Merge with NetBSD make 3880 pick up -de flag to enable printing failed command. 3881 don't skip 1st two dir entries (normally . and ..) since 3882 coda does not have them. 3883 38842003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3885 3886 * Makefile.in (BMAKE_VERSION): bump version to 20030909 3887 * Merge with NetBSD make, pick up: 3888 - changes for -V '${VAR}' to print fully expanded value 3889 cf. -V VAR 3890 - CompatRunCommand now prints the command that failed. 3891 - several files got updated 3 clause Berkeley license. 3892 38932003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 3894 3895 * boot-strap: Allow setting configure args on command line. 3896 38972003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 3898 3899 * configure.in: add --with-defshell to allow sh or ksh 3900 to be selected as default shell. 3901 3902 * Makefile.in: bump version to 20030731 3903 3904 * Merge with NetBSD make 3905 Pick up .SHELL spec for ksh and associate man page changes. 3906 Also compat mode now uses the same shell specs. 3907 39082003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 3909 3910 * var.c (Var_Parse): ensure delim is initialized. 3911 3912 * unit-tests/Makefile.in: use single quotes to avoid problems from 3913 some shells. 3914 3915 * makefile.boot.in: 3916 Run the unit-tests as part of the bootstrap procedure. 3917 39182003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3919 3920 * unit-tests/Makefile.in: always force complaints from 3921 ${TEST_MAKE} to be from 'make'. 3922 3923 * configure.in: add check for 'diff -u' 3924 also fix some old autoconf'isms 3925 3926 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 3927 if using GCC add -Wno-cast-qual to CFLAGS for var.o 3928 3929 * Merge with NetBSD make 3930 Pick up fix for :ts parsing error in some cases. 3931 Pick unit-tests. 3932 39332003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 3934 3935 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 3936 3937 * var.c (Var_Parse): fix bug in :ts modifier, after const 3938 correctness fixes, must pass nstr to VarModify. 3939 39402003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 3941 3942 * Makefile.in: BMAKE_VERSION switch to a date based version. 3943 We'll generally use the date of last import from NetBSD. 3944 3945 * Merge with NetBSD make 3946 Pick up fixes for const-correctness, now passes WARNS=3 on 3947 NetBSD. 3948 Pick up :ts modifier, allows controlling the separator used 3949 between words in variable expansion. 3950 39512003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 3952 3953 * FILES: include boot-strap and os.sh 3954 3955 * Makefile.in: only set WARNS if we are NetBSD, the effect on 3956 FreeBSD is known to be bad. 3957 3958 * makefile.boot.in (bootstrap): make this the default target. 3959 3960 * Makefile.in: bump version to 3.1.19 3961 3962 * machine.sh: avoid A-Z with tr as it is bound to lose. 3963 39642003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 3965 3966 * Merge with NetBSD make 3967 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 3968 Plus some doc fixes. 3969 39702003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 3971 3972 * Merge with NetBSD make 3973 Pick up fix for PR/1523 - don't count a library as built, if there 3974 is no way to build it 3975 3976 * Bump version to 3.1.18 3977 39782003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 3979 3980 * Merge with NetBSD make 3981 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 3982 appears in src list. 3983 39842003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 3985 3986 * Merge with NetBSD make (mmm 10th anniversary!) 3987 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 3988 pick up -X which tells us to not export VAR=val via setenv if 3989 we are already doing so via MAKEFLAGS. This saves valuable env 3990 space on systems like Darwin. 3991 set MAKE_VERSION to 3.1.17 3992 3993 * parse.c: pix up fix for suffix rules 3994 39952003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 3996 3997 * Merge with NetBSD make. 3998 pick up fix for propagating -B via MAKEFLAGS. 3999 set MAKE_VERSION to 3.1.16 4000 4001 * Apply some patches from pkgsrc-bootstrap/bmake 4002 Originally by Grant Beattie <grant@netbsd.org> 4003 I may have missed some - since they are based on bmake-3.1.12 4004 40052002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4006 4007 * makefile.boot.in (bmake): update install targets for those that 4008 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4009 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4010 4011 * bmake.cat1: update the pre-formatted man page! 4012 40132002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4014 4015 * Merge with NetBSD make. 4016 pick up fix for premature free of pointer used in call 4017 to Dir_InitCur(). 4018 set MAKE_VERSION to 3.1.15 4019 40202002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4021 4022 * configure.in: determine suitable value for MKSRC. 4023 override using --with-mksrc=PATH. 4024 4025 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4026 configs(8) will use 'sun4' as an alias for 'sparc'. 4027 40282002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4029 4030 * Merge with NetBSD make. 4031 pick up ${.PATH} 4032 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4033 set MAKE_VERSION to 3.1.14 4034 add configure checks for killpg and sys/socket.h 4035 40362002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4037 4038 * tag bmake-3-1-13 4039 4040 * makefile.boot.in (bmake): use install-mk 4041 Also setup ./mk before trying to invoke bmake.boot incase we 4042 needed install-mk to create a sys.mk for us. 4043 4044 * configure.in: If we need to add -I${srcdir}/missing, make it an 4045 absolute path so that it works for lst.lib too. 4046 4047 * make.h: always include sys/cdefs.h since we provide one if the 4048 host does not. 4049 4050 * Makefile.in (install-mk): 4051 use MKSRC/install-mk which will do the right thing. 4052 use uname -p for ARCH if possible. 4053 since install-mk will setup links bsd.prog.mk -> prog.mk if 4054 needed, just .include bsd.prog.mk 4055 4056 * Merge with NetBSD make (NetBSD-1.6) 4057 Code is ansi-C only now. 4058 Bug in handling of dotLast is fixed. 4059 Can now assign .OBJDIR and make will reset its notions of life. 4060 New modifiers :tu :tl for toUpper and toLower. 4061 4062Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4063 4064 * Merge with NetBSD make 4065 pick up fix for .END failure in compat mode. 4066 pick up fix for extra va_end() in ParseVErrorInternal. 4067 4068Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4069 4070 * configure.in: for systems that have sys/cdefs.h check if it is 4071 compatible. If not, include the one under missing, but tell it to 4072 include the native one too - necessary on Linux. 4073 4074 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4075 include_next (for gcc) to get the native sys/cdefs.h 4076 4077Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4078 4079 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4080 leaking descriptors when using -jN. 4081 4082 * job.c (JobPrintCommand): See if "curdir" exists before 4083 attempting to chdir(). Doing the chdir directly in make (when in 4084 compat mode) fails silently, so let the -jN version do the same. 4085 This can happen when building kernels in an object tree and 4086 playing clever games to reset .CURDIR. 4087 4088 * Merged with NetBSD make 4089 pick up .USEBEFORE 4090 4091Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4092 4093 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4094 4095Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4096 4097 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4098 us not to export the iterator variable when using VAR_CMD context. 4099 4100Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4101 4102 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4103 its the wrong "fix". 4104 4105Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4106 4107 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4108 We now simply append the variable names to .MAKEOVERRIDES, and 4109 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4110 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4111 Apart from fixing quoting bugs in previous version, this allows us 4112 to export vars to the environment by simply doing: 4113 .MAKEOVERRIDES+= PATH 4114 Merged again with NetBSD make, but the above is the only change. 4115 4116 * configure.in: added 4117 --disable-pwd-override disable $PWD overriding getcwd() 4118 --disable-check-make-chdir disable make trying to guess 4119 when it should automatically cd ${.CURDIR} 4120 4121 * Merge with NetBSD make, changes include: 4122 parse.c (ParseDoDependency): Spot that the syntax error is 4123 caused by an unresolved cvs/rcs conflict and say so. 4124 var.c: most of Var* functions now take a ctxt as 1st arg. 4125 now does variable substituion on rhs of sysv style modifiers. 4126 4127 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4128 is now done here. We append the name='value' to .MAKEOVERRIDES 4129 rather than directly into MAKEFLAGS as this allows a Makefile to 4130 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4131 very similar mechanism. Note that in adding name='value' to 4132 .MAKEOVERRIDES we do the moral equivalent of: 4133 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4134 4135Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4136 4137 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4138 4139 * Merged with NetBSD make 4140 make -dx can now be used to run commands via sh -x 4141 better error messages on exec failures. 4142 4143Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4144 4145 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4146 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4147 MACHINE etc otherwise they propagate from the previous bmake. 4148 4149 * configure.in (machine): allow --with-machine=generic to make 4150 configure use machine.sh to set MACHINE. 4151 4152 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4153 4154 * Makefile.in: mention in bmake.1 that we use autoconf. 4155 4156 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4157 4158Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4159 4160 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4161 as that rather defeats the usefulness of ${MAKEFILE}. 4162 4163 * main.c (MainParseArgs): append command line variable assignments 4164 to MAKEFLAGS so that they get propagated to child make's. 4165 Apparently this is required POSIX behaviour? Its useful anyway. 4166 4167Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4168 4169 * compat.c (CompatRunCommand): don't use perror() since stdio may 4170 cause problems in child of vfork(). 4171 4172 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4173 This routine prints out the .curdir where we stopped and will also 4174 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4175 4176 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4177 :@ expansion. 4178 4179 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4180 4181 * Added RCSid's for the files we've touched. 4182 4183Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4184 4185 * configure.in: Thanks to some clues from mdb@juniper.net, 4186 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4187 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4188 4189 --with-machine=MACHINE explicitly set MACHINE 4190 --with-force-machine=MACHINE set FORCE_MACHINE 4191 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4192 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4193 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4194 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4195 4196 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4197 4198 * makefile: added a pathetically simple makefile to drive 4199 bootstrapping. Running configure by hand is more useful. 4200 4201 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4202 dependent on NetBSD bsd.*.mk 4203 4204 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4205 _PATH_OBJDIRPREFIX for those that don't want a default. 4206 construct _PATH_DEFSYSPATH from the info we get from configure. 4207 4208 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4209 if MAKE_VERSION is defined. 4210 4211 * compat.c: when we bail, print out the .CURDIR we were in. 4212 4213Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4214 4215 * Merged with NetBSD make 4216 4217 * var.c: fixed a bug in the handling of the modifier :P 4218 if the node as found but the path was null, we segfault trying to 4219 duplicate it. 4220 4221Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4222 4223 * Merged with NetBSD make 4224 4225 * make.c: Make_OODate's test for a library out of date was using 4226 cmtime where it should have used mtime (my bug). 4227 4228 * compat.c: Use perror() to tell us what really went wrong when we 4229 cannot exec a command. 4230 4231Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4232 4233 * Merged with NetBSD make 4234 4235Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4236 4237 * Merged with NetBSD make 4238 4239Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4240 4241 * Merged with NetBSD make 4242 4243Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4244 4245 * Merged with NetBSD make 4246 4247Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4248 4249 * util.c: don't provide signal() since we use sigcompat.c 4250 4251 * Makefile.in: added a build target. 4252 4253 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4254 These allow some quite clever magic. 4255 4256 * main.c (main): added support for getenv(MAKESYSPATH). 4257 4258Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4259 4260 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4261 This avoids objdir having a different value depending on how a 4262 directory was reached (via command line, or subdir.mk). 4263 4264 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4265 4266Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4267 4268 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4269 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4270 I've been testing this in NetBSD's make for some weeks. 4271 4272 * Turn Makefile into Makefile.in and make it useful. 4273 4274Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4275 4276 * Imported NetBSD's -current make(1) and resolve conflicts. 4277 4278 * Applied autoconf patches from bmake v2 4279 4280 * Imported clean code base from NetBSD-1.0 4281