12024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20240108 4 Merge with NetBSD make, pick up 5 o miscellaneous cleanups 6 72024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 8 9 * VERSION (_MAKE_VERSION): 20240106 10 Merge with NetBSD make, pick up 11 o fix duplicate progname when reporting an unknown target 12 o unit tests for Cmd_Exec using temp file 13 142024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 15 16 * VERSION (_MAKE_VERSION): 20240105 17 Merge with NetBSD make, pick up 18 o main.c: Cmd_Exec write cmd to a file if too big 19 avoid blowing commandline/env limits 20 212024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 22 23 * VERSION (_MAKE_VERSION): 20240101 24 o util.c: flesh out more of strftime 25 * configure.in: add --with-bmake-strftime 26 it is not a full implementation but enough to pass all 27 the unit-tests. 28 * parse.c: LoadFile do not append \n to empty buffer. 29 302023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 31 32 * VERSION (_MAKE_VERSION): 20231230 33 Merge with NetBSD make, pick up 34 o simplify memory allocation for string buffers 35 o fix declared types of list nodes 36 o suff.c: clean up freeing of suffixes 37 o var.c: simplify debug message for the ':@var@...@' modifier 38 clean up variable handling 39 402023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 41 42 * VERSION (_MAKE_VERSION): 20231226 43 Merge with NetBSD make, pick up 44 o compat.c: ensure make's output is correctly ordered with that of 45 the target when not going to a tty 46 o main.c: check for shellPath whether to call Shell_Init() 47 482023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 49 50 * VERSION (_MAKE_VERSION): 20231224 51 Merge with NetBSD make, pick up 52 o compat.c: check for shellPath whether to call Shell_Init() 53 tweak the unit test to detect the bug thus fixed. 54 o make.1: do not claim .SHELL is only used by jobs mode. 55 562023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 57 58 * VERSION (_MAKE_VERSION): 20231220 59 Merge with NetBSD make, pick up 60 o str.c: speed up pattern matching in the ':M' modifier 61 o var.c: fix confusing debug logging when deleting a variable 62 use consistent debug messages style when ignoring variables 63 642023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 65 66 * VERSION (_MAKE_VERSION): 20231210 67 Merge with NetBSD make, pick up 68 o var.c: avoid segfault on empty :C match expression 69 explain in debug log why variable assignment is ignored. 70 712023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 72 73 * VERSION (_MAKE_VERSION): 20231208 74 Merge with NetBSD make, pick up 75 o var.c: ensure fromCmd is set correctly for variables set on 76 command line. 77 782023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 79 80 * configure.in: disable generation of 'makefile' for 81 Darwin by default. 82 83 * boot-strap: docuement --without-makefile 84 852023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 86 87 * VERSION (_MAKE_VERSION): 20231124 88 Merge with NetBSD make, pick up 89 o main.c: cleanup processing of -j 90 fix lint warning about strchr 91 o var.c: more accurate error message for invalid ':mtime' argument 92 cleanup :[...] modifier 93 avoid reading beyond substring when comparing 94 o unit-tests cover all cases of :mtime, test and explain exporting 95 of variables 96 o cleanup comments 97 982023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 99 100 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 101 $FreeBSD$ tag, so avoid adding it. 102 1032023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 104 105 * VERSION (_MAKE_VERSION): 20230909 106 Merge with NetBSD make, pick up 107 o main.c: allow -j to compute a multiple of ncpu 108 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 109 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 110 _SC_NPROCESSORS_ONLN 111 .MAKE.JOBS.C will be "yes" if -jC is supported 112 1132023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 114 115 * VERSION (_MAKE_VERSION): 20230820 116 Merge with NetBSD make, pick up 117 o make.1: note that :localtime is better for %s 118 o parse.c: improve error messages for invalid input. 119 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 120 correct result, it is still better to use %s:L:localtime. 121 1222023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 123 124 * VERSION (_MAKE_VERSION): 20230818 125 Merge with NetBSD make, pick up 126 o meta.c: meta_ignore - check raw path against metaIgnorePaths 127 to potentially skip call to realpath. 128 o var.c: be strict when parsing the argument of the ':mtime' modifier 129 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 130 should be used to get an equivalent value to time(3). 131 1322023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 133 134 * VERSION (_MAKE_VERSION): 20230816 135 Merge with NetBSD make, pick up 136 o cond.c: clean up multiple-inclusion guards 137 1382023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 139 140 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 141 if configure cannot work out how to control TZ. 142 Remove varmod-localtime from BROKEN_TESTS for IRIX* 143 1442023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 145 146 * VERSION (_MAKE_VERSION): 20230723 147 148 * configure.in: fix the test for wether TZ=Europe/Berlin works. 149 Depending on the time of year, if run between 22:00 and 00:00 UTC 150 the check in configure would fail incorrectly. 151 Take the day into account as well. 152 1532023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 154 155 * VERSION (_MAKE_VERSION): 20230711 156 Merge with NetBSD make, pick up 157 o make.1: clean up wording, clarify scope of '!' in conditions 158 1592023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 160 161 * make-bootstrap.sh.in: set prefix 162 If configure is run using ksh we get unexpanded ${prefix} in 163 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 164 correct result. 165 1662023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 167 168 * VERSION (_MAKE_VERSION): 20230711 169 bump version for IRIX tweaks 170 171 * make.h: undef OP_NONE if defined 172 173 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 174 175 * configure.in: override INSTALL on IRIX 176 1772023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 178 179 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 180 1812023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 182 183 * VERSION (_MAKE_VERSION): 20230622 184 Merge with NetBSD make, pick up 185 o optimize string matching for ':M' and ':N' 186 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 187 1882023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 189 190 * VERSION (_MAKE_VERSION): 20230621 191 Merge with NetBSD make, pick up 192 o more extensive tests for include guards 193 o parse.c: if a guard is already defined a file that uses the same 194 guard is still guarded by it. 195 1962023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 197 198 * VERSION (_MAKE_VERSION): 20230620 199 Merge with NetBSD make, pick up 200 o allow guards to be targets as well as variables 201 The guard targets may include variable references like 202 __${.PARSEDIR:tA}/${.PARSEFILE}__ 203 2042023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 205 206 * VERSION (_MAKE_VERSION): 20230619 207 Merge with NetBSD make, pick up 208 o unit test for .undef of readOnly vars 209 o optimization for makefiles protected from multiple-inclusion 210 skip even opening the file after first include. 211 Initially this only handles makefiles guarded by a variable 212 target guards are next. 213 2142023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 215 216 * VERSION (_MAKE_VERSION): 20230616 217 Merge with NetBSD make, pick up 218 o var.c: do not allow delete of readOnly variable 219 2202023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 221 222 * VERSION (_MAKE_VERSION): 20230601 223 Merge with NetBSD make, pick up 224 o parse.c: .break takes no args 225 o lots of unit test updates 226 2272023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 228 229 * unit-tests/Makefile: skip tests that require /dev/filemon 230 if it does not exists - issue a warning. 231 2322023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 233 234 * VERSION (_MAKE_VERSION): 20230522 235 Fix building on darwin ppc 236 237 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 238 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 239 2402023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 241 242 * VERSION (_MAKE_VERSION): 20230515 243 244 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 245 compile filemon_ktrace.c 246 2472023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 248 249 * VERSION (_MAKE_VERSION): 20230512 250 o sys.dirdeps.mk - broke after-import target 251 2522023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 253 254 * VERSION (_MAKE_VERSION): 20230510 255 Merge with NetBSD make, pick up 256 o parse.c: don't print null filename in stack traces 257 o var.c: :mtime operate on each word in variable value 258 2592023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 260 261 * VERSION (_MAKE_VERSION): 20230509 262 Merge with NetBSD make, pick up 263 o for.c: skip syntactically wrong .for loops 264 o var.c: allow for :gmtime=${mtime} 265 add :mtime[=timestamp] where timestamp is used if stat(2) 266 fails, if :mtime=error stat(2) failure causes error. 267 2682023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 269 270 * VERSION (_MAKE_VERSION): 20230504 271 Merge with NetBSD make, pick up 272 o compat.c: fix compile on NetBSD 7.2 273 o make.1: fix documentation of .PREFIX to match reality and POSIX 274 o unit-tests: improved var-scope-local 275 2762023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 277 278 * VERSION (_MAKE_VERSION): 20230414 279 Merge with NetBSD make, pick up 280 o minor cleanup 281 2822023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 283 284 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 285 unlimited results in an insane number (0x7fffffffffffffff). 286 If BMAKE_NOFILE_MAX is defined, use that instead. 287 2882023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 289 290 * VERSION (_MAKE_VERSION): 20230321 291 Merge with NetBSD make, pick up 292 * make.1: document seemingly unexplained Error code 6. 293 2942023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 295 296 * VERSION (_MAKE_VERSION): 20230317 297 Merge with NetBSD make, pick up 298 o compat.c: CompatDeleteTarget skip .PHONY targets to be 299 consistent with JobDeleteTarget. 300 o job.c: fix memory leak in handling sysv :from=to modifiers 301 3022023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 303 304 * VERSION (_MAKE_VERSION): 20230303 305 Merge with NetBSD make, pick up 306 o several updated unit-tests 307 3082023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 309 310 * VERSION (_MAKE_VERSION): 20230222 311 Merge with NetBSD make, pick up 312 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 313 3142023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 315 316 * VERSION (_MAKE_VERSION): 20230218 317 Merge with NetBSD make, pick up 318 o var.c: fix parsing of unevaluated subexpressions with 319 unbalanced '{}' 320 3212023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 322 323 * VERSION (_MAKE_VERSION): 20230215 324 Merge with NetBSD make, pick up 325 o inline macros for some variable names 326 o cond.c: reduce complexity of evaluating expressions 327 3282023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 329 330 * VERSION (_MAKE_VERSION): 20230208 331 Merge with NetBSD make, pick up 332 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 333 when it has been used within conditional expressions 334 3352023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 336 337 * VERSION (_MAKE_VERSION): 20230127 338 339 * install-sh: if making directories ensure umask is set 340 to match mode. 341 342 * Makefile: use DIRMODE for directories and 343 NONBINMODE for man pages and mk files 344 3452023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 346 347 * VERSION (_MAKE_VERSION): 20230126 348 Merge with NetBSD make, pick up 349 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 350 should be read-only. 351 3522023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 353 354 * VERSION (_MAKE_VERSION): 20230123 355 Merge with NetBSD make, pick up 356 o .[NO]READONLY: for control of read-only variables 357 o .SYSPATH: for controlling the path searched for makefiles 358 3592023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 360 361 * VERSION (_MAKE_VERSION): 20230120 362 Merge with NetBSD make, pick up 363 o allow for white-space between command specifiers @+- 364 o add more details to warning 'Extra targets ignored' 365 3662023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 367 368 * machine.sh: leverage os.sh rather than duplicate 369 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 370 for that purpose for the past decade or so. 371 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 372 3732023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 374 375 * VERSION (_MAKE_VERSION): 20230101 376 Merge with NetBSD make, pick up 377 o cleanup comments, inline some LazyBuf_ methods 378 o unit-tests/ add/improve comments in tests 379 o make.1: sync list of built-in variables with reality 380 sort list of built-in variables 381 reduce indentation of the long list of variable names 382 use consistent markup for boolean flags 383 move description of .MAKE.MODE below the .MAKE.META block 384 clarify in which case an expression may omit braces 385 3862022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 387 388 * VERSION (_MAKE_VERSION): 20221024 389 Merge with NetBSD make, pick up 390 o change return type of unlink_file back to int 391 3922022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 393 394 * Makefile: Darwin and Linux can handle MANTARGET=man 395 3962022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 397 398 * VERSION (_MAKE_VERSION): 20220928 399 Merge with NetBSD make, pick up 400 o fix more ignored returns from snprintf 401 o compile with higher warnings 402 4032022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 404 405 * main.c meta.c: do not ignore return from snprintf 406 407 * meta.c strlcpy.c: we need prototype for strlcpy 408 409 * sigcompat.c: fix unused function warnings 410 4112022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 412 413 * VERSION (_MAKE_VERSION): 20220924 414 Merge with NetBSD make, pick up 415 o fix bug in .break reset of conditional depth 416 o overhaul and simplify tracking of conditional depth 417 4182022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 419 420 * VERSION (_MAKE_VERSION): 20220912 421 Merge with NetBSD make, pick up 422 o man page updates 423 4242022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 425 426 * VERSION (_MAKE_VERSION): 20220909 427 Merge with NetBSD make, pick up 428 o update unit-tests to handle deprecation of egrep 429 o cond.c: add more details to error message for numeric comparison 430 431 * configure.in: allow for deprecation of egrep 432 433 * Makefile: Linux can handle MANTARGET=man 434 4352022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 436 437 * VERSION (_MAKE_VERSION): 20220903 438 Merge with NetBSD make, pick up 439 o job.c: fix handling of null bytes in output 440 4412022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 442 443 * VERSION (_MAKE_VERSION): 20220902 444 Merge with NetBSD make, pick up 445 o Allow .break to terminate a .for loop early 446 4472022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 448 449 * VERSION (_MAKE_VERSION): 20220901 450 Merge with NetBSD make, pick up 451 o var.c: fix out-of-bounds errors when parsing 452 4532022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 454 455 * VERSION (_MAKE_VERSION): 20220824 456 Merge with NetBSD make, pick up 457 o var.c: revert change to modifier parsing that breaks 458 shell variable references within ':@var@body@' 459 o adjust unit-tests 460 4612022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 462 463 * VERSION (_MAKE_VERSION): 20220818 464 Merge with NetBSD make, pick up 465 o fix exit status for '-q' (since 1994) 466 4672022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 468 469 * VERSION (_MAKE_VERSION): 20220808 470 Merge with NetBSD make, pick up 471 o var.c: fix parsing of modifiers containing unbalanced subexpressions 472 extract parsing of ':D' and ':U' modifiers into separate function 473 4742022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 475 476 * VERSION (_MAKE_VERSION): 20220726 477 478 * Auto-create objdir for bmake/unit-tests if appropriate 479 4802022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 481 482 * VERSION (_MAKE_VERSION): 20220724 483 Merge with NetBSD make, pick up 484 o make.1: describe variable assignment and evaluation more precisely 485 o parse.c: fix out-of-bounds read when parsing an invalid line 486 o var.c: simplify return type of IsShortVarnameValid 487 4882022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 489 490 * VERSION (_MAKE_VERSION): 20220612 491 Merge with NetBSD make, pick up 492 o allow to randomize build order of targets 493 .MAKE.MODE += randomize-targets can help uncover dependency bugs 494 within a makefile. 495 o compat.c: rename Compat_Run to Compat_MakeAll 496 o make.c: inline MakeBuildParent 497 inline make_abort, improve error details 498 o parse.c: reorganize Parse_Error 499 fix memory leak in wildcard targets and sources 500 separate cases in HandleDependencyTargetMundane 501 extract HandleSingleDependencyTargetMundane 502 rename loadfile to LoadFile 503 split IncludeFile into separate functions 504 condense code for searching a file in the paths 505 fix off-by-one error in buffer for .WAIT nodes 506 o str.c: condense Str_Match 507 make code for string matching syntactically more consistent 508 5092022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 510 511 * VERSION (_MAKE_VERSION): 20220418 512 Merge with NetBSD make, pick up 513 o ignore '.POSIX:' if not in first non-comment line 514 of Makefile as specified by POSIX. 515 add unit-tests for above. 516 o meta.c: make it easier to find usage of identifiers 517 o targ.c: add .USEBEFORE to Targ_PrintType 518 5192022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 520 521 * VERSION (_MAKE_VERSION): 20220414 522 523 * unit-tests/Makefile: simplify checks for shells with 524 BROKEN_TESTS, this helps with other Linux distros that 525 use dash. 526 5272022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 528 529 * VERSION (_MAKE_VERSION): 20220330 530 Merge with NetBSD make, pick up 531 o var.c: fix spacing, and a typo in a test 532 5332022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 534 535 * VERSION (_MAKE_VERSION): 20220326 536 Merge with NetBSD make, pick up 537 o parse.c: try to include 'posix.mk' the first time 538 .POSIX: is encountered, to allow for beter POSIX compliance. 539 o var.c: make debug logs more readable 540 prefer 'long long' over 'long' on 32-bit C99 platforms 541 fix crash on .undef of an environment variable 542 5432022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 544 545 * VERSION (_MAKE_VERSION): 20220303 546 Merge with NetBSD make, pick up 547 o tell meta mode unit tests not to expect filemon 548 o cond.c: make debug logging for comparisons less technical 549 o lst.c: fix mem leak in Lst_Remove 550 o str.c: make code for string matching syntactically more consistent 551 o var.c: simplify ParseModifier_Match 552 5532022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 554 555 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 556 557 * VERSION (_MAKE_VERSION): 20220214 558 Merge with NetBSD make, pick up 559 o cond.c: simplify control flow in CondParser_Comparison 560 o job.c: fix echoing of command with '-' in silent target in jobs mode 561 o main.c: prefix the warning about read-only .OBJDIR with a colon 562 o parse.c: remove redundant conditions 563 o var.c: simplify control flow in ModifyWord_SysVSubst 564 5652022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 566 567 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 568 is any chance we have dash as .SHELL 569 570 * VERSION (_MAKE_VERSION): 20220208 571 Merge with NetBSD make, pick up 572 o more unit tests 573 o meta.c: use a variable to hold command line to be filtered 574 to avoid any side effects from content of command line. 575 5762022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 577 578 * VERSION (_MAKE_VERSION): 20220204 579 Merge with NetBSD make, pick up 580 o use unsigned consistently for line numbers, avoid the need for %z 581 o parse.c: do not step off end of input in Parse_IsVar 582 when checking for target local variable assignments 583 5842022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 585 586 * VERSION (_MAKE_VERSION): 20220202 587 Merge with NetBSD make, pick up 588 o remove redundant declaration of HashIter_Init 589 o make DEBUG0 simpler 590 5912022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 592 593 * cast gn->lineno to avoid %z 594 595 * VERSION (_MAKE_VERSION): 20220130 596 Merge with NetBSD make, pick up 597 o more unit tests 598 o make GNode lineno unsigned to please lint 599 o print location of recursive variable references in commands 600 o print "stack trace" (makefile includes) on fatal errors 601 o make.1: refine documentation for target local assignments 602 6032022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 604 605 * VERSION (_MAKE_VERSION): 20220128 606 Merge with NetBSD make, pick up 607 o inline functions called only once 608 o for.c: clean up AddEscape for building the body of a .for loop 609 o hash.c: merge duplicate code for finding an entry in a hash table 610 replace HashEntry_KeyEquals with strncmp 611 o make.1: document quirks of target local variable assignments. 612 o parse.c: cleanup white-space 613 6142022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 615 616 * VERSION (_MAKE_VERSION): 20220126 617 Merge with NetBSD make, pick up 618 o allow setting target local variables 619 o more unit tests 620 o add missing newline after "cannot continue" message 621 o meta.c: clean up eat_dots 622 o parse.c: fix filename in warning about duplicate script 623 o var.c: when expanding nested variables, check simple things first 624 6252022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 626 627 * VERSION (_MAKE_VERSION): 20220116 628 Merge with NetBSD make, pick up 629 o fix for unit-tests/varname-makeflags on non-BSD systems 630 o use Var_Exists rather than Var_Value where appropriate 631 o remove unnecessary functions for expanding variable names 632 o cond.c: inline EvalBare 633 o main.c: lint cleanup 634 o parse.c: condense code in Parse_IsVar 635 use islower for parsing directives (none have upper case) 636 6372022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 638 639 * VERSION (_MAKE_VERSION): 20220112 640 Merge with NetBSD make, pick up 641 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 642 comparion, rarely needed but useful when it is. 643 6442022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 645 646 * VERSION (_MAKE_VERSION): 20220110 647 Merge with NetBSD make, pick up 648 o inline Buf_Clear 649 o remove redundant braces 650 o rename and inline Targ_Precious 651 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 652 o for.c: clean up handling of .for loops 653 fix reported line numbers of continuation lines 654 add details about .for loop variables to stack traces 655 o job.c: reduce code for initializing error handling in shell 656 o main.c: in Cmd_Exec, return error message instead of format string 657 have as few statements as possible between va_start and va_end 658 add debug logging for capturing the output of external commands 659 o make.c: use consistent variable names for varargs 660 o make_malloc.c: remove duplicate code from bmake_strdup 661 o parse.c: add missing printflike annotations 662 remove redundant lines from stack traces 663 fix stack traces in -dp mode 664 reduce confusing code in ParseForLoop 665 fix line number in debug log after returning from a file 666 rename IFile and its fields to match their actual content 667 clean up ParseDependencySources 668 o var.c: shorten ApplyModifier_Assign 669 rename is_shell_metachar, fix character conversion warning 670 merge calls to ApplyModifier_Time 671 merge duplicate code for modifiers 'gmtime' and 'localtime' 672 6732022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 674 675 * parse.c: loadfile restore extra byte in buffer. 676 6772022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 678 679 * VERSION (_MAKE_VERSION): 20220101 680 Merge with NetBSD make, pick up 681 o more unit-tests 682 o remove unnecessary words from command line options in CmdOpts 683 o rename eunlink to unlink_file 684 o cond.c: make ParseWord in condition parser simpler 685 internally return false for irrelevant leaves in conditions 686 replace table for function lookup in conditions with simple code 687 merge duplicate types CondEvalResult and CondResult 688 o for.c: clean up handling of .for loops and .include directives 689 o main.c: constify cached_realpath 690 clean up Cmd_Exec 691 o parse.c: sync API documentation 692 fix error message when reading more than 1 GB from stdin 693 clean up parsing of makefiles 694 fix line number in error message about open conditionals 695 unexport types VarAssignOp and VarAssign 696 clean up function names 697 remove redundant parameters in dependency parsing functions 698 reduce scope of the list of wildcard target names 699 extract OP_NOTARGET into separate function 700 clean up variable names for parsing dependency lines 701 make debug logging a bit more human-friendly 702 o var.c: condense code in ApplyModifier_Assign 703 7042021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 705 706 * VERSION (_MAKE_VERSION): 20211221 707 Merge with NetBSD make, pick up 708 o more unit-tests 709 o style cleanup 710 o in CLEANUP mode, free interned strings at the very end 711 o fix memory leak for filenames in .for loops 712 o buf.c: avoid memory leak 713 o cond.c: condense CondParser_ComparisonOp 714 o hash.c: change return type of HashTable_Set to void 715 o job.c: change return type of Compat_RunCommand from int to bool 716 o main.c: remove bmake_free 717 o parse.c: condense repetetive code in ParseDirective 718 remove dead code for handling traditional include directives 719 clean up parsing of variable assignments 720 remove unreachable code for parsing the dependency operator 721 clean up loading of files 722 fix memory leak in IncludeFile 723 o var.c: fix memory leak when parsing a variable name 724 fix memory leak from ${.SUFFIXES} 725 reduce memory allocation in modifier ':?' and ':C' 726 condense RegexReplace for the modifier ':C' and avoid strlen 727 merge duplicate code for memory handling in Var_Parse 728 distinguish between short-lived and environment variables 729 rename VarFreeEnv to VarFreeShortLived 730 7312021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 732 733 * cond.c: fix mem leak in CondParser_Leaf 734 7352021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 736 737 * VERSION (_MAKE_VERSION): 20211212 738 Merge with NetBSD make, pick up 739 o rename Parse_SetInput to Parse_PushInput 740 o remove remove period from end of error messages and warnings 741 to be more consistent 742 o arch.c: use simpler memory management for parsing archive members 743 o cond.c: rework and reduce recursion 744 o for.c: rename some functions to better reflect purpose 745 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 746 o var.c: in parse errors, mark whitespace more clearly 747 inline ParseEmptyArg into CondParser_FuncCallEmpty 748 minimize calls to LazyBuf_Get in ParseVarnameLong 749 treat .SUFFIXES as a read-only variable 750 7512021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 752 753 * VERSION (_MAKE_VERSION): 20211207 754 Merge with NetBSD make, pick up 755 o inline HashIter_Init 756 o parse.c: inline common subexpression in ParseRawLine 757 o var.c: merge branches for modifiers ':D' and ':U' 758 extract common code into Expr_Words 759 extract common code into Expr_Str 760 move low-level implementation details out of Var_Parse 761 7622021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 763 764 * VERSION (_MAKE_VERSION): 20211206 765 Merge with NetBSD make, pick up 766 o add unit-tests/varmod-loop-delete 767 o for.c: inline Str_Words - reduce memory allocation 768 o parse.c: do not try to expand fixed variable names 769 only allocate the name of an included file if necessary 770 clean up ParseInclude 771 o var.c: fix use-after-free in modifier ':@' 772 save a memory allocation in each modifier ':O' and ':u' 773 save a memory allocation in the modifier ':[...]' 774 in UnexportVars, replace Str_Words with Substring_Words to 775 reduce allocations and copying. 776 7772021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 778 779 * VERSION (_MAKE_VERSION): 20211204 780 Merge with NetBSD make, pick up 781 o flesh out a number of tests 782 o replace enums with bitfields, this simplifies a lot of code. 783 o var.c: refactor ParseModifierPartSubst 784 7852021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 786 787 * VERSION (_MAKE_VERSION): 20211024 788 Merge with NetBSD make, pick up 789 o Punt on write errors - ENOSPC etc. 790 7912021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 792 793 * configure.in: use_defshell, set both DEFSHELL_INDEX 794 and defshell_path if appropriate. 795 This makes it easier to use say the KSH specification with 796 and alternate path for the shell. 797 798 * configure.in compat.c: for SCO we need to force UseShell 799 800 * configure.in: SCO /bin/sh is not usable, provide a list of 801 alternatives for use as .SHELL. 802 We still have to mark some tests as broken, plus more if we end up 803 with ksh as .SHELL. 804 Issue a warning about skipped tests. 805 806 * boot-strap: leave TOOL_DIFF to configure 807 808 * configure.in: on SCO native cc is not usable, 809 gcc is to be found in /usr/gnu/bin 810 and while ancient is at least able to compile bmake. 811 Thus we add /usr/gnu/bin to PATH if it exists, and later 812 check if $CC would have been found via $PATH. 813 If not we set CC to the full path of $CC. 814 Also gnu diff is known to support -u, so if it exists use it. 815 816 * configure.in: move getopt to AC_REPLACE_FUNCS 817 also add AC_C_INLINE - in an attempt to compile using 818 native cc on SCO. 819 820 * configure.in: check for stresep as well as strsep, since we 821 define the later to the former if necessary, and if we have to 822 provide stresep we also need to provide a prototype. 823 824 * configure.in: we no longer need to worry about 825 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 826 827 * make.h: make sure we have __RCSID 828 829 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 830 can control it. 831 8322021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 833 834 * VERSION: 20211020 835 Merge with NetBSD make, pick up 836 o confirm sync of unit-tests 837 8382021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 839 840 * configure.in: check if timezone Europe/Berlin is supported 841 if not try UTC-1 842 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 843 symlink unit-tests -> ../unit-tests/obj so that 844 unit-tests/Makefile.config is put in the right place. 845 * refine filtering of .OBJDIR in unit-tests 846 8472021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 848 849 * Fix unit-tests on Minix 3.2.0 850 o job.c: do not punt if read of token pipe fails for EAGAIN. 851 On Minix at least, we are not ready to read the childExitJob pipe 852 when poll says we are. 853 There should actually be no reason for this pipe to be 854 non-blocking, but while that works fine on {Net,Free}BSD it 855 breaks another test case on Minix. 856 o unit-tests/Makefile: deal with variants of error messages 857 and use of obj as .OBJDIR 858 8592021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 860 861 * configure.in: add sigaction to AC_REPLACE_FUNCS 862 we also need to check for sigaddset etc just for the benefit of 863 sigact.c 864 865 * Add sigact.c as sigaction.c so this "just works". 866 This should have been done back when bmake_signal started using 867 sigaction (I only just noticed that sigact.c wasn't here ;-) 868 Note: I no longer have access to any system where this would matter. 869 8702021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 871 872 * VERSION (_MAKE_VERSION): 20211011 873 874 * Makefile: cleanup a little 875 876 * configure.in: check for sigsetmask 877 8782021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 879 880 * VERSION (_MAKE_VERSION): 20211001 881 Merge with NetBSD make, pick up 882 o reduce locations reducing text size 883 o remove unnecessary const 884 o cond.c: fix lint warning on i386 885 do not allow unquoted 'left == right' after modifier ':?' 886 o hash.c: fix build for DEBUG_HASH_LOOKUP 887 o var.c: fix memory leak in error case of the ':?' modifier 888 8892021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 890 891 * VERSION (_MAKE_VERSION): 20210911 892 Merge with NetBSD make, pick up 893 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 894 8952021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 896 897 * VERSION (_MAKE_VERSION): 20210906 898 Merge with NetBSD make, pick up 899 o more unit tests 900 o lint cleanup 901 o rename some functions to better fit purpose 902 o for.c: cleanup - remove unnecessary optimization 903 fix embedded newlines 904 o parse.c: correct case for CVS/RCS 905 9062021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 907 908 * VERSION (_MAKE_VERSION): 20210808 909 Merge with NetBSD make, pick up 910 o var.c: remove redundant initialization in ApplyModifier_Order 911 912 * mk/options.mk: issue warning for incorrect usage 913 9142021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 915 916 * var.c: use long for :On if we don't have a 64bit int type 917 918 * VERSION (_MAKE_VERSION): 20210803 919 Merge with NetBSD make, pick up 920 o rework varmod-order tests to avoid qsort instability 921 o make.1: clarify :On entry 922 9232021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 924 925 * VERSION (_MAKE_VERSION): 20210731 926 Merge with NetBSD make, pick up 927 o fix some lint issues 928 o more unit tests 929 o var.c: rework of ApplyModifier_Order 930 9312021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 932 933 * util.c: add strto*l if HAVE_STRTO*L not defined 934 935 * VERSION (_MAKE_VERSION): 20210730 936 Merge with NetBSD make, pick up 937 o var.c: add :On and :Orn for numeric sort 938 disabled if no 64bit type available. 939 o _strtol.h: to implement strto*l functions 940 9412021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 942 943 * VERSION (_MAKE_VERSION): 20210704 944 Merge with NetBSD make, pick up 945 o unit-tests: fix some tests to be more portable 946 - job-output-null not all shells do the same number of write calls 947 - objdir-writable if TMPDIR is set; /tmp may not be usable 948 9492021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 950 951 * VERSION (_MAKE_VERSION): 20210701 952 Merge with NetBSD make, pick up 953 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 954 some tests just cannot work in some environments. 955 o buf.c: simpler upper bound for length in Buf_AddInt 956 o cond.c: fix grammar in error message for malformed conditional 957 o for.c: prevent newline injection (from ${.newline}) in .for loops 958 o var.c: use more practical data type in RegexReplace 959 (avoid need for %zu) 960 extract RegexReplace from ModifyWord_SubstRegex 961 9622021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 963 964 * VERSION (_MAKE_VERSION): 20210621 965 Merge with NetBSD make, pick up 966 o var.c: only report error for unmatched regex subexpression 967 when linting (-dL) since we cannot tell when an unmatched 968 subexpression is an expected result. 969 o move unmatched regex subexpression tests to 970 varmod-subst-regex.mk and enable strict (lint) mode 971 9722021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 973 974 * VERSION (_MAKE_VERSION): 20210616 975 Merge with NetBSD make, pick up 976 o more unit tests 977 o cond.c: rename If_Eval to EvalBare 978 improve function names for parsing conditions 979 o job.c: fix error handling of targets that cannot be made 980 o var.c: uncompress code in ApplyModifier_Unique 981 9822021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 983 984 * VERSION (_MAKE_VERSION): 20210518 985 Merge with NetBSD make, pick up 986 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 987 o job.c: Print -de error information when running multiple jobs 988 9892021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 990 991 * VERSION (_MAKE_VERSION): 20210420 992 Merge with NetBSD make, pick up 993 o use C99 bool type 994 o convert VarEvalFlags back into an enum 995 o cond.c: do not complain when skipping the condition 'no >= 10' 996 o hash.c: avoid allocating memory for simple variable names 997 o job.c: use distinct wording for writing to the shell commands file 998 remove type name for the abort status in job handling 999 rename PrintOutput to PrintFilteredOutput to avoid confusion 1000 o main.c: avoid double slash in name of temporary directory 1001 o var.c: use straight quotes for error 'Bad conditional expression' 1002 reduce memory allocations in the modifiers ':D' and ':U' 1003 rename members of ModifyWord_LoopArgs 1004 clean up pattern flags for the modifiers ':S' and ':C' 1005 reduce memory allocation and strlen calls in modifier ':from=to' 1006 in the ':Q' modifier, only allocate memory if necessary 1007 improve performance for LazyBuf 1008 remove redundant parameter from ParseVarnameLong 1009 migrate ParseModifierPart to use Substring 1010 avoid unnecessary calls to strlen when evaluating modifiers 1011 migrate ModifyWord functions to use Substring 1012 migrate handling of the modifier ':S,from,to,' to Substring 1013 reduce debug logging and memory allocation for ${:U...} 1014 reduce verbosity of the -dv debug logging for standard cases 1015 clean up debug logging for ':M' and ':N' 1016 disallow '$' in the variable name of the modifier ':@' 1017 simplify access to the name of an expression during evaluation 1018 10192021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1020 1021 * VERSION (_MAKE_VERSION): 20210330 1022 Merge with NetBSD make, pick up 1023 o replace enum bit-field with struct bit-field for VarEvalFlags 1024 o rename VARE_NONE to VARE_PARSE_ONLY 1025 o var.c: rename ApplyModifiersState to ModChain 1026 fix double varname expansion in the variable modifier '::=' 1027 change debug log for variable evaluation flags to lowercase 1028 10292021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1030 1031 * VERSION (_MAKE_VERSION): 20210314 1032 Merge with NetBSD make, pick up 1033 o var.c: avoid evaluating many modifiers in parse only mode 1034 in strict mode (-dL) many variable references are parsed twice, 1035 the first time just to report parse errors early, so we want to 1036 avoid side effects and wasted effort to the extent possible. 1037 10382021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1039 1040 * VERSION (_MAKE_VERSION): 20210226 1041 Merge with NetBSD make, pick up 1042 o remove freestanding freeIt variables 1043 link via FStr 1044 o var.c: restructure code in ParseVarname to target human readers 1045 improve error message for; 1046 bad modifier in variable expression 1047 unclosed modifier 1048 unknown modifier 1049 remove redundant parameter of ApplySingleModifier 1050 explain non-obvious code around indirect variable modifiers 1051 quote ':S' in error message about missing delimiter 1052 extract ParseModifier_Match into separate function 1053 add context information to error message about ':range' modifier 1054 add quotes around variable name in an error message 1055 reorder code in ModifyWords 1056 use more common parameter order for VarSelectWords 1057 make ModifyWord_Subst a little easier to understand 1058 do not expand variable name from the command line twice 1059 extract ExistsInCmdline from Var_SetWithFlags 1060 save a hash map lookup when defining a cmdline variable 1061 clean up VarAdd, Var_Delete, Var_ReexportVars 1062 use bit-shift expressions for VarFlags constants 1063 rename constants for VarFlags 1064 rename ExprDefined constants for debug logging 1065 rename ExprStatus to ExprDefined 1066 split parameters for evaluating variable expressions 1067 reduce redundant code around ModifyWords 1068 print error about failed shell command before overwriting variable 1069 clean up ValidShortVarname, ParseVarnameShort 1070 rename VarExprStatus to ExprStatus 1071 add functions for assigning the value of an expression 1072 rename ApplyModifiersState_Define to Expr_Define 1073 condense the code for parsing :S and :C modifiers 1074 10752021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1076 1077 * VERSION (_MAKE_VERSION): 20210206 1078 Merge with NetBSD make, pick up 1079 o unit-tests: use private TMPDIR to avoid errors from other users 1080 10812021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1082 1083 * VERSION (_MAKE_VERSION): 20210205 1084 Merge with NetBSD make, pick up 1085 o avoid strdup in mkTempFile 1086 o always use vfork 1087 o rename context and ctxt to scope 1088 o rename some VAR constants to SCOPE 1089 o Var_ functions, move the scope to the front 1090 o use shortcut functions Global_Set and Global_Append 1091 o add shortcut Global_Delete for deleting a global variable 1092 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1093 o compat.c: when exiting due to an error, print graph information 1094 o enum.c: remove overengineered Enum_ValueToString 1095 o make.c: remove unused INTERNAL flag 1096 remove unused return type of MakeBuildParent 1097 o parse.c: replace parse error "Need an operator" with better message 1098 o var.c: improve documentation about variable scopes 1099 rename Var_ValueDirect to GNode_ValueDirect 1100 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1101 merge SetVar into Var_SetWithFlags 1102 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1103 split Var_Append into Var_Append and Var_AppendExpand 1104 replace enum bit-set with bit-field 1105 o unit-tests/var-op-shell: use kill rather than kill -14 1106 which broke on darwin with recent update. 1107 11082021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1109 1110 * configure.in: check for sig_atomic_t and define it as 'int' 1111 if missing. 1112 1113 * VERSION (_MAKE_VERSION): 20210201 1114 Merge with NetBSD make, pick up 1115 o use sig_atomic_t for caught_sigchld 1116 11172021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1118 1119 * VERSION (_MAKE_VERSION): 20210130 1120 Merge with NetBSD make, pick up 1121 o more unit tests 1122 o convert SearchPath to struct 1123 o split Buf_Destroy into Buf_Done and Buf_DoneData 1124 o for.c: split For_Eval into separate functions 1125 rename struct For to struct ForLoop 1126 o job.c: do not create empty shell files in jobs mode 1127 rename JobOpenTmpFile to JobWriteShellCommands 1128 reduce unnecessary calls to waitpid 1129 o parse.c: in -dp mode, print stack trace with each diagnostic 1130 11312021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1132 1133 * VERSION (_MAKE_VERSION): 20210123 1134 Merge with NetBSD make, pick up 1135 o rename Dir_Expand to SearchPath_Expand 1136 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1137 o cond.c: fix debug output for comparison operators in conditionals 1138 o dir.c: split Dir_FindFile into separate functions 1139 11402021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1141 1142 * VERSION (_MAKE_VERSION): 20210120 1143 Merge with NetBSD make, pick up 1144 o fix some more lint nits 1145 o refine some unit tests for portability 1146 o cond.c: rework parsing 1147 11482021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1149 1150 * VERSION (_MAKE_VERSION): 20210110 1151 Merge with NetBSD make, pick up 1152 o fix lint warnings 1153 o consistently use boolean expressions in conditions 1154 11552021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1156 1157 * VERSION (_MAKE_VERSION): 20210108 1158 Merge with NetBSD make, pick up 1159 o job.c: back to polling token pipe if we want a token 1160 o main.c: always print 'stopped in' on first call 1161 The execption is if we bail because of an abort token 1162 in which case just exit 6. 1163 11642021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1165 1166 * VERSION (_MAKE_VERSION): 20210101 1167 Merge with NetBSD make, pick up 1168 o Happy New Year! 1169 o rename CmdOpts.lint to strict 1170 o exit 2 on technical errors 1171 o replace pointers in controlling conditions with booleans 1172 o replace global preserveUndefined with VARE_KEEP_UNDEF 1173 o compat.c: re-export variables from the actual make process 1174 if using vfork this is the effect anyway 1175 o cond.c: clean up VarParseResult constants 1176 o for.c: fix undefined behavior in SubstVarLong 1177 make control flow in SubstVarLong of .for loops more obvious 1178 clean up SubstVarShort in .for loops 1179 extract ForSubstBody from ForReadMore 1180 clean up ForReadMore 1181 simplify termination condition for .for loop 1182 add error handling for .for loop items 1183 job.c: re-export variables from the actual make process 1184 parse.c: remove mmap for loading files, only allow files < 1 GiB 1185 fix edge case in := with undefined in variable name 1186 skip variable expansion in ParseDependencyTargetWord 1187 var.c: split ExportVar into separate functions 1188 clean up code in extracted ExportVar functions 1189 remove dead code from ApplyModifiersIndirect 1190 split Var_Subst into easily understandable functions 1191 clean up VarParseResult constants 1192 11932020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1194 1195 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1196 11972020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1198 1199 * VERSION (_MAKE_VERSION): 20201222 1200 Merge with NetBSD make, pick up 1201 o make DEBUG macro return boolean 1202 o parse.c: fix assertion failure for files without trailing newline 1203 o var.c: allow .undef to undefine multiple variables at once 1204 remove excess newline from parse errors 1205 12062020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1207 1208 * VERSION (_MAKE_VERSION): 20201221 1209 Merge with NetBSD make, pick up 1210 o some unit-test updates 1211 12122020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1213 1214 * VERSION (_MAKE_VERSION): 20201220 1215 Merge with NetBSD make, pick up 1216 o more unit tests 1217 o return FStr from Var_Parse and Var_Value 1218 o spell nonexistent consistently 1219 o add str_basename to reduce duplicate code 1220 o compat.c: fix .ERROR_TARGET in compat -k mode 1221 extract InitSignals from Compat_Run 1222 extract UseShell from Compat_RunCommand 1223 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1224 o for.c: rename ForIterate to ForReadMore 1225 o hash.c: clean up hash function for HashTable 1226 o lst.c: rename Vector.priv_cap to cap 1227 o main.c: remove constant parameter from MakeMode 1228 o make.c: use symbolic time for 0 in Make_Recheck 1229 extract MakeChildren from MakeStartJobs 1230 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1231 fix error message for .info/.warning/.error without argument 1232 extract Var_Undef from ParseDirective 1233 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1234 rename mode constants for ParseGetLine to be more expressive 1235 reduce debugging details in Parse_SetInput 1236 fix line numbers in .for loops 1237 split ParseGetLine into separate functions 1238 fix garbled output for failed shell command 1239 var.c: remove redundant assignment in ApplyModifier_SysV 1240 error out on unknown variable modifiers at parse time 1241 remove wrong error message for indirect modifier in lint mode 1242 extract ApplySingleModifier from ApplyModifiers 1243 use FStr for memory management in Var_SetWithFlags 1244 extract SetVar from Var_SetWithFlags 1245 use FStr in VarNew 1246 extract string functions from ApplyModifier_To 1247 error out if .undef has not exactly 1 argument 1248 extract Var_DeleteVar from Var_Delete 1249 extract Var_Undef from ParseDirective 1250 clean up memory management for expanding variable expressions 1251 12522020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1253 1254 * avoid %zu 1255 1256 * lst.c: avoid anonymous union 1257 1258 * VERSION (_MAKE_VERSION): 20201212 1259 Merge with NetBSD make, pick up 1260 o more unit tests 1261 o inline Targ_Ignore and Targ_Silent 1262 o split JobFlags into separate fields 1263 o remove const from function parameters (left overs from refactoring) 1264 o eliminate boolean argument of Var_Export 1265 o make API of Buf_Init simpler 1266 o rename ParseRunOptions to ParseCommandFlags 1267 o replace *line with line[0] 1268 o compat.c: fix wrong exit status for multiple failed main targets 1269 refactor Compat_Run to show the error condition more clearly 1270 don't make .END if the main targets already failed (-k mode) 1271 fix exit status in -k mode if a dependency fails 1272 o for.c: clean up Buf_AddEscaped in .for loops 1273 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1274 make Job_Touch simpler 1275 refactor JobFinish 1276 rename Shell.exitFlag to errFlag 1277 move Job.xtraced to ShellWriter 1278 make printing of shell commands independent from the job 1279 rename shell flags in struct Shell 1280 extract JobOpenTmpFile from JobStart 1281 rename RunFlags to CommandFlags 1282 split various Job.* into separate fields 1283 rename commandShell to shell 1284 extract InitShellNameAndPath from Shell_Init 1285 replace signal handling macros with local functions 1286 replace macro MESSAGE with local function 1287 parse.c: error out on null bytes in makefiles 1288 error out on misspelled directives 1289 rename IFile.nextbuf to readMore 1290 fix undefined behavior in ParseEOF 1291 str.c: remove redundant call to strlen in Str_Words 1292 var.c: error out on misspelled .unexport-env 1293 error out on misspelled .export directives 1294 extract ExportVars from Var_Export 1295 extract ExportVarsExpand from Var_Export 1296 eliminate boolean argument of Var_Export 1297 fix undefined behavior when exporting ${:U } 1298 rename Var_ExportVars to Var_ReexportVars 1299 rename Var_Export1 to ExportVar 1300 13012020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1302 1303 * VERSION (_MAKE_VERSION): 20201206 1304 Merge with NetBSD make, pick up 1305 o more unit tests 1306 o inline macros for debug logging 1307 o use consistent variable names for list nodes 1308 o define constants for enum zero-values 1309 o dir.c: use fixed format for debug output of the directory cache 1310 remove Dir_InitDir 1311 o lst.c: inline Lst_Enqueue, Vector_Done 1312 o meta.c: remove unused parameter from meta_needed 1313 o parse.c: rename parse functions 1314 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1315 o targ.c: don't concatenate identifiers in Targ_PrintType 1316 o var.c: remove comment decoration 1317 extract UnexportVars from Var_UnExport 1318 extract GetVarnamesToUnexport from Var_UnExport 1319 extract UnexportEnv from Var_UnExport 1320 extract UnexportVar from Var_UnExport 1321 move CleanEnv to UnexportVars 1322 replace pointer comparisons with enum 1323 add FStr to var.c to make memory handling simpler 1324 use FStr in Var_UnExport 1325 move type definitions in var.c to the top 1326 extract FreeEnvVar from Var_Parse 1327 extract ShuffleStrings from ApplyModifier_Order 1328 13292020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1330 1331 * VERSION (_MAKE_VERSION): 20201130 1332 Merge with NetBSD make, pick up 1333 o add unit tests for META MODE 1334 o reduce memory allocation for dirSearchPath, GNode.parents, 1335 GNode.children, OpenDirs 1336 o reduce pointer indirection for GNode.cohorts and 1337 GNode.implicitParents 1338 o remove pointer indirection from GNode.commands 1339 o inline Lst_ForEachUntil in meta mode 1340 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1341 clean up memory management for CachedDirs 1342 fix the reference count of dotLast going negative 1343 add debug logging for OpenDirs_Done 1344 extract CacheNewDir from Dir_AddDir 1345 add debug logging for reference counting of CachedDir 1346 rename some Dir functions to SearchPath 1347 o job.c: rename some global variables 1348 o main.c: reduce memory allocation in ReadBuiltinRules 1349 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1350 CmdOpts.makefiles 1351 Add .MAKE.UID and .MAKE.GID 1352 o make.c: reduce memory allocation for/in toBeMade, 1353 Make_ProcessWait, Make_ExpandUse 1354 o meta.c: reduce memory allocation in meta_oodate 1355 o parse.c: reduce memory allocations for parsing dependencies and 1356 targets 1357 o suff.c: reduce memory allocation in suffix handling 1358 13592020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1360 1361 * VERSION (_MAKE_VERSION): 20201124 1362 Merge with NetBSD make, pick up 1363 o .MAKE.{UID,GID} represent uid and gid running make. 1364 o fix error handling for .BEGIN and .END dependency in -k mode 1365 o fix missing "Stop." after failed .END node in -k mode 1366 o use properly typed comparisons in boolean contexts 1367 o replace a few HashTable_CreateEntry with HashTable_Set 1368 o add HashSet type 1369 o compat.c: split Compat_Make into smaller functions 1370 extract DebugFailedTarget from Compat_RunCommand 1371 o dir.c: refactor Dir_UpdateMTime 1372 migrate CachedDir.files from HashTable to HashSet 1373 o make.c: add high-level API for GNode.made 1374 13752020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1376 1377 * VERSION (_MAKE_VERSION): 20201122 1378 Merge with NetBSD make, pick up 1379 o rename GNode.context to vars 1380 o suff.c: cleanup and refactor 1381 rename some functions and vars to better reflect usage 1382 add high-level API for CandidateSearcher 1383 o targ.c: add more debug logging for suffix handling 1384 o more unit tests 1385 o add debug logging for setting and resetting the main target 1386 13872020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1388 1389 * VERSION (_MAKE_VERSION): 20201117 1390 Merge with NetBSD make, pick up 1391 o fix some unit-tests when .SHELL is dash 1392 o rename Targ_NewGN to GNode_New 1393 o make some GNode functions const 1394 o main.c: call Targ_Init before Var_Init 1395 cleanup PrintOnError, getTmpdir and ParseBoolean 1396 o var.c: fix error message of failed :!cmd! modifier 1397 13982020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1399 1400 * VERSION (_MAKE_VERSION): 20201114 1401 Merge with NetBSD make, pick up 1402 o replace a few HashTable_CreateEntry with HashTable_Set 1403 o clean up cached_stats 1404 o rename DEFAULT to defaultNode 1405 o remove redundant struct make_stat 1406 o cond.c: in lint mode, check for ".else <cond>" 1407 use bitset for IfState 1408 replace large switch with if-else in Cond_EvalLine 1409 o job.c: clean up JobExec, JobStart, JobDoOutput 1410 use stderr for error message about failed touch 1411 clean up Job_Touch 1412 replace macro DBPRINTF with JobPrintln 1413 rename JobState to JobStatus 1414 main.c: switch cache for realpath from GNode to HashTable 1415 clean up Fatal 1416 clean up InitDefSysIncPath 1417 use progname instead of hard-coded 'make' in warning 1418 rename Main_SetVarObjdir to SetVarObjdir 1419 make.1: document the -S option 1420 make.c: fix debug output for GNode details 1421 use symbolic names in debug output of GNodes 1422 14232020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1424 1425 * configure.in: fix --with-force-machine-arch 1426 1427 * VERSION (_MAKE_VERSION): 20201112 1428 Merge with NetBSD make, pick up 1429 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1430 checks in InitObjdir. Explicit .OBJDIR target always allows 1431 read-only directory. 1432 o cond.c: clean up Cond_EvalLine 1433 14342020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1435 1436 * VERSION (_MAKE_VERSION): 20201111 1437 Merge with NetBSD make, pick up 1438 o more unit-tests 1439 o style cleanup 1440 remove redundant parentheses from sizeof operator 1441 replace character literal 0 with '\0'. 1442 replace pointer literal 0 with NULL. 1443 remove redundant parentheses. 1444 replace (expr & mask) == 0 with !(expr & mask). 1445 use strict typing in conditions of the form !var 1446 o rename Make_OODate to GNode_IsOODate 1447 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1448 o rename Var_Set_with_flags to Var_SetWithFlags 1449 o rename dieQuietly to shouldDieQuietly 1450 o buf.c: make API of Buf_Init simpler 1451 o compat.c: clean up Compat_Make, Compat_RunCommand, 1452 CompatDeleteTarget and CompatInterrupt 1453 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1454 clean up CondParser_Comparison 1455 o main.c: rename getBoolean and s2Boolean 1456 rename MAKEFILE_PREFERENCE for consistency 1457 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1458 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1459 replace emptyString with allocated empty string 1460 error out on unclosed expressions after the colon 1461 14622020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1463 1464 * VERSION (_MAKE_VERSION): 20201101 1465 Merge with NetBSD make, pick up 1466 o negate NoExecute to GNode_ShouldExecute 1467 o job.c: rename JobMatchShell to FindShellByName 1468 extract EscapeShellDblQuot from JobPrintCommand 1469 extract ParseRunOptions from JobPrintCommand 1470 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1471 treat malformed :range, :ts and :[...] as errors 1472 add tests for the variable modifiers :[words] and :range 1473 14742020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1475 1476 * VERSION (_MAKE_VERSION): 20201031 1477 Merge with NetBSD make, pick up 1478 o format #include directives consistently 1479 o do not look up local variables like .TARGET anywhere else 1480 o main.c: Main_SetObjdir is first called for curdir which may be 1481 readonly 1482 reduce the scope where recursive expressions are detected 1483 remove redundant :tl from getBoolean 1484 clean up mkTempFile 1485 o meta.c: simplify memory allocation in meta_create and meta_oodate 1486 o parse.c: extract loadedfile_mmap from loadfile 1487 o trace.c: document possible undefined behavior with .CURDIR 1488 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1489 rename ismeta to is_shell_metachar 1490 remove debug logging for the :Q variable modifier 1491 rename VarIsDynamic to VarnameIsDynamic 1492 use consistent parameter order in varname parsing functions 1493 extract ParseVarnameLong from Var_Parse 1494 extract ParseVarnameShort from Var_Parse 1495 fix type of ParseModifierPart parameter delim 1496 extract IsEscapedModifierPart from ParseModifierPart 1497 clean up ModifyWords 1498 add test for combining the :@ and :? variable modifiers 1499 15002020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1501 1502 * VERSION (_MAKE_VERSION): 20201030 1503 Merge with NetBSD make, pick up 1504 o change char * to void * in Var_Value 1505 o make iterating over HashTable simpler 1506 o rename VAR_CMD to VAR_CMDLINE 1507 o cond.c: clean up is_separator 1508 fix parse error in string literal in conditional 1509 o main.c: do not use objdir that is not writable 1510 in lint mode, exit with error status on errors 1511 o parse.c: clean up StrContainsWord 1512 fix out-of-bounds pointer in ParseTrackInput 1513 o var.c: rename Str_SYSVMatch and its parameters 1514 remove unsatisfiable conditions in Var_Set_with_flags 1515 document where the variable name is expanded 1516 fix documentation for VARP_SUB_ONE 1517 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 1518 document VAR_READONLY 1519 prevent appending to read-only variables 1520 extract MayExport from Var_Export1 1521 remove redundant evaluations in VarFind 1522 replace VarFindFlags with a simple Boolean 1523 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 1524 15252020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 1526 1527 * VERSION (_MAKE_VERSION): 20201028 1528 Merge with NetBSD make, pick up 1529 o rename defIncPath to defSysIncPath 1530 o initialize all CmdOpts fields 1531 o lst.c: inline Vector_Get 1532 o main.c: refactor main extract 1533 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 1534 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 1535 InitDefIncPath,CmdOpts_Init,UnlimitFiles 1536 o parse.c: merge curFile into includes 1537 rename predecessor to order_pred 1538 sort ParseSpecial alphabetically 1539 remove unused, undocumented .NOEXPORT 1540 rename ParseSpecial enum values consistently 1541 rename some fields of struct IFile 1542 15432020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 1544 1545 * VERSION (_MAKE_VERSION): 20201026 1546 Merge with NetBSD make, pick up 1547 o group the command line options and arguments into a struct 1548 o rename GNode.cmgn to youngestChild 1549 o rename hash functions to identify the type name 1550 o negate OP_NOP and rename it to GNode_IsTarget 1551 o add GNode_Path to access the path of a GNode 1552 o remove macros MIN and MAX 1553 o remove unused Lst_Find and Lst_FindFrom 1554 o arch.c: and make Arch_FindLib simpler 1555 clean up code layout 1556 make Arch_ParseArchive simpler 1557 o cond.c: inline CondFindStrMatch into FuncMake 1558 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 1559 omit trailing space in debug output for expanding file patterns 1560 refactor DirMatchFiles 1561 document that the SearchPath of Dir_FindFile may be NULL 1562 remove UNCONST from Dir_Expand 1563 inline DirFindName 1564 o for.c: clean up code for handling .for loops 1565 o hash.c: print hash in debug log with fixed width 1566 clean up hash table functions 1567 reduce amount of string hashing 1568 o job.c: refactor JobDeleteTarget 1569 use proper enum constants for aborting 1570 convert result of JobStart from macros to enum 1571 convert abort reason macros to enum 1572 rework Job_CheckCommands to reduce indentation 1573 rename Shell fields 1574 add field names in declaration of DEFSHELL_CUSTOM 1575 convert JobState and JobFlags to enum types 1576 move handling of the "..." command to JobPrintCommands 1577 o lst.c: clean up 1578 refactor LstNodeNew 1579 remove Lst_Open, Lst_Next, Lst_Close 1580 remove code for circular lists from Lst_Next 1581 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 1582 /dev/null or anything starting with "no" 1583 convert macros for debug flags into enum 1584 o make.c: inline Lst_Copy in Make_ExpandUse 1585 o meta.c: inline Lst_Find in meta_oodate 1586 make Lst_RemoveIf simpler in meta_oodate 1587 o parse.c: convert error level for Parse_Error to an enum 1588 o suff.c: properly terminate debug output with newline 1589 add more details to DEBUG_SRC log 1590 replace Dir_CopyDir with Dir_CopyDirSearchPath 1591 don't modify GNode name while rebuilding the suffix graph 1592 o var.c: reduce duplicate code in VarFind 1593 15942020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1595 1596 * VERSION (_MAKE_VERSION): 20201022 1597 Merge with NetBSD make, pick up 1598 o more refactoring and simplification to reduce code size 1599 o var.c: extract CanonicalVarname from VarFind 1600 o make.c: extract UpdateImplicitParentsVars from Make_Update 1601 o main.c: extract PrintVar from doPrintVars 1602 extract HandlePWD from main 1603 o lst.c: inline simple Lst getters 1604 remove unused Lst_ForEach 1605 o job.c: move struct Shell from job.h to job.c 1606 o more unit tests 1607 16082020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 1609 1610 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 1611 16122020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1613 1614 * VERSION (_MAKE_VERSION): 20201018 1615 Merge with NetBSD make, pick up 1616 o remove USE_IOVEC 1617 o rename some Hash_* apis to Hash* 1618 o replace execError with execDie 1619 o rename Lst_Init to Lst_New 1620 o add tags to enum types 1621 o rename Stack to Vector 1622 o parse.c: more refactoring 1623 o unit-tests: make some tests use line buffered stdout 1624 o unit-tests/Makefile: in meta mode do not make all tests depend on 1625 Makefile, it isn't necessary. 1626 16272020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 1628 1629 * main.c: check for CTL_HW being defined. 1630 * unit-tests/Makefile: ensure export tests output are POSIX compliant 1631 disable opt-debug-jobs test until it works on ubuntu 1632 1633 * VERSION (_MAKE_VERSION): 20201010 1634 Merge with NetBSD make, pick up 1635 o dir.c: remove pathname limit for Dir_FindHereOrAbove 1636 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 1637 o main.c: extract init_machine and init_machine_arch from main 1638 allow to disable debug logging options 1639 o parse.c: enable format string truncation warnings 1640 extract parsing of sources from ParseDoDependency 1641 split ParseDoSrc into smaller functions 1642 hide implementation details from Parse_DoVar 1643 clean up parsing of variable assignments 1644 split Parse_DoVar into manageable pieces 1645 don't modify the given line during Parse_DoVar 1646 fix out-of-bounds memory access in Parse_DoVar 1647 fix parsing of the :sh assignment modifier 1648 o var.c: rework memory allocation for the name of variables 1649 extract ApplyModifier_Literal into separate function 1650 in lint mode, reject modifiers without delimiter 1651 do not export variable names starting with '-' 1652 o fix double-free bug in -DCLEANUP mode 1653 o more cleanup to enable higher warnings level 1654 o more unit tests 1655 16562020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 1657 1658 * VERSION (_MAKE_VERSION): 20201002 1659 Merge with NetBSD make, pick up 1660 o dir.c: use hash table for looking up open directories by name 1661 o main.c: clean up option handling 1662 o parse.c: add missing const for Parse_AddIncludeDir 1663 o var.c: ApplyModifier_To, update pp in each branch 1664 o remove redundant function prototypes 1665 o more unit tests 1666 16672020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1668 1669 * VERSION (_MAKE_VERSION): 20201001 1670 Merge with NetBSD make, pick up 1671 o compat.c: comment about "..." 1672 16732020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 1674 1675 * VERSION (_MAKE_VERSION): 20200930 1676 Merge with NetBSD make, pick up 1677 o job.c: split Job.jobPipe into 2 separate fields 1678 replace Lst_Open with direct iteration 1679 o lst.c: remove redundant assertions 1680 o targ.c: replace Lst_Open with direct iteration 1681 o var.c: fix bug in evaluation of indirect variable modifiers 1682 extract ApplyModifier_Quote into separate function 1683 o make debug logging simpler 1684 16852020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 1686 1687 * VERSION (_MAKE_VERSION): 20200927 1688 Merge with NetBSD make, pick up 1689 o parse.c: ensure parse errors result in 'stopped in' message. 1690 o compat.c: make parameter of Compat_RunCommand const 1691 o main.c: extract InitVarTarget from main 1692 o parse.c: rename ParseFinishLine to FinishDependencyGroup 1693 refactor ParseDoDependency 1694 o var.c: Var_Subst no longer returns string result 1695 rename Var_ParsePP back to Var_Parse 1696 in lint mode, improve error handling for undefined variables 1697 extract ParseVarname from Var_Parse 1698 o rename Lst_ForEach to Lst_ForEachUntil 1699 o inline Lst_ForEachUntil in several cases 1700 o clean up API for finding and creating GNodes 1701 o fix assertion failure in -j mode with .END node 1702 o inline and remove LstNode_Prev and LstNode_Next 1703 o use fine-grained type names for lists and their nodes 1704 o more unit tests 1705 17062020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1707 1708 * VERSION (_MAKE_VERSION): 20200911 1709 Merge with NetBSD make, pick up 1710 o cond.c: split EvalComparison into smaller functions 1711 reorder parameters of condition parsing functions 1712 reduce code size in CondParser_Eval 1713 rename CondGetString to CondParser_String 1714 add CondLexer_SkipWhitespace 1715 group the condition parsing state into a struct 1716 in CondGetString, replace repeated Buf_Add with Buf_AddStr 1717 o migrate Var_Parse to Var_ParsePP 1718 o add wrappers around ctype.h functions 1719 o lst.c: use a stack instead of a list for the nested include path 1720 o more unit tests 1721 17222020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 1723 1724 * make-bootstrap.sh.in: adjust object list 1725 17262020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1727 1728 * VERSION (_MAKE_VERSION): 20200902 1729 Merge with NetBSD make, pick up 1730 o use make_stat to ensure no confusion over valid fields 1731 returned by cached_stat 1732 o var.c: make VarQuote const-correct 1733 o add unit tests for .for 1734 17352020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1736 1737 * VERSION (_MAKE_VERSION): 20200901 1738 Merge with NetBSD make, pick up 1739 o rename Hash_Table fields 1740 o make data types in Dir_HasWildcards more precise 1741 17422020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 1743 1744 * VERSION (_MAKE_VERSION): 20200831 1745 Merge with NetBSD make, pick up 1746 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 1747 o lst.c: Lst_Open renable assert that list isn't open 1748 o unit test for .TARGET dependent flags 1749 o var.c: fix aliasing bug in VarUniq 1750 o more unit tests for :u 1751 17522020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 1753 1754 * VERSION (_MAKE_VERSION): 20200830 1755 Merge with NetBSD make, pick up 1756 o allow for strict type checking for Boolean 1757 o Var_Parse never returns NULL 1758 o Var_Subst never returns NULL 1759 o Lst_Find now takes boolean match function 1760 o rename Lst_Memeber to Lst_FindDatum 1761 o rename LstNode functions to match their type 1762 o rename GNode.iParents to implicitParents 1763 o fix assertion failure for .SUFFIXES in archives 1764 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 1765 remove unreachable code from CompatRunCommand 1766 o main.c: simplify getBoolean 1767 o stc.c: replace brk_string with simpler Str_Words 1768 o suff.c: add debug macros 1769 17702020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 1771 1772 * VERSION (_MAKE_VERSION): 20200828 1773 Merge with NetBSD make, pick up 1774 o lst.c: inline LstIsValid and LstNodeIsValid 1775 o remove trailing S from Lst function names after migration complete 1776 o more comment cleanup/clarification 1777 o suff.c: clean up suffix handling 1778 o more unit tests 1779 17802020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 1781 1782 * VERSION (_MAKE_VERSION): 20200826 1783 Merge with NetBSD make, pick up 1784 o enum.c: distinguish between bitsets containing flags and 1785 ordinary enums 1786 o var.c: fix error message for ::!= modifier with shell error 1787 o fix bugs in -DCLEANUP mode 1788 17892020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1790 1791 * VERSION (_MAKE_VERSION): 20200824 1792 Merge with NetBSD make, pick up 1793 o in debug mode, print GNode details in symbols 1794 17952020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 1796 1797 * VERSION (_MAKE_VERSION): 20200823 1798 Merge with NetBSD make, pick up 1799 o lst.c: more asserts, 1800 make args to Lst_Find match others. 1801 o var.c: pass flags to VarAdd 1802 o arch.c: use Buffer 1803 o str.c: brk_string return size_t for nwords 1804 o more unit tests 1805 18062020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 1807 1808 * VERSION (_MAKE_VERSION): 1809 Merge with NetBSD make, pick up 1810 o var.c: support for read-only variables eg .SHELL 1811 being the shell used to run scripts. 1812 o lst.c: more simplification 1813 o more documentation and style cleanup 1814 o more unit tests 1815 o ensure unit-test/Makefile is run by TEST_MAKE 1816 o reduce duplication of header inclusion 1817 18182020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 1819 1820 * VERSION (_MAKE_VERSION): 20200821 1821 Merge with NetBSD make, pick up 1822 o lst.c: revert invalid assertion - but document it 1823 o dir.c: split Dir_Init into two functions 1824 18252020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 1826 1827 * lst.c: needs inttypes.h on Linux 1828 1829 * VERSION (_MAKE_VERSION): 20200820 1830 Merge with NetBSD make, pick up 1831 o make.1: clarify some passages 1832 o var.c: more cleanup, clarify comments 1833 o make_malloc.c: remove unreachable code 1834 o cond.c: make CondGetString easier to debug 1835 o simplify list usage 1836 o unit-tests: more 1837 18382020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 1839 1840 * VERSION (_MAKE_VERSION): 20200816 1841 Merge with NetBSD make, pick up 1842 o refactor unit-tests to be more fine grained 1843 not all tests moved yet 1844 18452020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 1846 1847 * VERSION (_MAKE_VERSION): 20200814 1848 Merge with NetBSD make, pick up 1849 o more str_concat variants 1850 o more enums for flags 1851 o var.c: cleanup for higher warnings level 1852 18532020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 1854 1855 * VERSION (_MAKE_VERSION): 20200810 1856 Merge with NetBSD make, pick up 1857 o more unit tests 1858 o general comment and style cleanup 1859 18602020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1861 1862 * VERSION (_MAKE_VERSION): 20200808 1863 Merge with NetBSD make, pick up 1864 o enum.[ch]: streamline, enums for use in flags and debug output 1865 o cond.c: cleanup 1866 o var.c: reduce duplicate code for modifiers 1867 debug logging for Var_Parse 1868 more detailed debug output 1869 o more unit tests 1870 18712020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 1872 1873 * unit-tests/Makefile: -r for recursive and include Makefile.inc 1874 so I can run tests in meta mode 1875 supress extra noise if in meta mode 1876 1877 * VERSION (_MAKE_VERSION): 20200806 1878 Merge with NetBSD make, pick up 1879 o parse.c: remove VARE_WANTRES for LINT 1880 we just want to check parsing (for now). 1881 18822020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 1883 1884 * VERSION (_MAKE_VERSION): 20200805 1885 Merge with NetBSD make, pick up 1886 o make.1: Rework the description of dependence operators 1887 18882020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1889 1890 * VERSION (_MAKE_VERSION): 20200803 1891 Merge with NetBSD make, pick up 1892 o revert some C99 usage, for max portability 1893 o unit-tests/lint 1894 18952020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 1896 1897 * VERSION (_MAKE_VERSION): 20200802 1898 Merge with NetBSD make, pick up 1899 o more unit tests 1900 19012020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 1902 1903 * Remove NetBSD specific plumbing from unit-tests/Makefile 1904 1905 * VERSION (_MAKE_VERSION): 20200801 1906 Merge with NetBSD make, pick up 1907 o make Var_Value return const 1908 o size_t for buf sizes 1909 o optimize some buffer operations - avoid strlen 1910 19112020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1912 1913 * VERSION (_MAKE_VERSION): 20200731 1914 Merge with NetBSD make, pick up 1915 o var.c: fix undefinded behavior for incomplete :t modifier 1916 fixes unit-test/moderrs on Ubuntu 1917 o parse.c: When parsing variable assignments other than := 1918 if DEBUG(LINT) test substition of value, so we get a file and 1919 line number in the resulting error. 1920 o dir.c: fix parsing of nested braces in dependency lines 1921 add unit-tests 1922 19232020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1924 1925 * VERSION (_MAKE_VERSION): 20200730 1926 Merge with NetBSD make, pick up 1927 o var.c: minor cleanup 1928 o unit-tests: more tests to improve code coverage 1929 19302020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 1931 1932 * VERSION (_MAKE_VERSION): 20200728 1933 Merge with NetBSD make, pick up 1934 o var.c: more optimizations 1935 19362020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1937 1938 * VERSION (_MAKE_VERSION): 20200726 1939 Merge with NetBSD make, pick up 1940 o collapse lsd.lib into lst.c - reduce code size and allow inlining 1941 o lots of function comment updates 1942 o var.c: more optimizations 1943 o make return of Var_Parse const 1944 19452020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 1946 1947 * VERSION (_MAKE_VERSION): 20200720 1948 Merge with NetBSD make, pick up 1949 o DEBUG_HASH report stats at end and tone down the noise 1950 o var.c: each flag type gets its own prefix. 1951 move SysV string matching to var.c 1952 make ampersand in ${VAR:from=to&} an ordinary character 1953 cleanup and simplify implementation of modifiers 1954 o make.1: move documentation for assignment modifiers 1955 19562020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 1957 1958 * VERSION (_MAKE_VERSION): 20200718 1959 Merge with NetBSD make, pick up 1960 o DEBUG_HASH to see how well the hash tables are working 1961 19622020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 1963 1964 * bsd.after-import.mk: make sure we update unit-tests/Makefile 1965 19662020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 1967 1968 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 1969 1970 * VERSION (_MAKE_VERSION): 20200710 1971 Merge with NetBSD make, pick up 1972 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 1973 o meta.c: target flagged .META is out-of-date if meta file missing 1974 19752020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 1976 1977 * VERSION (_MAKE_VERSION): 20200709 1978 Merge with NetBSD make, pick up 1979 o cond.c: fix for compare_expression when doEval=0 1980 o unit-tests/Makefile: rework 1981 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 1982 19832020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1984 1985 * VERSION (_MAKE_VERSION): 20200704 1986 Merge with NetBSD make, pick up 1987 (most of this by rillig@) 1988 o lots of style and white-space cleanup 1989 o lots more unit tests for variable modifiers 1990 o simplified description of some functions 1991 o str.c: refactor Str_Match 1992 o var.c: debugging output for :@ 1993 constify VarModify parameter 1994 fix :hash modifier on 16-bit platforms 1995 remove unnecessary forward declarations 1996 refactor ApplyModifier_SysV to have less indentation 1997 simplify code for :E and :R 1998 clean up code for :H and :T 1999 refactor ApplyModifiers 2000 2001 * var.c: we need stdint.h on some platforms to get uint32_t 2002 * unit-test/Makefile: we need to supress the specific error 2003 for RE substitution error in modmisc, since it varies accross 2004 different OS. 2005 20062020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2007 2008 * VERSION (_MAKE_VERSION): 20200702 2009 Merge with NetBSD make, pick up 2010 o var.c: more improvements to avoiding unnecessary evaluation 2011 use enums for flags 2012 o remove flags arg to Var_Set which outside of var.c is always 0 2013 20142020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2015 2016 * VERSION (_MAKE_VERSION): 20200701 2017 Merge with NetBSD make, pick up 2018 o var.c: with change to cond.c; ensure that nested variables 2019 within a variable name are expanded. 2020 o unit-tests/varmisc.mk: test for nested varname 2021 20222020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2023 2024 * VERSION (_MAKE_VERSION): 20200629 2025 Merge with NetBSD make, pick up 2026 o cond.c: do not eval unnecessary terms of conditionals. 2027 20282020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2029 2030 * VERSION (_MAKE_VERSION): 20200625 2031 Merge with NetBSD make, pick up 2032 o meta.c: report error if lseek in filemon_read fails 2033 20342020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2035 2036 * VERSION (_MAKE_VERSION): 20200622 2037 Merge with NetBSD make, pick up 2038 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2039 20402020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2041 2042 * VERSION (_MAKE_VERSION): 20200619 2043 Merge with NetBSD make, pick up 2044 o str.c: performance improvement for Str_Match for multiple '*' 2045 o dieQuietly: supress the failure output from make 2046 when failing node is a sub-make or a sibling failed. 2047 This cuts down greatly on unhelpful noise at the end of 2048 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2049 20502020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2051 2052 * FILES: add LICENSE to appease some packagers. 2053 This is an attempt to fairly represent the license on almost 2054 200 files, which are almost all BSD-3-Clause 2055 The few exceptions being more liberal. 2056 2057 * VERSION (_MAKE_VERSION): 20200610 2058 Merge with NetBSD make, pick up 2059 o unit test for :Or 2060 20612020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2062 2063 * VERSION (_MAKE_VERSION): 20200606 2064 Merge with NetBSD make, pick up 2065 o make.1: cleanup 2066 2067 * Makefile: fix depends for main.o which broke MAKE_VERSION 2068 20692020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2070 2071 * VERSION (_MAKE_VERSION): 20200605 2072 Merge with NetBSD make, pick up 2073 o dir.c: cached_stats - don't confuse stat and lstat results. 2074 o var.c: add :Or for reverse sort. 2075 20762020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2077 2078 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2079 also if --with-filemon= specifies path to filemon.h 2080 set use_filemon=dev 2081 * dirname.c: remove include of namespace.h 2082 20832020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2084 2085 * VERSION (_MAKE_VERSION): 20200517 2086 Merge with NetBSD make, pick up 2087 o modified dollar tests to avoid shell dependencies 2088 o new tests for .INCLUDEFROM 2089 20902020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2091 2092 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2093 to not depend so much on shell behavior 2094 20952020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2096 2097 * VERSION (_MAKE_VERSION): 20200510 2098 Merge with NetBSD make, pick up 2099 o unit test for dollar handling 2100 21012020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2102 2103 * VERSION (_MAKE_VERSION): 20200506 2104 Merge with NetBSD make, pick up 2105 o str.c: empty string does not match % pattern 2106 plus unit-test changes 2107 21082020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2109 2110 * VERSION (_MAKE_VERSION): 20200504 2111 May the 4th be with you 2112 Merge with NetBSD make, pick up 2113 o var.c: import handling of old sysV style modifier using '%' 2114 o str.c: refactor brk_string 2115 o unit-tests: add test case for lazy conditions 2116 21172020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2118 2119 * VERSION (_MAKE_VERSION): 20200418 2120 2121 * configure.in: use_makefile=no for cygwin et al. 2122 case insensitive filesystems just don't work if both 2123 makefile and Makefile exist. 2124 NOTE: bmake does not support cygwin and likely never will, 2125 but if brave souls want to try it - help them out. 2126 21272020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2128 2129 * VERSION (_MAKE_VERSION): 20200402 2130 Merge with NetBSD make, pick up 2131 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2132 a blank command is perfectly valid. 2133 21342020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2135 2136 * VERSION (_MAKE_VERSION): 20200330 2137 Merge with NetBSD make, pick up 2138 o make.h: extern debug_file 2139 21402020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2141 2142 * VERSION (_MAKE_VERSION): 20200318 2143 Merge with NetBSD make, pick up 2144 o meta.c: meta_oodate, check for corrupted meta file 2145 earlier and more often. 2146 21472020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2148 2149 * VERSION (_MAKE_VERSION): 20200220 2150 21512020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2152 2153 * boot-strap: unset MAKEFLAGS 2154 21552020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2156 2157 * VERSION (_MAKE_VERSION): 20200212 2158 * meta.c: meta_compat_parent check for USE_FILEMON 2159 patch from Soeren Tempel 2160 21612020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2162 2163 * VERSION: 20200205 2164 Merge with NetBSD make, pick up 2165 o meta.c: fix compat mode, need to call meta_job_output() 2166 o job.c: extra fds for meta mode not needed if using filemon_dev 2167 21682020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2169 2170 * VERSION: 20200122 2171 Merge with NetBSD make, pick up 2172 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2173 returns FALSE. 2174 21752020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2176 2177 * VERSION: 20200121 2178 Merge with NetBSD make, pick up 2179 o filemon/filemon_{dev,ktrace}.c: allow selection of 2180 filemon implementation. filemon_dev.c uses the kernel module 2181 while filemon_ktrace.c leverages the fktrace api available in 2182 NetBSD. filemon_ktrace.c can hopefully form the basis for 2183 adding support for other tracing mechanisms such as strace on 2184 Linux. 2185 o meta.c: when target is out-of-date per normal make rules 2186 record value of .OODATE in meta file. 2187 21882019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2189 2190 * VERSION: 20190926 2191 Merge with NetBSD make, pick up 2192 o parse.c: don't pass NULL to realpath(3) 2193 some versions cannot handle it. 2194 21952019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2196 2197 * VERSION: 20190409 2198 Merge with NetBSD make, pick up 2199 o parse.c: ParseDoDependency: free paths rather than assert 2200 22012018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2202 2203 * VERSION: 20181222 2204 2205 * configure.in: add --without-makefile to avoid generating 2206 makefile and make-bootstrap.sh 2207 2208 * include Makefile.inc if it exists 2209 2210 * Use Makefile and Makefile.config.in in unit-tests 2211 so we can use just: make obj && make && make test 2212 when bmake is already available. 2213 We add --without-makefile to CONFIGURE_ARGS in this case. 2214 2215 * tweak bsd.after-import.mk (captures Makefile.config etc 2216 after import to FreeBSD for example) to cope with all the above. 2217 22182018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2219 2220 * VERSION: 20181221 2221 Merge with NetBSD make, pick up 2222 o parse.c: ParseVErrorInternal use .PARSEDIR 2223 and apply if relative, and then use .PARSEFILE 2224 for consistent result. 2225 22262018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2227 2228 * VERSION: 20181220 2229 Merge with NetBSD make, pick up 2230 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2231 is relative 2232 o var.c: avoid SEGFAULT in .unexport-env 2233 when MAKELEVEL is not set 2234 22352018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2236 2237 * VERSION: 20181216 2238 Merge with NetBSD make, pick up 2239 o fix for unit-tests/varquote.mk on Debian 2240 22412018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2242 2243 * VERSION: 20180919 2244 Merge with NetBSD make, pick up 2245 o var.c: add :q 2246 o dir.c: cleanup caching of stats 2247 22482018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2249 2250 * Makefile.config.in: use += where it makes sense. 2251 22522018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2253 2254 * VERSION: 20180512 2255 Merge with NetBSD make, pick up 2256 o job.c: skip polling job token pipe 2257 22582018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2259 2260 * VERSION: 20180405 2261 Merge with NetBSD make, pick up 2262 o parse.c: be more cautious about detecting depenency line 2263 rather than sysV style include. 2264 22652018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2266 2267 * VERSION: 20180222 2268 Merge with NetBSD make, pick up 2269 o parse.c: avoid calling sysconf for every call to loadfile 2270 22712018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2272 2273 * VERSION: 20180218 2274 Merge with NetBSD make, pick up 2275 o var.c: Var_Set handle NULL value anytime. 2276 22772018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2278 2279 * VERSION: 20180212 2280 Merge with NetBSD make, pick up 2281 o parse.c: do not treat .info as warning with -W 2282 22832017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2284 2285 * VERSION: 20171207 2286 Merge with NetBSD make, pick up 2287 o var.c: Var_Append use Var_Set if var not previously set 2288 so that VAR_CMD is handled correctly. 2289 Add a suitable unit-test. 2290 22912017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2292 2293 * VERSION (_MAKE_VERSION): 20171126 2294 2295 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2296 since AC_TRY_COMPILE puts input inside main() 2297 which upsets modern compilers. 2298 22992017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2300 2301 * VERSION: 20171118 2302 Merge with NetBSD make, pick up 2303 o var.c: do not append to variable set on command line 2304 add unit-test to catch this. 2305 23062017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2307 2308 * VERSION: 20171028 2309 Merge with NetBSD make, pick up 2310 o main.c: ignore empty MAKEOBJDIR 2311 2312 * Makefile.config.in: 2313 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2314 23152017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2316 2317 * VERSION: 20171005 2318 2319 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2320 consistent result on some platforms. 2321 23222017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2323 2324 * machine.sh: entry for AIX 2325 23262017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2327 2328 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2329 to a file that can be included by configure as well as make. 2330 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2331 23322017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2333 2334 * Makefile (_MAKE_VERSION): 20170810 2335 Merge with NetBSD make, pick up 2336 o meta.c: if target is in subdir we only need subdir name in 2337 meta_name. 2338 23392017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2340 2341 * Makefile (_MAKE_VERSION): 20170720 2342 Merge with NetBSD make, pick up 2343 o compat.c: pass SIGINT etc onto child and wait for it to exit 2344 before we self-terminate. 2345 23462017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2347 2348 * Makefile (_MAKE_VERSION): 20170711 2349 forgot to update after merge on 20170708 ;-) 2350 o main.c: refactor to reduce size of main function. 2351 add -v option to always fully expand values. 2352 o meta.c: ensure command output in meta file has ending newline 2353 even when filemon not being used. 2354 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2355 pathname via ':L' since any ':' in pathname breaks that. 2356 Instead set a '${.p.}' to pathname in the target context and 2357 use that. 2358 23592017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2360 2361 * Makefile (_MAKE_VERSION): 20170510 2362 Merge with NetBSD make, pick up 2363 o main.c: Main_SetObjdir: ensure buf2 is in scope 2364 23652017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2366 2367 * Makefile (_MAKE_VERSION): 20170505 2368 see mk/ChangeLog 2369 23702017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2371 2372 * parse.c: not everyone has stdint.h 2373 23742017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2375 2376 * Makefile (_MAKE_VERSION): 20170501 2377 see mk/ChangeLog 2378 23792017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2380 2381 * Makefile (_MAKE_VERSION): 20170421 2382 Merge with NetBSD make, pick up 2383 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2384 23852017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2386 2387 * Makefile (_MAKE_VERSION): 20170420 2388 Merge with NetBSD make, pick up 2389 o main.c: only use -C arg "as is" if it contains no 2390 relative component. 2391 23922017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2393 2394 * Makefile (_MAKE_VERSION): 20170418 2395 Merge with NetBSD make, pick up 2396 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2397 23982017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2399 2400 * Makefile (_MAKE_VERSION): 20170417 2401 Merge with NetBSD make, pick up 2402 o fixes a number of coverity complaints 2403 - check return value of fseek, fcntl 2404 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2405 JobPrintCommand, ParseTraditionalInclude 2406 - use bmake_malloc() where NULL is not tollerated 2407 - use MAKE_ATTR_UNUSED rather that kludges like 2408 return(unused ? 0 : 0) 2409 - use purge_cached_realpaths() rather than abuse cached_realpath() 2410 24112017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2412 2413 * Makefile (_MAKE_VERSION): 20170413 2414 Merge with NetBSD make, pick up 2415 o main.c: when setting .OBJDIR ignore '$' in paths. 2416 2417 * job.c: use MALLOC_OPTIONS to set malloc_options. 2418 24192017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2420 2421 * Makefile (_MAKE_VERSION): 20170411 2422 Merge with NetBSD make, pick up 2423 o str.c: Str_Match: allow [^a-z] to behave as expected. 2424 24252017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2426 2427 * Makefile (_MAKE_VERSION): 20170326 2428 Merge with NetBSD make, pick up 2429 o main.c: purge relative paths from realpath cache when .OBJDIR 2430 is changed. 2431 24322017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2433 2434 * Makefile (_MAKE_VERSION): 20170311 2435 Merge with NetBSD make, pick up 2436 o main.c: only use -C arg "as is" if it starts with '/'. 2437 24382017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2439 2440 * Makefile (_MAKE_VERSION): 20170301 2441 Merge with NetBSD make, pick up 2442 o main.c: use -C arg "as is" rather than getcwd() 2443 if they identify the same directory. 2444 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2445 24462017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2447 2448 * Makefile (_MAKE_VERSION): 20170201 2449 Merge with NetBSD make, pick up 2450 o var.c: allow :_=var and avoid use of special context. 2451 24522017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2453 2454 * Makefile (_MAKE_VERSION): 20170130 2455 Merge with NetBSD make, pick up 2456 o var.c: add :range and :_ 2457 o main.c: partially initialize Dir_* before MainParseArgs() 2458 can be called. 2459 If -V, skip Main_ExportMAKEFLAGS() 2460 24612017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2462 2463 * Makefile (_MAKE_VERSION): 20170114 2464 Merge with NetBSD make, pick up 2465 o var.c: allow specifying the utc value used by :{gm,local}time 2466 24672016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2468 2469 * Makefile (_MAKE_VERSION): 20161212 2470 Merge with NetBSD make, pick up 2471 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2472 24732016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2474 2475 * Makefile (_MAKE_VERSION): 20161209 2476 Merge with NetBSD make, pick up 2477 o main.c: cleanup setting of .OBJDIR 2478 o parse.c: avoid coredump from (var)=val 2479 24802016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2481 2482 * Makefile (_MAKE_VERSION): 20161126 2483 Merge with NetBSD make, pick up 2484 o make.c: Make_OODate: report src node name if path not set 2485 24862016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2487 2488 * Makefile (_MAKE_VERSION): 20160926 2489 Merge with NetBSD make, pick up 2490 o support for .DELETE_ON_ERROR: (remove targets that fail) 2491 24922016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2493 2494 * Makefile MAN: tweak .Dt to match ${PROG} 2495 24962016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2497 2498 * Makefile (_MAKE_VERSION): 20160818 2499 its a neater number; pick up whitespace fixes to man page. 2500 25012016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2502 2503 * Makefile (_MAKE_VERSION): 20160817 2504 Merge with NetBSD make, pick up 2505 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2506 so we can call it before adding entries to missingFiles. 2507 Thus we do not track files we have been told to ignore. 2508 25092016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2510 2511 * Makefile (_MAKE_VERSION): 20160815 2512 Merge with NetBSD make, pick up 2513 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 2514 pathnames, and skip if the expansion is empty. 2515 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 2516 25172016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2518 2519 * Makefile (_MAKE_VERSION): 20160812 2520 Merge with NetBSD make, pick up 2521 o meta.c: remove all missingFiles entries that match a deleted 2522 dir. 2523 o main.c: set .ERROR_CMD if possible. 2524 25252016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2526 2527 * Makefile (_MAKE_VERSION): 20160606 2528 Merge with NetBSD make, pick up 2529 o dir.c: extend mtimes cache to others via cached_stat() 2530 25312016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2532 2533 * Makefile (_MAKE_VERSION): 20160604 2534 Merge with NetBSD make, pick up 2535 o meta.c: missing filemon data is only relevant if we read a 2536 meta file. 2537 Also do not return oodate for a missing metafile if gn->path 2538 points to .CURDIR 2539 25402016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2541 2542 * Makefile (_MAKE_VERSION): 20160602 2543 Merge with NetBSD make, pick up 2544 o cached_realpath(): avoid hitting filesystem more than necessary. 2545 o meta.c: refactor need_meta decision, add knobs for 2546 missing meta file and filemon data wrt out-of-datedness. 2547 25482016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2549 2550 * Makefile (_MAKE_VERSION): 20160528 2551 2552 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 2553 25542016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2555 2556 * Makefile (_MAKE_VERSION): 20160512 2557 Merge with NetBSD make, pick up 2558 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 2559 this is useful for gcov builds. 2560 o propagate errors from filemon(4). 2561 25622016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 2563 2564 * Makefile (_MAKE_VERSION): 20160509 2565 Merge with NetBSD make, pick up 2566 o remove use of non-standard types u_int etc. 2567 o meta.c: apply realpath() before matching against metaIgnorePaths 2568 25692016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 2570 2571 * Makefile (_MAKE_VERSION): 20160404 2572 Merge with NetBSD make, pick up 2573 o allow makefile to set .MAKE.JOBS 2574 2575 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 2576 25772016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 2578 2579 * Makefile (_MAKE_VERSION): 20160315 2580 Merge with NetBSD make, pick up 2581 o fix handling of archive members 2582 25832016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2584 2585 * Makefile (_MAKE_VERSION): rename variable to avoid interference 2586 with checks for ${MAKE_VERSION} 2587 25882016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 2589 2590 * Makefile (MAKE_VERSION): 20160310 2591 Merge with NetBSD make, pick up 2592 o meta.c: treat missing Read file same as Write, incase we Delete it. 2593 25942016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 2595 2596 * Makefile (MAKE_VERSION): 20160307 2597 Merge with NetBSD make, pick up 2598 o var.c: fix :ts\nnn to be octal by default. 2599 o meta.c: meta_finish() to cleanup memory. 2600 26012016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 2602 2603 * Makefile (MAKE_VERSION): 20160226 2604 Merge with NetBSD make, pick up 2605 o meta.c: allow meta file for makeDepend if makefiles want it. 2606 26072016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 2608 2609 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 2610 for backwards compatability. 2611 2612 * Makefile (MAKE_VERSION): 20160220 2613 Merge with NetBSD make, pick up 2614 o var.c: add knob to control handling of '$$' in := 2615 26162016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2617 2618 * Makefile (MAKE_VERSION): 20160218 2619 Merge with NetBSD make, pick up 2620 o var.c: add .export-literal allows us to fix sys.clean-env.mk 2621 post the changes to Var_Subst. 2622 Var_Subst now takes flags, and does not consume '$$' in := 2623 26242016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 2625 2626 * Makefile (MAKE_VERSION): 20160217 2627 Merge with NetBSD make, pick up 2628 o var.c: preserve '$$' in := 2629 o parse.c: add .dinclude for handling included 2630 makefile like .depend 2631 26322015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 2633 2634 * Makefile (MAKE_VERSION): 20151220 2635 Merge with NetBSD make, pick up 2636 o suff.c: re-initialize suffNull when clearing suffixes. 2637 26382015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 2639 2640 * Makefile (MAKE_VERSION): 20151201 2641 Merge with NetBSD make, pick up 2642 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 2643 o meta.c: meta_oodate: use lstat(2) for checking link target 2644 in case it is a symlink. 2645 o var.c: avoid calling brk_string and Var_Export1 with empty 2646 strings. 2647 26482015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2649 2650 * Makefile (MAKE_VERSION): 20151126 2651 Merge with NetBSD make, pick up 2652 o parse.c: ParseTrackInput don't access beyond 2653 end of old value. 2654 26552015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 2656 2657 * Makefile (MAKE_VERSION): 20151022 2658 2659 * Add support for BSD/OS which lacks inttypes.h 2660 and really needs sys/param.h for sys/sysctl.h 2661 also 'type' is not a shell builtin. 2662 2663 * var.c: eliminate uint32_t and need for inttypes.h 2664 2665 * main.c: PrintOnError flush stdout before run .ERROR 2666 2667 * parse.c: cope with _SC_PAGESIZE not being defined. 2668 2669 26702015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 2671 2672 * Makefile (MAKE_VERSION): 20151020 2673 Merge with NetBSD make, pick up 2674 o var.c: fix uninitialized var 2675 26762015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 2677 2678 * var.c: the conditional expressions used with ':?' can be 2679 expensive, if already discarding do not evaluate or expand 2680 anything. 2681 26822015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2683 2684 * Makefile (MAKE_VERSION): 20151010 2685 Merge with NetBSD make, pick up 2686 o Add Boolean wantit flag to Var_Subst and Var_Parse 2687 when FALSE we know we are discarding the result and can 2688 skip operations like Cmd_Exec. 2689 26902015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2691 2692 * Makefile (MAKE_VERSION): 20151009 2693 Merge with NetBSD make, pick up 2694 o var.c: don't check for NULL before free() 2695 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 2696 26972015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2698 2699 * Makefile (MAKE_VERSION): 20150910 2700 Merge with NetBSD make, pick up 2701 o main.c: with -w print Enter/Leaving messages for objdir too 2702 if necessary. 2703 o centralize shell metachar handling 2704 2705 * FILES: add metachar.[ch] 2706 27072015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2708 2709 * Makefile (MAKE_VERSION): 20150606 2710 Merge with NetBSD make, pick up 2711 o make.1: document .OBJDIR target 2712 27132015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2714 2715 * Makefile (MAKE_VERSION): 20150505 2716 Merge with NetBSD make, pick up 2717 o cond.c: be strict about lhs of comparison when evaluating .if 2718 but less so when called from variable expansion. 2719 o unit-tests/cond2.mk: test various error conditions 2720 27212015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 2722 2723 * machine.sh (MACHINE): Add Bitrig 2724 patch from joerg@netbsd.org 2725 27262015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2727 2728 * Makefile (MAKE_VERSION): 20150418 2729 Merge with NetBSD make, pick up 2730 o job.c: use memmove() rather than memcpy() 2731 2732 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 2733 case, so skip it. 2734 27352015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2736 2737 * Makefile (MAKE_VERSION): 20150411 2738 bump version - only mk/ changes. 2739 27402015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2741 2742 * Makefile (MAKE_VERSION): 20150410 2743 Merge with NetBSD make, pick up 2744 o document different handling of '-' in jobs mode vs compat 2745 o fix jobs mode so that '-' only applies to whole job 2746 when shell lacks hasErrCtl 2747 o meta.c: use separate vars to track lcwd and latestdir (read) 2748 per process 2749 27502015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 2751 2752 * Makefile (MAKE_VERSION): 20150401 2753 Merge with NetBSD make, pick up 2754 o meta.c: close meta file in child 2755 2756 * Makefile: use BINDIR.bmake if set. 2757 Same for MANDIR and SHAREDIR 2758 Handy for testing release candidates 2759 in various environments. 2760 27612015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2762 2763 * move initialization of savederr to block where it is used 2764 to avoid spurious warning from gcc5 2765 27662014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2767 2768 * Makefile (MAKE_VERSION): 20141111 2769 just a cooler number 2770 27712014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 2772 2773 * Makefile (MAKE_VERSION): 20141105 2774 Merge with NetBSD make, pick up 2775 o revert major overhaul of suffix handling 2776 and POSIX compliance - too much breakage 2777 and impossible to make backwards compatible. 2778 o we still have the new unit test structure which is ok. 2779 o meta.c ensure "-- filemon" is at start of line. 2780 27812014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 2782 2783 * configure.in: test that result of getconf PATH_MAX is numeric 2784 and discard if not. Apparently needed for Hurd. 2785 27862014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2787 2788 * Makefile (MAKE_VERSION): 20140830 2789 Merge with NetBSD make, pick up 2790 o major overhaul of suffix handling 2791 o improved POSIX compliance 2792 o overhauled unit-tests 2793 27942014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2795 2796 * Makefile (MAKE_VERSION): 20140620 2797 Merge with NetBSD make, pick up 2798 o var.c return varNoError rather than var_Error for ::= modifiers. 2799 28002014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 2801 2802 * Makefile (MAKE_VERSION): 20140522 2803 Merge with NetBSD make, pick up 2804 o var.c detect some parse errors. 2805 28062014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2807 2808 * Fix spelling errors - patch from Pedro Giffuni 2809 28102014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 2811 2812 * Makefile (MAKE_VERSION): 20140214 2813 Merge with NetBSD make, pick up 2814 o .INCLUDEFROM* 2815 o use Var_Value to get MAKEOBJDIR[PREFIX] 2816 o reduced realloc'ign in brk_string. 2817 * configure.in: add a check for compiler supporting __func__ 2818 28192014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2820 2821 * boot-strap: ignore mksrc=none 2822 28232014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 2824 2825 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 2826 28272014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2828 2829 * Makefile (MAKE_VERSION): 20140101 2830 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 2831 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 2832 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 2833 Hurd) 2834 * configure.in: Add AC_PREREQ and check for 2835 sysctl; patch from Andrew Shadura andrewsh at debian.org 2836 28372013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2838 2839 * Makefile (MAKE_VERSION): 20131010 2840 * lose the const from arg to systcl to avoid problems on older BSDs. 2841 28422013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2843 2844 * Makefile (MAKE_VERSION): 20131001 2845 Merge with NetBSD make, pick up 2846 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 2847 hw.machine_arch if necessary. 2848 o meta.c: meta_oodate - need to look at src of Link and target 2849 of Move as well. 2850 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 2851 provide __arraycount() if needed. 2852 28532013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 2854 2855 * Makefile (MAKE_VERSION): 20130904 2856 Merge with NetBSD make, pick up 2857 o Add VAR_INTERNAL context, so that internal setting of 2858 MAKEFILE does not override value set by makefiles. 2859 28602013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 2861 2862 * Makefile (MAKE_VERSION): 20130902 2863 Merge with NetBSD make, pick up 2864 o CompatRunCommand: only apply shellErrFlag when errCheck is true 2865 28662013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2867 2868 * Makefile (MAKE_VERSION): 20130828 2869 Merge with NetBSD make, pick up 2870 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 2871 o Call Job_SetPrefix() from Job_Init() so makefiles have 2872 opportunity to set .MAKE.JOB.PREFIX 2873 28742013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 2875 2876 * Makefile (MAKE_VERSION): 20130730 2877 Merge with NetBSD make, pick up 2878 o Allow suppression of --- job -- tokens by setting 2879 .MAKE.JOB.PREFIX empty. 2880 28812013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 2882 2883 * Makefile (MAKE_VERSION): 20130716 2884 Merge with NetBSD make, pick up 2885 o number of gmake compatibility tweaks 2886 -w for gmake style entering/leaving messages 2887 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 2888 handle MAKEFLAGS containing only letters. 2889 o when overriding a GLOBAL variable on the command line, 2890 delete it from GLOBAL context so -V doesn't show the wrong 2891 value. 2892 28932013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 2894 2895 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 2896 2897 * Makefile (MAKE_VERSION): 20130706 2898 Merge with NetBSD make, pick up 2899 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 2900 true so that CompatRunCommand() can use it, to ensure 2901 consistent behavior with jobs mode. 2902 o use MAKE_LEVEL_ENV to define the variable to propagate 2903 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 2904 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 2905 paths to ignore. 2906 29072013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2908 2909 * Makefile (MAKE_VERSION): 20130604 2910 Merge with NetBSD make, pick up 2911 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 2912 to avoid leaking descriptors. 2913 29142013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2915 2916 * Makefile (MAKE_VERSION): 20130528 2917 Merge with NetBSD make, pick up 2918 o var.c: cleanup some left-overs in VarHash() 2919 29202013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2921 2922 * Makefile (MAKE_VERSION): 20130520 2923 generate manifest from component FILES rather than have to 2924 update FILES when mk/FILES changes. 2925 29262013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2927 2928 * Makefile (MAKE_VERSION): 20130518 2929 Merge with NetBSD make, pick up 2930 o suff.c: don't skip all processsing for .PHONY targets 2931 else wildcard srcs do not get expanded. 2932 o var.c: expand name of variable to delete if necessary. 2933 29342013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2935 2936 * Makefile (MAKE_VERSION): 20130330 2937 Merge with NetBSD make, pick up 2938 o meta.c: refine the handling of .OODATE in commands. 2939 Rather than suppress command comparison for the entire script 2940 as though .NOMETA_CMP had been used, only suppress it for the 2941 one command line. 2942 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 2943 suppress comparison of a command without otherwise affecting it. 2944 o make.1: document that 2945 29462013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 2947 2948 * Makefile (MAKE_VERSION): 20130321 2949 yes, not quite right but its a cooler number. 2950 Merge with NetBSD make, pick up 2951 o parse.c: fix ParseGmakeExport to be portable 2952 and add a unit-test. 2953 * meta.c: call meta_init() before makefiles are read and if built 2954 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 2955 this let's makefiles test for support. 2956 Call meta_mode_init() to process .MAKE.MODE. 2957 29582013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2959 2960 * Makefile (MAKE_VERSION): 20130305 2961 Merge with NetBSD make, pick up 2962 o run .STALE: target when a dependency from .depend is missing. 2963 o job.c: add Job_RunTarget() for the above and .BEGIN 2964 29652013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 2966 2967 * Makefile (MAKE_VERSION): 20130303 2968 Merge with NetBSD make, pick up 2969 o main.c: set .MAKE.OS to utsname.sysname 2970 o job.c: more checks for read and poll errors 2971 o var.c: lose VarChangeCase() saves 4% time 2972 29732013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 2974 2975 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 2976 want to use MAKEOBJDIR 2977 29782013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 2979 2980 * Merge with NetBSD make, pick up 2981 o make.1: more info on how shell commands are handled. 2982 o job.c,main.c: detect write errors to job pipes. 2983 29842013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 2985 2986 * Makefile (MAKE_VERSION): 20130123 2987 Merge with NetBSD make, pick up 2988 o meta.c: if script uses .OODATE and meta_oodate() decides 2989 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 2990 o var.c: in debug output indicate which variabale modifiers 2991 apply to. 2992 o remove Check_Cwd logic the makefiles have been fixed. 2993 29942012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2995 2996 * makefile.in: add a simple makefile for folk who insist on 2997 ./configure; make; make install 2998 it just runs boot-strap 2999 * include mk/* to accommodate the above 3000 * boot-strap: re-work to accommodate the above 3001 mksrc defaults to $Mydir/mk 3002 allow op={configure,build,install,clean,all} 3003 add options to facilitate install 3004 * Makefile.config.in: just the bits set by configure 3005 * Makefile: bump version to 20121212 3006 abandon Makefile.in (NetBSD Makefile) 3007 leverage mk/* instead 3008 * configure.in: ensure srcdir is absolute 3009 30102012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3011 3012 * Makefile.in (MAKE_VERSION): 20121111 3013 fix generation of bmake.cat1 3014 30152012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3016 3017 * Makefile.in (MAKE_VERSION): 20121109 3018 Merge with NetBSD make, pick up 3019 o make.c: MakeBuildChild: return 0 so search continues if a 3020 .ORDER dependency is detected. 3021 o unit-tests/order: test the above 3022 30232012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3024 3025 * Makefile.in (MAKE_VERSION): 20121102 3026 Merge with NetBSD make, pick up 3027 o cond.c: allow cond_state[] to grow. 3028 In meta mode with a very large tree, we can hit the limit 3029 while processing dirdeps. 3030 30312012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3032 3033 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3034 30352012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3036 3037 * Makefile.in (MAKE_VERSION): 20121010 3038 o protect syntax that only bmake parses correctly. 3039 o remove auto setting of FORCE_MACHINE, use configure's 3040 --with-force-machine=whatever if that is desired. 3041 30422012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3043 3044 * Makefile.in: do not lose history from make.1 when generating bmake.1 3045 30462012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3047 3048 * Makefile.in (MAKE_VERSION): 20121007 3049 Merge with NetBSD make, pick up 3050 o compat.c: ignore empty commands - same as jobs mode. 3051 o make.1: document meta chars that cause use of shell 3052 30532012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3054 3055 * Makefile.in (MAKE_VERSION): bump version to 20120911 3056 * bsd.after-import.mk: include Makefile.inc early and allow it to 3057 override PROG 3058 30592012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3060 3061 * Makefile.in (MAKE_VERSION): bump version to 20120831 3062 Merge with NetBSD make, pick up 3063 o cast sizeof() to int for comparison 3064 o minor make.1 tweak 3065 30662012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3067 3068 * Makefile.in (MAKE_VERSION): bump version to 20120830 3069 Merge with NetBSD make, pick up 3070 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3071 o debug flag -dV causes -V to show raw value regardless. 3072 30732012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3074 3075 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3076 gets SRCTOP set. 3077 30782012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3079 3080 * Makefile.in (MAKE_VERSION): bump version to 20120704 3081 Merge with NetBSD make, pick up 3082 o Job_ParseShell should call Shell_Init if it has been 3083 previously called. 3084 * Makefile.in: set USE_META based on configure result. 3085 also .PARSEDIR is safer indicator of bmake. 3086 30872012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3088 3089 * Makefile.in: bump version to 20120626 3090 ensure CPPFLAGS is in CFLAGS 3091 * meta.c: avoid nested externs 3092 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3093 30942012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3095 3096 * Makefile.in (MAKE_VERSION): bump version to 20120620 3097 Merge with NetBSD make, pick up 3098 o make_malloc.c: avoid including make_malloc.h again 3099 3100 * Makefile.in: avoid bmake only syntax or protect with 3101 .if defined(.MAKE.LEVEL) 3102 * bsd.after-import.mk: replace .-include with .sinclude 3103 ensure? SRCTOP gets a value 3104 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3105 31062012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3107 3108 * Makefile.in (MAKE_VERSION): bump version to 20120612 3109 Merge with NetBSD make, pick up 3110 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3111 for greater portability. 3112 o unit-tests/forloop: check that .for works as expected wrt 3113 number of times and with "quoted strings". 3114 31152012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3116 3117 * Makefile.in (MAKE_VERSION): bump version to 20120606 3118 Merge with NetBSD make, pick up 3119 o compat.c: use kill(2) rather than raise(3). 3120 * configure.in: look for sys/dev/filemon 3121 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3122 and pass BOOTSTRAP_XTRAS to boot-strap. 3123 31242012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3125 3126 * Makefile.in (MAKE_VERSION): bump version to 20120604 3127 Merge with NetBSD make, pick up 3128 o util.c and var.c share same var for tracking if environ 3129 has been reallocated. 3130 o util.c provide getenv with setenv. 3131 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3132 when the shell actively strips .MAKE.* from the environment. 3133 We still refer to the variable always as .MAKE.LEVEL 3134 * util.c fix bug in findenv() was finding prefix of name. 3135 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3136 results in more reliable termination of all activity on many 3137 platforms. 3138 31392012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3140 3141 * Makefile.in (MAKE_VERSION): bump version to 20120602 3142 Merge with NetBSD make, pick up 3143 o for.c: handle quoted items in .for list 3144 31452012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3146 3147 * Makefile.in (MAKE_VERSION): bump version to 20120530 3148 Merge with NetBSD make, pick up 3149 o compat.c: ignore empty command. 3150 31512012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3152 3153 * Makefile.in (MAKE_VERSION): bump version to 20120524 3154 * FILES: add bsd.after-import.mk: 3155 A simple means of integrating bmake into a BSD build system. 3156 31572012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3158 3159 * Makefile.in (MAKE_VERSION): bump version to 20120520 3160 Merge with NetBSD make, pick up 3161 o increased limit for nested conditionals. 3162 31632012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3164 3165 * Makefile.in (MAKE_VERSION): bump version to 20120518 3166 Merge with NetBSD make, pick up 3167 o use _exit(2) in signal hanlder 3168 o Don't use the [dir] cache when building nodes that might have 3169 changed since the last exec. 3170 o Avoid nested extern declaration warnings. 3171 31722012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3173 3174 * meta.c (fgetLine): avoid %z - not portable. 3175 * parse.c: Since we moved include of sys/mman.h 3176 and def's of MAP_COPY etc. we got dups from a merge. 3177 31782012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3179 3180 * Makefile.in (MAKE_VERSION): bump version to 20120420 3181 Merge with NetBSD make, pick up 3182 o restore duplicate supression in .MAKE.MAKEFILES 3183 runtime saving can be significant. 3184 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3185 consumption up to 20%. 3186 31872012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3188 3189 * Makefile.in (MAKE_VERSION): bump version to 20120420 3190 Merge with NetBSD make, pick up 3191 o remove duplicate supression in .MAKE.MAKEFILES 3192 o improved dir cache behavior 3193 o gmake'ish export command 3194 31952012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3196 3197 * Makefile.in (MAKE_VERSION): bump version to 20120325 3198 Merge with NetBSD make, pick up 3199 o fix parsing of :[#] in conditionals. 3200 32012012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3202 3203 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3204 since some systems cannot cope with .Nx <version> 3205 32062011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3207 3208 * Makefile.in (MAKE_VERSION): bump version to 20111111 3209 Merge with NetBSD make, pick up 3210 o debug output for .PARSEDIR and .PARSEFILE 3211 32122011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3213 3214 * Makefile.in (MAKE_VERSION): bump version to 20111010 3215 32162011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3217 3218 * boot-strap: check for an expected file in the dirs we look for. 3219 * make-bootstrap.sh: pass on LDSTATIC 3220 32212011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3222 3223 * Makefile.in (MAKE_VERSION): bump version to 20111001 3224 Merge with NetBSD make, pick up 3225 o ensure .PREFIX is set for .PHONY 3226 and .TARGET set for .PHONY run via .END 3227 o __dead used consistently 3228 32292011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3230 3231 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3232 32332011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3234 3235 * Makefile.in (MAKE_VERSION): bump version to 20110905 3236 Merge with NetBSD make, pick up 3237 o meta_oodate: ignore makeDependfile 3238 32392011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3240 3241 * Makefile.in (MAKE_VERSION): bump version to 20110828 3242 Merge with NetBSD make, pick up 3243 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3244 as SILENT if a .meta file is created 3245 32462011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3247 3248 * Makefile.in (MAKE_VERSION): bump version to 20110818 3249 Merge with NetBSD make, pick up 3250 o in meta mode, if target flagged .META a missing .meta file 3251 means target is out-of-date 3252 o fixes for gcc 4.5 warnings 3253 o simplify job printing code 3254 32552011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3256 3257 * Makefile.in (MAKE_VERSION): bump version to 20110808 3258 Merge with NetBSD make, pick up 3259 o do not touch OP_SPECIAL targets when doing make -t 3260 32612011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3262 3263 * Makefile.in (MAKE_VERSION): bump version to 20110622 3264 Merge with NetBSD make, pick up 3265 o meta_oodate detect corrupted .meta file and declare oodate. 3266 * configure.in: add check for setsid 3267 32682011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3269 3270 * Merge with NetBSD make, pick up 3271 o unit-tests/modts now works on MirBSD 3272 32732011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3274 3275 * Makefile.in (MAKE_VERSION): bump version to 20110606 3276 Merge with NetBSD make, pick up 3277 o ApplyModifiers: when we parse a variable which is not 3278 the entire modifier string, or not followed by ':', do not 3279 consider it as containing modifiers. 3280 o loadfile: ensure newline at end of mapped file. 3281 32822011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3283 3284 * Makefile.in (MAKE_VERSION): bump version to 20110505 3285 Merge with NetBSD make, pick up 3286 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3287 of make's control. In meta mode, any generated file within 3288 said bailiwick, which is found to be missing, causes current 3289 target to be out-of-date. 3290 32912011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3292 3293 * Makefile.in (MAKE_VERSION): bump version to 20110411 3294 Merge with NetBSD make, pick up 3295 o when long modifiers fail to match, check sysV style. 3296 - add a test case 3297 32982011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3299 3300 * Makefile.in (MAKE_VERSION): bump version to 20110410 3301 Merge with NetBSD make, pick up 3302 o :hash - cheap 32bit hash of value 3303 o :localtime, :gmtime - use value as format string for strftime. 3304 33052011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3306 3307 * Makefile.in (MAKE_VERSION): bump version to 20110330 3308 mostly because its a cooler version. 3309 Merge with NetBSD make, pick up 3310 o NetBSD tags for meta.[ch] 3311 o job.c call meta_job_finish() after meta_job_error(). 3312 o meta_job_error() should call meta_job_finish() to ensure 3313 .meta file is closed, and safe to copy - if .ERROR target wants. 3314 meta_job_finish() is safe to call repeatedly. 3315 33162011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3317 3318 * unit-tests/modts: use printf if it is a builtin, 3319 to save us from MirBSD 3320 3321 * Makefile.in (MAKE_VERSION): bump version to 20110329 3322 Merge with NetBSD make, pick up 3323 o fix for use after free() in CondDoExists(). 3324 o meta_oodate() report extra commands and return earlier. 3325 33262011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3327 3328 * Makefile.in (MAKE_VERSION): bump version to 20110327 3329 Merge with NetBSD make, pick up 3330 o meta.c, if .MAKE.MODE contains curdirOk=yes 3331 allow creating .meta files in .CURDIR 3332 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3333 formats the output of 'type' differently - so eat any "()" 3334 33352011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3336 3337 * Makefile.in (MAKE_VERSION): bump version to 20110306 3338 Merge with NetBSD make, pick up 3339 o meta.c, only do getcwd() once 3340 33412011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3342 3343 * Makefile.in (MAKE_VERSION): bump version to 20110305 3344 Merge with NetBSD make, pick up 3345 o correct sysV substitution handling of empty lhs and variable 3346 o correct exists() check for dir with trailing / 3347 o correct handling of modifiers for non-existant variables 3348 during evaluation of conditionals. 3349 o ensure MAP_FILE is defined. 3350 o meta.c use curdir[] now exported by main.c 3351 33522011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3353 3354 * Makefile.in (MAKE_VERSION): bump version to 20110225 3355 Merge with NetBSD make, pick up 3356 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3357 makefiles have been read. 3358 o fix example of :? modifier in man page. 3359 33602011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3361 3362 * Makefile.in (MAKE_VERSION): bump version to 20110214 3363 Merge with NetBSD make, pick up 3364 o meta.c handle realpath() failing when generating meta file 3365 name. 3366 3367 * sigcompat.c: convert to ansi so we can use higher warning levels. 3368 3369 33702011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3371 3372 * Makefile.in (MAKE_VERSION): bump version to 20110207 3373 Merge with NetBSD make, pick up 3374 o fix for bug in meta mode. 3375 33762011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3377 3378 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3379 33802011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3381 3382 * Makefile.in (MAKE_VERSION): bump version to 20110101 3383 Merge with NetBSD make, pick up 3384 o use mmap(2) if available, for reading makefiles 3385 33862010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3387 3388 * Makefile.in (MAKE_VERSION): bump version to 20101215 3389 Merge with NetBSD make, pick up 3390 o ensure meta_job_error() does not report a previous .meta file 3391 as being culprit. 3392 33932010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3394 3395 * Makefile.in (MAKE_VERSION): bump version to 20101210 3396 Merge with NetBSD make, pick up 3397 o meta_oodate: track cwd per process, and only consider target 3398 out-of-date if missing file is outside make's CWD. 3399 Ignore files in /tmp/ etc. 3400 o to ensure unit-tests results match, need to control LC_ALL 3401 as well as LANG. 3402 o fix for parsing bug in var.c 3403 34042010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3405 3406 * Makefile.in (MAKE_VERSION): bump version to 20101126 3407 Merge with NetBSD make, pick up 3408 o if stale dependency is an IMPSRC, search via .PATH 3409 o meta_oodate: if a referenced file is missing, target is 3410 out-of-date. 3411 o meta_oodate: if a target uses .OODATE in its commands, 3412 it (.OODATE) needs to be recomputed. 3413 o keep a pointer to youngest child node, rather than just its 3414 mtime. 3415 34162010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3417 3418 * Makefile.in (MAKE_VERSION): bump version to 20101101 3419 34202010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3421 3422 * machine.sh: like os.sh, 3423 allow for uname -p producing useless drivel 3424 34252010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3426 3427 * boot-strap: document configure knobs for meta and filemon. 3428 3429 * Makefile.in (MAKE_VERSION): bump version to 20100911 3430 Merge with NetBSD make, pick up 3431 o meta.c - meta mode 3432 3433 * make-bootstrap.sh.in: handle meta.c 3434 * configure.in: add knobs for use_meta and filemon_h 3435 also, look for dirname, str[e]sep and strlcpy 3436 * util.c: add simple err[x] and warn[x] 3437 34382010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3439 3440 * boot-strap (TOOL_DIFF): set this to ensure tests use 3441 the same version of diff that configure tested 3442 3443 * Makefile.in (MAKE_VERSION): bump version to 20100808 3444 Merge with NetBSD make, pick up 3445 o in jobs mode, when we discover we cannot make something, 3446 call PrintOnError before exit. 3447 34482010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3449 3450 * Makefile.in (MAKE_VERSION): bump version to 20100806 3451 Merge with NetBSD make, pick up 3452 o formatting fixes for ignored errors 3453 o ensure jobs are cleaned up regardless of where wait() was called. 3454 34552010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3456 3457 * Makefile.in (MAKE_VERSION): bump version to 20100618 3458 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3459 34602010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3461 3462 * Makefile.in (MAKE_VERSION): bump version to 20100616 3463 Merge with NetBSD make, pick up 3464 o man page update 3465 o call PrintOnError from JobFinish when we detect an error we 3466 are not ignoring. 3467 34682010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3469 3470 * Makefile.in (MAKE_VERSION): bump version to 20100606 3471 Merge with NetBSD make, pick up 3472 o man page update 3473 34742010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3475 3476 * Makefile.in (MAKE_VERSION): bump version to 20100605 3477 Merge with NetBSD make, pick up 3478 o use bmake_signal() which is a wrapper around sigaction() 3479 in place of signal() 3480 o add .export-env to allow exporting variables to environment 3481 without tracking (so no re-export when the internal value is 3482 changed). 3483 34842010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3485 3486 * Makefile.in (MAKE_VERSION): bump version to 20100524 3487 Merge with NetBSD make, pick up 3488 o fix for .info et al being greedy. 3489 34902010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3491 3492 * Makefile.in (MAKE_VERSION): bump version to 20100520 3493 Merge with NetBSD make, pick up 3494 o back to using realpath on argv[0] 3495 but only if contains '/' and does not start with '/'. 3496 34972010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3498 3499 * boot-strap: use absolute path for bmake when running tests. 3500 3501 * Makefile.in (MAKE_VERSION): bump version to 20100510 3502 Merge with NetBSD make, pick up 3503 o revert use of realpath on argv[0] 3504 too many corner cases. 3505 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3506 35072010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3508 3509 * Makefile.in (MAKE_VERSION): bump version to 20100505 3510 Merge with NetBSD make, pick up 3511 o fix for missed SIGCHLD when compiled with SunPRO 3512 actually for bmake, defining FORCE_POSIX_SIGNALS would have 3513 done the job. 3514 35152010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 3516 3517 * Makefile.in (MAKE_VERSION): bump version to 20100430 3518 Merge with NetBSD make, pick up 3519 o fflush stdout before writing to stdout 3520 35212010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 3522 3523 * Makefile.in (MAKE_VERSION): bump version to 20100423 3524 Merge with NetBSD make, pick up 3525 o updated unit tests for Haiku (this time for sure). 3526 * boot-strap: based on patch from joerg 3527 honor --with-default-sys-path better. 3528 * boot-strap: remove mention of --with-prefix-sys-path 3529 35302010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 3531 3532 * Makefile.in (MAKE_VERSION): bump version to 20100422 3533 * Merge with NetBSD make, pick up 3534 o fix for vfork() on Darwin. 3535 o fix for bogus $TMPDIR. 3536 o set .MAKE.MODE=compat for -B 3537 o set .MAKE.JOBS=max_jobs for -j max_jobs 3538 o allow unit-tests to run without any *.mk 3539 o unit-tests/modmisc be more conservative in dirs presumed to exist. 3540 * boot-strap: ignore /usr/share/mk except on NetBSD. 3541 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 3542 ensure sort(1) behaves as expected. 3543 35442010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3545 3546 * boot-strap: add FindHereOrAbove so we can use -m .../mk 3547 35482010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3549 3550 * Makefile.in (MAKE_VERSION): bump version to 20100420 3551 * Merge with NetBSD make, pick up 3552 o fix for variable realpath() behavior. 3553 we have to stat(2) the result to be sure. 3554 o fix for .export (all) when nested vars use :sh 3555 35562010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 3557 3558 * Makefile.in (MAKE_VERSION): bump version to 20100414 3559 * Merge with NetBSD make, pick up 3560 o use realpath to resolve argv[0] (for .MAKE) if needed. 3561 o add realpath from libc. 3562 o add :tA to resolve variable via realpath(3) if possible. 3563 35642010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 3565 3566 * Makefile.in (MAKE_VERSION): bump version to 20100408 3567 * Merge with NetBSD make, pick up 3568 o unit tests for .ERROR, .error 3569 o fix for .ERROR to ensure it cannot be default target. 3570 35712010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 3572 3573 * Makefile.in (MAKE_VERSION): bump version to 20100406 3574 * Merge with NetBSD make, pick up 3575 o fix for compat mode "Error code" going to debug_file. 3576 o fix for .ALLSRC being populated twice. 3577 o support for .info, .warning and .error directives 3578 o .MAKE.MODE to control make's operational mode 3579 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 3580 name(s). 3581 o .MAKE.DEPENDFILE to control the name of the depend file 3582 o .ERROR target - run on failure. 3583 35842010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 3585 3586 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 3587 3588 * os.sh,arch.c: patch for Haiku from joerg at netbsd 3589 35902010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 3591 3592 * Makefile.in (MAKE_VERSION): bump version to 20100222 3593 * Merge with NetBSD make, pick up 3594 o better error msg for .for with mutiple inter vars 3595 3596 * boot-strap: 3597 o use make-bootstrap.sh from joerg at netbsd 3598 to avoid the need for a native make when bootstrapping. 3599 o add "" everywhere ;-) 3600 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 3601 otherwise the pre-formated version. 3602 36032010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 3604 3605 * Makefile.in (MAKE_VERSION): bump version to 20100102 3606 * Merge with NetBSD make, pick up: 3607 o fix for -m .../ 3608 36092009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 3610 3611 * Makefile.in (MAKE_VERSION): bump version to 20091118 3612 * Merge with NetBSD make, pick up: 3613 o .unexport 3614 o report lines that start with '.' and should have ':' 3615 (catch typo's of .el*if). 3616 36172009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3618 3619 * configure.in: Ensure that srcdir and mksrc are absolute paths. 3620 36212009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3622 3623 * Makefile.in (MAKE_VERSION): fix version to 20091007 3624 36252009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 3626 3627 * Makefile.in (MAKE_VERSION): bump version to 200910007 3628 * Merge with NetBSD make, pick up: 3629 o fix for parsing of :S;...;...; applied to .for loop iterator 3630 appearing in a dependency line. 3631 36322009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3633 3634 * Makefile.in (MAKE_VERSION): bump version to 20090909 3635 * Merge with NetBSD make, pick up: 3636 o fix for -C, .CURDIR and .OBJDIR 3637 * boot-strap: 3638 o allow share_dir to be set independent of prefix. 3639 o select default share_dir better when prefix ends in $HOST_TARGET 3640 o if FORCE_BSD_MK etc were set, include them in the suggested 3641 install-mk command. 3642 36432009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 3644 3645 * Makefile.in (MAKE_VERSION): bump version to 20090908 3646 * Merge with NetBSD make, pick up: 3647 o .MAKE.LEVEL for recursion tracking 3648 o fix for :M scanning \: 3649 36502009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3651 3652 * configure.in: Don't -D__EXTENSIONS__ if 3653 AC_USE_SYSTEM_EXTENSIONS says "no". 3654 36552009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 3656 3657 * Makefile.in (MAKE_VERSION): bump version to 20090826 3658 Simplify MAKE_VERSION to just the bare date. 3659 * Merge with NetBSD make, pick up: 3660 o -C directory support. 3661 o support for SIGINFO 3662 o use $TMPDIR for temp files. 3663 o child of vfork should be careful about modifying parent's state. 3664 3665 36662009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 3667 3668 * Appy some patches for MiNT from David Brownlee 3669 36702009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 3671 3672 * Makefile.in (BMAKE_VERSION): bump version to 20090222 3673 * Merge with NetBSD make, pick up: 3674 o Possible null pointer de-ref in Var_Set. 3675 36762009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 3677 3678 * Makefile.in (BMAKE_VERSION): bump version to 20090204 3679 * Merge with NetBSD make, pick up: 3680 o bmake_malloc et al moved to their own .c 3681 o Count both () and {} when looking for the end of a :M pattern 3682 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 3683 o strlist.c - functions for processing extendable arrays of pointers to strings. 3684 o ClientData replaced with void *, so const void * can be used. 3685 o New debug flag C for DEBUG_CWD 3686 36872008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 3688 3689 * Makefile.in (BMAKE_VERSION): bump version to 20081111 3690 Apply patch from Joerg Sonnenberge to 3691 configure.in: 3692 o remove some redundant checks 3693 o check for emlloc etc only in libutil and require the whole family. 3694 util.c: 3695 o remove [v]asprintf which is no longer used. 3696 36972008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3698 3699 * Makefile.in (BMAKE_VERSION): bump version to 20081101 3700 * Merge with NetBSD make, pick up: 3701 o util.c: avoid use of putenv() - christos 3702 37032008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3704 3705 * Makefile.in (BMAKE_VERSION): bump version to 20081030 3706 pick up man page tweaks. 3707 37082008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 3709 3710 * Makefile.in: move processing of LIBOBJS to after is definition! 3711 thus we'll have getenv.c in SRCS only if needed. 3712 3713 * make.1: add examples of how to use :? 3714 3715 * Makefile.in (BMAKE_VERSION): bump version to 20081029 3716 * Merge with NetBSD make, pick up: 3717 o fix for .END processing with -j 3718 o segfault from Parse_Error when no makefile is open 3719 o handle numeric expressions in any variable expansion 3720 o debug output now defaults to stderr, -dF to change it - apb 3721 o make now uses bmake_malloc etc so that it can build natively 3722 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 3723 37242008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 3725 3726 * Makefile.in (BMAKE_VERSION): bump version to 20080808 3727 * Merge with NetBSD make, pick up: 3728 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 3729 long lines in Makefiles 3730 o optimizations for VarQuote by joerg 3731 o fix for PR/38756: dominik: make dumps core on invalid makefile 3732 37332008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 3734 3735 * Makefile.in (BMAKE_VERSION): bump version to 20080515 3736 * Merge with NetBSD make, pick up: 3737 o fix skip setting vars in VAR_GLOBAL context, to handle 3738 cases where VAR_CMD is used for other than command line vars. 3739 37402008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 3741 3742 * boot-strap (make_version): we may need to look in 3743 $prefix/share/mk for sys.mk 3744 3745 * Makefile.in (BMAKE_VERSION): bump version to 20080514 3746 * Merge with NetBSD make, pick up: 3747 o skip setting vars in VAR_GLOBAL context, when already set in 3748 VAR_CMD which takes precedence. 3749 37502008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 3751 3752 * Makefile.in (BMAKE_VERSION): bump version to 20080330 3753 * Merge with NetBSD make, pick up: 3754 o fix for ?= when LHS contains variable reference. 3755 37562008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3757 3758 * merge some patches from NetBSD pkgsrc. 3759 3760 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 3761 the MAKSYSPATH used during bootstrap. 3762 3763 * Makefile.in (BMAKE_VERSION): bump version to 20080215 3764 * Merge with NetBSD make, pick up: 3765 o warn if non-space chars follow 'empty' in a conditional. 3766 37672008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3768 3769 * Makefile.in (BMAKE_VERSION): bump version to 20080118 3770 * Merge with NetBSD make, pick up: 3771 o consider dependencies read from .depend as optional - dsl 3772 o remember when buffer for reading makefile grows - dsl 3773 o add -dl (aka LOUD) - David O'Brien 3774 37752007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 3776 3777 * Makefile.in (BMAKE_VERSION): bump version to 20071022 3778 * Merge with NetBSD make, pick up: 3779 o Allow .PATH<suffix> to be used for .include "" 3780 3781 * boot-strap: source default settings from .bmake-boot-strap.rc 3782 37832007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 3784 3785 * Makefile.in: fix maninstall on various systems 3786 provided that our man.mk is used. 3787 For non-BSD systems we install the preformatted page 3788 into $MANDIR/cat1 3789 37902007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 3791 3792 * boot-strap: make bmake.1 too, so maninstall works. 3793 37942007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 3795 3796 * Makefile.in (BMAKE_VERSION): bump version to 20071014 3797 * Merge with NetBSD make, pick up: 3798 o revamped handling of defshell - configure no longer needs to 3799 know the content of the shells array - apb 3800 o stop Var_Subst modifying its input - apb 3801 o avoid calling ParseTrackInput too often - dsl 3802 38032007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 3804 3805 * Makefile.in (BMAKE_VERSION): bump version to 20071011 3806 * Merge with NetBSD make, pick up: 3807 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 3808 3809 * sigcompat.c: some tweaks for HP-UX 11.x based on 3810 patch from Tobias Nygren 3811 3812 * configure.in: update handling of --with-defshell to match 3813 new make behavior. --with-defshell=/usr/xpg4/bin/sh 3814 will now do what one might hope - provided the chosen shell 3815 behaves enough like sh. 3816 38172007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 3818 3819 * Makefile.in (BMAKE_VERSION): bump to 20071008 3820 * Merge with NetBSD make, pick up: 3821 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 3822 o .export/.MAKE.EXPORTED - export of variables - sjg 3823 o .MAKE.MAKEFILES - track all makefiles read - sjg 3824 o performance improvements - dsl 3825 o revamp parallel job scheduling - dsl 3826 38272006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3828 3829 * Makefile.in (BMAKE_VERSION): bump to 20060728 3830 * Merge with NetBSD make, pick up: 3831 o extra debug info during variable and cond processing - sjg 3832 o shell definition now covers newline - rillig 3833 o minor mem leak in PrintOnError - sjg 3834 38352006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3836 3837 * Makefile.in (BMAKE_VERSION): bump to 20060511 3838 * Merge with NetBSD make, pick up: 3839 o more memory leaks - coverity 3840 o possible overflow in ArchFindMember - coverity 3841 o extract variable modifier code out of Var_Parse() 3842 so it can be called recursively - sjg 3843 o unit-tests/moderrs - sjg 3844 38452006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 3846 3847 * Makefile.in (BMAKE_VERSION): bump to 20060412 3848 * Merge with NetBSD make, pick up: 3849 o fixes for some memory leaks - coverity 3850 o only read first sys.mk etc when searching sysIncPath - sjg 3851 3852 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 3853 setting ${MAKEFILE} - OBATA Akio 3854 38552006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 3856 3857 * Makefile.in (BMAKE_VERSION): bump to 20060318 3858 * Merge with NetBSD make, pick up: 3859 o cleanup of job.c to remove remote handling, distcc is more 3860 useful and this code was likely bit-rotting - dsl 3861 o fix for :P modifier - sjg 3862 * boot-strap: set default prefix to something reasonable 3863 (for me anyway). 3864 38652006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 3866 3867 * Makefile.in (BMAKE_VERSION): bump to 20060301 3868 * Merge with NetBSD make, pick up: 3869 o make .WAIT apply recursively, document and test case - apb 3870 o allow variable modifiers in a variable appear anywhere in 3871 modifier list, document and test case - sjg 3872 38732006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 3874 3875 * Makefile.in (BMAKE_VERSION): bump to 20060222 3876 * Merge with NetBSD make, pick up: 3877 o improved job token handling - dsl 3878 o SIG_DFL the correct signal before exec - dsl 3879 o more debug info during parsing - dsl 3880 o allow variable modifiers to be specified via variable - sjg 3881 * boot-strap: explain why we died if no mksrc 3882 38832005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 3884 3885 * Makefile.in (BMAKE_VERSION): bump to 20051105 3886 * configure.in: always set default_sys_path 3887 default is ${prefix}/share/mk 3888 - remove prefix_sys_path, anyone wanting more than above 3889 needs to set it manually. 3890 38912005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3892 3893 * boot-strap: make this a bit easier for pkgsrc folk. 3894 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 3895 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 3896 38972005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 3898 3899 * Makefile.in (BMAKE_VERSION): bump to 20051102 3900 * job.c (JobFinish): fix likely ancient merge lossage 3901 fix from Todd Vierling. 3902 * boot-strap (srcdir): allow setting mksrc=none 3903 39042005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 3905 3906 * Makefile.in (BMAKE_VERSION): bump to 20051031 3907 * ranlib.h: skip on OSF too. 3908 (NetBSD PR 31864) 3909 39102005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 3911 3912 * Makefile.in (BMAKE_VERSION): bump to 20051002 3913 fix a silly typo 3914 39152005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3916 3917 * Makefile.in (BMAKE_VERSION): bump to 20051001 3918 support for UnixWare and some other systems, 3919 based on patches from pkgsrc/bootstrap 3920 39212005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3922 3923 * Makefile.in (BMAKE_VERSION): bump to 20050901 3924 * Merge with NetBSD make, pick up: 3925 o possible parse error causing us to wander off. 3926 39272005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 3928 3929 * Makefile.in (BMAKE_VERSION): bump to 20050606 3930 * Merge with NetBSD make, pick up: 3931 o :0x modifier for randomizing a list 3932 o fixes for a number of -Wuninitialized issues. 3933 39342005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 3935 3936 * Makefile.in (BMAKE_VERSION): bump to 20050530 3937 * Merge with NetBSD make, pick up: 3938 o Handle dependencies for .BEGIN, .END and .INTERRUPT 3939 3940 * README: was seriously out of date. 3941 39422005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 3943 3944 * Important to use .MAKE rather than MAKE. 3945 39462005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 3947 3948 * Makefile.in (BMAKE_VERSION): bump to 20050315 3949 * Merge with NetBSD make, pick up: 3950 o don't mistake .elsefoo for .else 3951 o use suffix-specific search path correctly 3952 o bunch of style nits 3953 39542004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3955 3956 * boot-strap: 3957 o ensure that args to --src and --with-mksrc 3958 are resolved before giving them to configure. 3959 o add -o "objdir" so that builder can control it, 3960 default is $OS as determined by os.sh 3961 o add -q to suppress all the install instructions. 3962 39632004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 3964 3965 * Remove __IDSTRING() 3966 3967 * Makefile.in (BMAKE_VERSION): bump to 20040508 3968 * Merge with NetBSD make, pick up: 3969 o posix fixes 3970 - remove '-e' from compat mode 3971 - add support for '+' command-line prefix. 3972 o fix for handling '--' on command-line. 3973 o fix include in lst.lib/lstInt.h to simplify '-I's 3974 o we also picked up replacement of MAKE_BOOTSTRAP 3975 with !MAKE_NATIVE which is a noop, but possibly confusing. 3976 39772004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 3978 3979 * Makefile.in (BMAKE_VERSION): bump to 20040414 3980 * Merge with NetBSD make, pick up: 3981 o allow quoted strings on lhs of conditionals 3982 o issue warning when extra .else is seen 3983 o print line numer when errors encountered during parsing from 3984 string. 3985 39862004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 3987 3988 * Makefile.in (BMAKE_VERSION): bump to 20040220 3989 * Merge with NetBSD make, pick up: 3990 o fix for old :M parsing bug. 3991 o re-jigged unit-tests 3992 39932004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3994 3995 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 3996 so that './bmake -f Makefile test' works. 3997 39982004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 3999 4000 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4001 * Merge with NetBSD make, pick up: 4002 o search upwards for *.mk 4003 o fix for double free of var substitution buffers 4004 o use of getopt replaced with custom code, since the usage 4005 (re-scanning) isn't posix compatible. 4006 40072004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4008 4009 * arch.c: don't include ranlib.h on ELF systems 4010 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4011 40122004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4013 4014 * Makefile.in (BMAKE_VERSION): bump to 20040118 4015 4016 * boot-strap (while): export vars we assign to on cmdline 4017 * unit-test/Makefile.in: ternary is .PHONY 4018 40192004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4020 4021 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4022 * Merge with NetBSD make, pick up: 4023 o fix for ternary modifier 4024 40252004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4026 4027 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4028 * Merge with NetBSD make, pick up: 4029 o fix for cond.c to handle compound expressions better 4030 o variable expansion within sysV style replacements 4031 40322003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4033 4034 * Make portable snprintf safer - output to /dev/null first to 4035 check space needed. 4036 4037 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4038 * Merge with NetBSD make, pick up: 4039 o -dg3 to show input graph when things go wrong. 4040 o explicitly look for makefiles in objdir if not found in curdir so 4041 that errors in .depend etc will be reported accurarely. 4042 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4043 instead as it more accurately reflects the expected behavior and 4044 is more consistently implemented. 4045 o avoid use of asprintf. 4046 40472003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4048 4049 * util.c: Add asprintf and vasprintf. 4050 4051 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4052 * Merge with NetBSD make, pick up: 4053 :[] modifier - allows picking words from a variable. 4054 :tW modifier - allows treating value as one big word. 4055 W flag for :C and :S - allows treating value as one big word. 4056 40572003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4058 4059 * Merge with NetBSD make 4060 pick up -de flag to enable printing failed command. 4061 don't skip 1st two dir entries (normally . and ..) since 4062 coda does not have them. 4063 40642003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4065 4066 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4067 * Merge with NetBSD make, pick up: 4068 - changes for -V '${VAR}' to print fully expanded value 4069 cf. -V VAR 4070 - CompatRunCommand now prints the command that failed. 4071 - several files got updated 3 clause Berkeley license. 4072 40732003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4074 4075 * boot-strap: Allow setting configure args on command line. 4076 40772003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4078 4079 * configure.in: add --with-defshell to allow sh or ksh 4080 to be selected as default shell. 4081 4082 * Makefile.in: bump version to 20030731 4083 4084 * Merge with NetBSD make 4085 Pick up .SHELL spec for ksh and associate man page changes. 4086 Also compat mode now uses the same shell specs. 4087 40882003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4089 4090 * var.c (Var_Parse): ensure delim is initialized. 4091 4092 * unit-tests/Makefile.in: use single quotes to avoid problems from 4093 some shells. 4094 4095 * makefile.boot.in: 4096 Run the unit-tests as part of the bootstrap procedure. 4097 40982003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4099 4100 * unit-tests/Makefile.in: always force complaints from 4101 ${TEST_MAKE} to be from 'make'. 4102 4103 * configure.in: add check for 'diff -u' 4104 also fix some old autoconf'isms 4105 4106 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4107 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4108 4109 * Merge with NetBSD make 4110 Pick up fix for :ts parsing error in some cases. 4111 Pick unit-tests. 4112 41132003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4114 4115 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4116 4117 * var.c (Var_Parse): fix bug in :ts modifier, after const 4118 correctness fixes, must pass nstr to VarModify. 4119 41202003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4121 4122 * Makefile.in: BMAKE_VERSION switch to a date based version. 4123 We'll generally use the date of last import from NetBSD. 4124 4125 * Merge with NetBSD make 4126 Pick up fixes for const-correctness, now passes WARNS=3 on 4127 NetBSD. 4128 Pick up :ts modifier, allows controlling the separator used 4129 between words in variable expansion. 4130 41312003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4132 4133 * FILES: include boot-strap and os.sh 4134 4135 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4136 FreeBSD is known to be bad. 4137 4138 * makefile.boot.in (bootstrap): make this the default target. 4139 4140 * Makefile.in: bump version to 3.1.19 4141 4142 * machine.sh: avoid A-Z with tr as it is bound to lose. 4143 41442003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4145 4146 * Merge with NetBSD make 4147 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4148 Plus some doc fixes. 4149 41502003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4151 4152 * Merge with NetBSD make 4153 Pick up fix for PR/1523 - don't count a library as built, if there 4154 is no way to build it 4155 4156 * Bump version to 3.1.18 4157 41582003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4159 4160 * Merge with NetBSD make 4161 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4162 appears in src list. 4163 41642003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4165 4166 * Merge with NetBSD make (mmm 10th anniversary!) 4167 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4168 pick up -X which tells us to not export VAR=val via setenv if 4169 we are already doing so via MAKEFLAGS. This saves valuable env 4170 space on systems like Darwin. 4171 set MAKE_VERSION to 3.1.17 4172 4173 * parse.c: pix up fix for suffix rules 4174 41752003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4176 4177 * Merge with NetBSD make. 4178 pick up fix for propagating -B via MAKEFLAGS. 4179 set MAKE_VERSION to 3.1.16 4180 4181 * Apply some patches from pkgsrc-bootstrap/bmake 4182 Originally by Grant Beattie <grant@netbsd.org> 4183 I may have missed some - since they are based on bmake-3.1.12 4184 41852002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4186 4187 * makefile.boot.in (bmake): update install targets for those that 4188 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4189 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4190 4191 * bmake.cat1: update the pre-formatted man page! 4192 41932002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4194 4195 * Merge with NetBSD make. 4196 pick up fix for premature free of pointer used in call 4197 to Dir_InitCur(). 4198 set MAKE_VERSION to 3.1.15 4199 42002002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4201 4202 * configure.in: determine suitable value for MKSRC. 4203 override using --with-mksrc=PATH. 4204 4205 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4206 configs(8) will use 'sun4' as an alias for 'sparc'. 4207 42082002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4209 4210 * Merge with NetBSD make. 4211 pick up ${.PATH} 4212 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4213 set MAKE_VERSION to 3.1.14 4214 add configure checks for killpg and sys/socket.h 4215 42162002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4217 4218 * tag bmake-3-1-13 4219 4220 * makefile.boot.in (bmake): use install-mk 4221 Also setup ./mk before trying to invoke bmake.boot incase we 4222 needed install-mk to create a sys.mk for us. 4223 4224 * configure.in: If we need to add -I${srcdir}/missing, make it an 4225 absolute path so that it works for lst.lib too. 4226 4227 * make.h: always include sys/cdefs.h since we provide one if the 4228 host does not. 4229 4230 * Makefile.in (install-mk): 4231 use MKSRC/install-mk which will do the right thing. 4232 use uname -p for ARCH if possible. 4233 since install-mk will setup links bsd.prog.mk -> prog.mk if 4234 needed, just .include bsd.prog.mk 4235 4236 * Merge with NetBSD make (NetBSD-1.6) 4237 Code is ansi-C only now. 4238 Bug in handling of dotLast is fixed. 4239 Can now assign .OBJDIR and make will reset its notions of life. 4240 New modifiers :tu :tl for toUpper and toLower. 4241 4242Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4243 4244 * Merge with NetBSD make 4245 pick up fix for .END failure in compat mode. 4246 pick up fix for extra va_end() in ParseVErrorInternal. 4247 4248Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4249 4250 * configure.in: for systems that have sys/cdefs.h check if it is 4251 compatible. If not, include the one under missing, but tell it to 4252 include the native one too - necessary on Linux. 4253 4254 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4255 include_next (for gcc) to get the native sys/cdefs.h 4256 4257Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4258 4259 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4260 leaking descriptors when using -jN. 4261 4262 * job.c (JobPrintCommand): See if "curdir" exists before 4263 attempting to chdir(). Doing the chdir directly in make (when in 4264 compat mode) fails silently, so let the -jN version do the same. 4265 This can happen when building kernels in an object tree and 4266 playing clever games to reset .CURDIR. 4267 4268 * Merged with NetBSD make 4269 pick up .USEBEFORE 4270 4271Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4272 4273 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4274 4275Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4276 4277 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4278 us not to export the iterator variable when using VAR_CMD context. 4279 4280Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4281 4282 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4283 its the wrong "fix". 4284 4285Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4286 4287 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4288 We now simply append the variable names to .MAKEOVERRIDES, and 4289 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4290 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4291 Apart from fixing quoting bugs in previous version, this allows us 4292 to export vars to the environment by simply doing: 4293 .MAKEOVERRIDES+= PATH 4294 Merged again with NetBSD make, but the above is the only change. 4295 4296 * configure.in: added 4297 --disable-pwd-override disable $PWD overriding getcwd() 4298 --disable-check-make-chdir disable make trying to guess 4299 when it should automatically cd ${.CURDIR} 4300 4301 * Merge with NetBSD make, changes include: 4302 parse.c (ParseDoDependency): Spot that the syntax error is 4303 caused by an unresolved cvs/rcs conflict and say so. 4304 var.c: most of Var* functions now take a ctxt as 1st arg. 4305 now does variable substituion on rhs of sysv style modifiers. 4306 4307 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4308 is now done here. We append the name='value' to .MAKEOVERRIDES 4309 rather than directly into MAKEFLAGS as this allows a Makefile to 4310 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4311 very similar mechanism. Note that in adding name='value' to 4312 .MAKEOVERRIDES we do the moral equivalent of: 4313 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4314 4315Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4316 4317 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4318 4319 * Merged with NetBSD make 4320 make -dx can now be used to run commands via sh -x 4321 better error messages on exec failures. 4322 4323Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4324 4325 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4326 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4327 MACHINE etc otherwise they propagate from the previous bmake. 4328 4329 * configure.in (machine): allow --with-machine=generic to make 4330 configure use machine.sh to set MACHINE. 4331 4332 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4333 4334 * Makefile.in: mention in bmake.1 that we use autoconf. 4335 4336 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4337 4338Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4339 4340 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4341 as that rather defeats the usefulness of ${MAKEFILE}. 4342 4343 * main.c (MainParseArgs): append command line variable assignments 4344 to MAKEFLAGS so that they get propagated to child make's. 4345 Apparently this is required POSIX behaviour? Its useful anyway. 4346 4347Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4348 4349 * compat.c (CompatRunCommand): don't use perror() since stdio may 4350 cause problems in child of vfork(). 4351 4352 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4353 This routine prints out the .curdir where we stopped and will also 4354 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4355 4356 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4357 :@ expansion. 4358 4359 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4360 4361 * Added RCSid's for the files we've touched. 4362 4363Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4364 4365 * configure.in: Thanks to some clues from mdb@juniper.net, 4366 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4367 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4368 4369 --with-machine=MACHINE explicitly set MACHINE 4370 --with-force-machine=MACHINE set FORCE_MACHINE 4371 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4372 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4373 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4374 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4375 4376 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4377 4378 * makefile: added a pathetically simple makefile to drive 4379 bootstrapping. Running configure by hand is more useful. 4380 4381 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4382 dependent on NetBSD bsd.*.mk 4383 4384 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4385 _PATH_OBJDIRPREFIX for those that don't want a default. 4386 construct _PATH_DEFSYSPATH from the info we get from configure. 4387 4388 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4389 if MAKE_VERSION is defined. 4390 4391 * compat.c: when we bail, print out the .CURDIR we were in. 4392 4393Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4394 4395 * Merged with NetBSD make 4396 4397 * var.c: fixed a bug in the handling of the modifier :P 4398 if the node as found but the path was null, we segfault trying to 4399 duplicate it. 4400 4401Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4402 4403 * Merged with NetBSD make 4404 4405 * make.c: Make_OODate's test for a library out of date was using 4406 cmtime where it should have used mtime (my bug). 4407 4408 * compat.c: Use perror() to tell us what really went wrong when we 4409 cannot exec a command. 4410 4411Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4412 4413 * Merged with NetBSD make 4414 4415Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4416 4417 * Merged with NetBSD make 4418 4419Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4420 4421 * Merged with NetBSD make 4422 4423Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4424 4425 * Merged with NetBSD make 4426 4427Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4428 4429 * util.c: don't provide signal() since we use sigcompat.c 4430 4431 * Makefile.in: added a build target. 4432 4433 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4434 These allow some quite clever magic. 4435 4436 * main.c (main): added support for getenv(MAKESYSPATH). 4437 4438Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4439 4440 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4441 This avoids objdir having a different value depending on how a 4442 directory was reached (via command line, or subdir.mk). 4443 4444 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4445 4446Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4447 4448 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4449 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4450 I've been testing this in NetBSD's make for some weeks. 4451 4452 * Turn Makefile into Makefile.in and make it useful. 4453 4454Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4455 4456 * Imported NetBSD's -current make(1) and resolve conflicts. 4457 4458 * Applied autoconf patches from bmake v2 4459 4460 * Imported clean code base from NetBSD-1.0 4461