12024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * boot-strap: tests can take a long time; use a cookie to 4 skip them if bmake has not been updated since tests last 5 ran successfully. 6 7 * Makefile: Cygwin handles MANTARGET man 8 9 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 10 112024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 12 13 * VERSION (_MAKE_VERSION): 20240309 14 Merge with NetBSD make, pick up 15 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 16 this allows a .ERROR target to ignore the case of 17 .ERROR_EXIT==6 which just means that the build actually 18 failed somewhere else. 19 202024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 21 22 * VERSION (_MAKE_VERSION): 20240303 23 24 * var.c: on IRIX we need both inttypes.h and stdint.h 25 262024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 27 28 * VERSION (_MAKE_VERSION): 20240301 29 Merge with NetBSD make, pick up 30 o export variables with value from target scope 31 when appropriate. 32 332024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 34 35 * VERSION (_MAKE_VERSION): 20240212 36 Merge with NetBSD make, pick up 37 o remove unneeded conditional-compilation toggles 38 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 39 GMAKEEXPORT NO_REGEX and SUNSHCMD 40 41 * configure.in: add check for regex.h 42 43 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 44 452024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 46 47 * VERSION (_MAKE_VERSION): 20240204 48 Merge with NetBSD make, pick up 49 o var.c: fix some lint (-dL) mode parsing issues 50 512024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 52 53 * VERSION: (_MAKE_VERSION): 20240202 54 Merge with NetBSD make, pick up 55 o make.1: note that arg to :D and :U can be empty 56 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 57 582024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 59 60 * VERSION (_MAKE_VERSION): 20240108 61 Merge with NetBSD make, pick up 62 o miscellaneous cleanups 63 642024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 65 66 * VERSION (_MAKE_VERSION): 20240106 67 Merge with NetBSD make, pick up 68 o fix duplicate progname when reporting an unknown target 69 o unit tests for Cmd_Exec using temp file 70 712024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 72 73 * VERSION (_MAKE_VERSION): 20240105 74 Merge with NetBSD make, pick up 75 o main.c: Cmd_Exec write cmd to a file if too big 76 avoid blowing commandline/env limits 77 782024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 79 80 * VERSION (_MAKE_VERSION): 20240101 81 o util.c: flesh out more of strftime 82 * configure.in: add --with-bmake-strftime 83 it is not a full implementation but enough to pass all 84 the unit-tests. 85 * parse.c: LoadFile do not append \n to empty buffer. 86 872023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 88 89 * VERSION (_MAKE_VERSION): 20231230 90 Merge with NetBSD make, pick up 91 o simplify memory allocation for string buffers 92 o fix declared types of list nodes 93 o suff.c: clean up freeing of suffixes 94 o var.c: simplify debug message for the ':@var@...@' modifier 95 clean up variable handling 96 972023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 98 99 * VERSION (_MAKE_VERSION): 20231226 100 Merge with NetBSD make, pick up 101 o compat.c: ensure make's output is correctly ordered with that of 102 the target when not going to a tty 103 o main.c: check for shellPath whether to call Shell_Init() 104 1052023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 106 107 * VERSION (_MAKE_VERSION): 20231224 108 Merge with NetBSD make, pick up 109 o compat.c: check for shellPath whether to call Shell_Init() 110 tweak the unit test to detect the bug thus fixed. 111 o make.1: do not claim .SHELL is only used by jobs mode. 112 1132023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 114 115 * VERSION (_MAKE_VERSION): 20231220 116 Merge with NetBSD make, pick up 117 o str.c: speed up pattern matching in the ':M' modifier 118 o var.c: fix confusing debug logging when deleting a variable 119 use consistent debug messages style when ignoring variables 120 1212023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 122 123 * VERSION (_MAKE_VERSION): 20231210 124 Merge with NetBSD make, pick up 125 o var.c: avoid segfault on empty :C match expression 126 explain in debug log why variable assignment is ignored. 127 1282023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 129 130 * VERSION (_MAKE_VERSION): 20231208 131 Merge with NetBSD make, pick up 132 o var.c: ensure fromCmd is set correctly for variables set on 133 command line. 134 1352023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 136 137 * configure.in: disable generation of 'makefile' for 138 Darwin by default. 139 140 * boot-strap: docuement --without-makefile 141 1422023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 143 144 * VERSION (_MAKE_VERSION): 20231124 145 Merge with NetBSD make, pick up 146 o main.c: cleanup processing of -j 147 fix lint warning about strchr 148 o var.c: more accurate error message for invalid ':mtime' argument 149 cleanup :[...] modifier 150 avoid reading beyond substring when comparing 151 o unit-tests cover all cases of :mtime, test and explain exporting 152 of variables 153 o cleanup comments 154 1552023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 156 157 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 158 $FreeBSD$ tag, so avoid adding it. 159 1602023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 161 162 * VERSION (_MAKE_VERSION): 20230909 163 Merge with NetBSD make, pick up 164 o main.c: allow -j to compute a multiple of ncpu 165 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 166 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 167 _SC_NPROCESSORS_ONLN 168 .MAKE.JOBS.C will be "yes" if -jC is supported 169 1702023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 171 172 * VERSION (_MAKE_VERSION): 20230820 173 Merge with NetBSD make, pick up 174 o make.1: note that :localtime is better for %s 175 o parse.c: improve error messages for invalid input. 176 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 177 correct result, it is still better to use %s:L:localtime. 178 1792023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 180 181 * VERSION (_MAKE_VERSION): 20230818 182 Merge with NetBSD make, pick up 183 o meta.c: meta_ignore - check raw path against metaIgnorePaths 184 to potentially skip call to realpath. 185 o var.c: be strict when parsing the argument of the ':mtime' modifier 186 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 187 should be used to get an equivalent value to time(3). 188 1892023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 190 191 * VERSION (_MAKE_VERSION): 20230816 192 Merge with NetBSD make, pick up 193 o cond.c: clean up multiple-inclusion guards 194 1952023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 196 197 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 198 if configure cannot work out how to control TZ. 199 Remove varmod-localtime from BROKEN_TESTS for IRIX* 200 2012023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 202 203 * VERSION (_MAKE_VERSION): 20230723 204 205 * configure.in: fix the test for wether TZ=Europe/Berlin works. 206 Depending on the time of year, if run between 22:00 and 00:00 UTC 207 the check in configure would fail incorrectly. 208 Take the day into account as well. 209 2102023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 211 212 * VERSION (_MAKE_VERSION): 20230711 213 Merge with NetBSD make, pick up 214 o make.1: clean up wording, clarify scope of '!' in conditions 215 2162023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 217 218 * make-bootstrap.sh.in: set prefix 219 If configure is run using ksh we get unexpanded ${prefix} in 220 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 221 correct result. 222 2232023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 224 225 * VERSION (_MAKE_VERSION): 20230711 226 bump version for IRIX tweaks 227 228 * make.h: undef OP_NONE if defined 229 230 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 231 232 * configure.in: override INSTALL on IRIX 233 2342023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 235 236 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 237 2382023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 239 240 * VERSION (_MAKE_VERSION): 20230622 241 Merge with NetBSD make, pick up 242 o optimize string matching for ':M' and ':N' 243 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 244 2452023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 246 247 * VERSION (_MAKE_VERSION): 20230621 248 Merge with NetBSD make, pick up 249 o more extensive tests for include guards 250 o parse.c: if a guard is already defined a file that uses the same 251 guard is still guarded by it. 252 2532023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 254 255 * VERSION (_MAKE_VERSION): 20230620 256 Merge with NetBSD make, pick up 257 o allow guards to be targets as well as variables 258 The guard targets may include variable references like 259 __${.PARSEDIR:tA}/${.PARSEFILE}__ 260 2612023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 262 263 * VERSION (_MAKE_VERSION): 20230619 264 Merge with NetBSD make, pick up 265 o unit test for .undef of readOnly vars 266 o optimization for makefiles protected from multiple-inclusion 267 skip even opening the file after first include. 268 Initially this only handles makefiles guarded by a variable 269 target guards are next. 270 2712023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 272 273 * VERSION (_MAKE_VERSION): 20230616 274 Merge with NetBSD make, pick up 275 o var.c: do not allow delete of readOnly variable 276 2772023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 278 279 * VERSION (_MAKE_VERSION): 20230601 280 Merge with NetBSD make, pick up 281 o parse.c: .break takes no args 282 o lots of unit test updates 283 2842023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 285 286 * unit-tests/Makefile: skip tests that require /dev/filemon 287 if it does not exists - issue a warning. 288 2892023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 290 291 * VERSION (_MAKE_VERSION): 20230522 292 Fix building on darwin ppc 293 294 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 295 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 296 2972023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 298 299 * VERSION (_MAKE_VERSION): 20230515 300 301 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 302 compile filemon_ktrace.c 303 3042023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 305 306 * VERSION (_MAKE_VERSION): 20230512 307 o sys.dirdeps.mk - broke after-import target 308 3092023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 310 311 * VERSION (_MAKE_VERSION): 20230510 312 Merge with NetBSD make, pick up 313 o parse.c: don't print null filename in stack traces 314 o var.c: :mtime operate on each word in variable value 315 3162023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 317 318 * VERSION (_MAKE_VERSION): 20230509 319 Merge with NetBSD make, pick up 320 o for.c: skip syntactically wrong .for loops 321 o var.c: allow for :gmtime=${mtime} 322 add :mtime[=timestamp] where timestamp is used if stat(2) 323 fails, if :mtime=error stat(2) failure causes error. 324 3252023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 326 327 * VERSION (_MAKE_VERSION): 20230504 328 Merge with NetBSD make, pick up 329 o compat.c: fix compile on NetBSD 7.2 330 o make.1: fix documentation of .PREFIX to match reality and POSIX 331 o unit-tests: improved var-scope-local 332 3332023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 334 335 * VERSION (_MAKE_VERSION): 20230414 336 Merge with NetBSD make, pick up 337 o minor cleanup 338 3392023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 340 341 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 342 unlimited results in an insane number (0x7fffffffffffffff). 343 If BMAKE_NOFILE_MAX is defined, use that instead. 344 3452023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 346 347 * VERSION (_MAKE_VERSION): 20230321 348 Merge with NetBSD make, pick up 349 * make.1: document seemingly unexplained Error code 6. 350 3512023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 352 353 * VERSION (_MAKE_VERSION): 20230317 354 Merge with NetBSD make, pick up 355 o compat.c: CompatDeleteTarget skip .PHONY targets to be 356 consistent with JobDeleteTarget. 357 o job.c: fix memory leak in handling sysv :from=to modifiers 358 3592023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 360 361 * VERSION (_MAKE_VERSION): 20230303 362 Merge with NetBSD make, pick up 363 o several updated unit-tests 364 3652023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 366 367 * VERSION (_MAKE_VERSION): 20230222 368 Merge with NetBSD make, pick up 369 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 370 3712023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 372 373 * VERSION (_MAKE_VERSION): 20230218 374 Merge with NetBSD make, pick up 375 o var.c: fix parsing of unevaluated subexpressions with 376 unbalanced '{}' 377 3782023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 379 380 * VERSION (_MAKE_VERSION): 20230215 381 Merge with NetBSD make, pick up 382 o inline macros for some variable names 383 o cond.c: reduce complexity of evaluating expressions 384 3852023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 386 387 * VERSION (_MAKE_VERSION): 20230208 388 Merge with NetBSD make, pick up 389 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 390 when it has been used within conditional expressions 391 3922023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 393 394 * VERSION (_MAKE_VERSION): 20230127 395 396 * install-sh: if making directories ensure umask is set 397 to match mode. 398 399 * Makefile: use DIRMODE for directories and 400 NONBINMODE for man pages and mk files 401 4022023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 403 404 * VERSION (_MAKE_VERSION): 20230126 405 Merge with NetBSD make, pick up 406 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 407 should be read-only. 408 4092023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 410 411 * VERSION (_MAKE_VERSION): 20230123 412 Merge with NetBSD make, pick up 413 o .[NO]READONLY: for control of read-only variables 414 o .SYSPATH: for controlling the path searched for makefiles 415 4162023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 417 418 * VERSION (_MAKE_VERSION): 20230120 419 Merge with NetBSD make, pick up 420 o allow for white-space between command specifiers @+- 421 o add more details to warning 'Extra targets ignored' 422 4232023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 424 425 * machine.sh: leverage os.sh rather than duplicate 426 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 427 for that purpose for the past decade or so. 428 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 429 4302023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 431 432 * VERSION (_MAKE_VERSION): 20230101 433 Merge with NetBSD make, pick up 434 o cleanup comments, inline some LazyBuf_ methods 435 o unit-tests/ add/improve comments in tests 436 o make.1: sync list of built-in variables with reality 437 sort list of built-in variables 438 reduce indentation of the long list of variable names 439 use consistent markup for boolean flags 440 move description of .MAKE.MODE below the .MAKE.META block 441 clarify in which case an expression may omit braces 442 4432022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 444 445 * VERSION (_MAKE_VERSION): 20221024 446 Merge with NetBSD make, pick up 447 o change return type of unlink_file back to int 448 4492022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 450 451 * Makefile: Darwin and Linux can handle MANTARGET=man 452 4532022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 454 455 * VERSION (_MAKE_VERSION): 20220928 456 Merge with NetBSD make, pick up 457 o fix more ignored returns from snprintf 458 o compile with higher warnings 459 4602022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 461 462 * main.c meta.c: do not ignore return from snprintf 463 464 * meta.c strlcpy.c: we need prototype for strlcpy 465 466 * sigcompat.c: fix unused function warnings 467 4682022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 469 470 * VERSION (_MAKE_VERSION): 20220924 471 Merge with NetBSD make, pick up 472 o fix bug in .break reset of conditional depth 473 o overhaul and simplify tracking of conditional depth 474 4752022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 476 477 * VERSION (_MAKE_VERSION): 20220912 478 Merge with NetBSD make, pick up 479 o man page updates 480 4812022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 482 483 * VERSION (_MAKE_VERSION): 20220909 484 Merge with NetBSD make, pick up 485 o update unit-tests to handle deprecation of egrep 486 o cond.c: add more details to error message for numeric comparison 487 488 * configure.in: allow for deprecation of egrep 489 490 * Makefile: Linux can handle MANTARGET=man 491 4922022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 493 494 * VERSION (_MAKE_VERSION): 20220903 495 Merge with NetBSD make, pick up 496 o job.c: fix handling of null bytes in output 497 4982022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 499 500 * VERSION (_MAKE_VERSION): 20220902 501 Merge with NetBSD make, pick up 502 o Allow .break to terminate a .for loop early 503 5042022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 505 506 * VERSION (_MAKE_VERSION): 20220901 507 Merge with NetBSD make, pick up 508 o var.c: fix out-of-bounds errors when parsing 509 5102022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 511 512 * VERSION (_MAKE_VERSION): 20220824 513 Merge with NetBSD make, pick up 514 o var.c: revert change to modifier parsing that breaks 515 shell variable references within ':@var@body@' 516 o adjust unit-tests 517 5182022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 519 520 * VERSION (_MAKE_VERSION): 20220818 521 Merge with NetBSD make, pick up 522 o fix exit status for '-q' (since 1994) 523 5242022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 525 526 * VERSION (_MAKE_VERSION): 20220808 527 Merge with NetBSD make, pick up 528 o var.c: fix parsing of modifiers containing unbalanced subexpressions 529 extract parsing of ':D' and ':U' modifiers into separate function 530 5312022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 532 533 * VERSION (_MAKE_VERSION): 20220726 534 535 * Auto-create objdir for bmake/unit-tests if appropriate 536 5372022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 538 539 * VERSION (_MAKE_VERSION): 20220724 540 Merge with NetBSD make, pick up 541 o make.1: describe variable assignment and evaluation more precisely 542 o parse.c: fix out-of-bounds read when parsing an invalid line 543 o var.c: simplify return type of IsShortVarnameValid 544 5452022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 546 547 * VERSION (_MAKE_VERSION): 20220612 548 Merge with NetBSD make, pick up 549 o allow to randomize build order of targets 550 .MAKE.MODE += randomize-targets can help uncover dependency bugs 551 within a makefile. 552 o compat.c: rename Compat_Run to Compat_MakeAll 553 o make.c: inline MakeBuildParent 554 inline make_abort, improve error details 555 o parse.c: reorganize Parse_Error 556 fix memory leak in wildcard targets and sources 557 separate cases in HandleDependencyTargetMundane 558 extract HandleSingleDependencyTargetMundane 559 rename loadfile to LoadFile 560 split IncludeFile into separate functions 561 condense code for searching a file in the paths 562 fix off-by-one error in buffer for .WAIT nodes 563 o str.c: condense Str_Match 564 make code for string matching syntactically more consistent 565 5662022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 567 568 * VERSION (_MAKE_VERSION): 20220418 569 Merge with NetBSD make, pick up 570 o ignore '.POSIX:' if not in first non-comment line 571 of Makefile as specified by POSIX. 572 add unit-tests for above. 573 o meta.c: make it easier to find usage of identifiers 574 o targ.c: add .USEBEFORE to Targ_PrintType 575 5762022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 577 578 * VERSION (_MAKE_VERSION): 20220414 579 580 * unit-tests/Makefile: simplify checks for shells with 581 BROKEN_TESTS, this helps with other Linux distros that 582 use dash. 583 5842022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 585 586 * VERSION (_MAKE_VERSION): 20220330 587 Merge with NetBSD make, pick up 588 o var.c: fix spacing, and a typo in a test 589 5902022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 591 592 * VERSION (_MAKE_VERSION): 20220326 593 Merge with NetBSD make, pick up 594 o parse.c: try to include 'posix.mk' the first time 595 .POSIX: is encountered, to allow for beter POSIX compliance. 596 o var.c: make debug logs more readable 597 prefer 'long long' over 'long' on 32-bit C99 platforms 598 fix crash on .undef of an environment variable 599 6002022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 601 602 * VERSION (_MAKE_VERSION): 20220303 603 Merge with NetBSD make, pick up 604 o tell meta mode unit tests not to expect filemon 605 o cond.c: make debug logging for comparisons less technical 606 o lst.c: fix mem leak in Lst_Remove 607 o str.c: make code for string matching syntactically more consistent 608 o var.c: simplify ParseModifier_Match 609 6102022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 611 612 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 613 614 * VERSION (_MAKE_VERSION): 20220214 615 Merge with NetBSD make, pick up 616 o cond.c: simplify control flow in CondParser_Comparison 617 o job.c: fix echoing of command with '-' in silent target in jobs mode 618 o main.c: prefix the warning about read-only .OBJDIR with a colon 619 o parse.c: remove redundant conditions 620 o var.c: simplify control flow in ModifyWord_SysVSubst 621 6222022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 623 624 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 625 is any chance we have dash as .SHELL 626 627 * VERSION (_MAKE_VERSION): 20220208 628 Merge with NetBSD make, pick up 629 o more unit tests 630 o meta.c: use a variable to hold command line to be filtered 631 to avoid any side effects from content of command line. 632 6332022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 634 635 * VERSION (_MAKE_VERSION): 20220204 636 Merge with NetBSD make, pick up 637 o use unsigned consistently for line numbers, avoid the need for %z 638 o parse.c: do not step off end of input in Parse_IsVar 639 when checking for target local variable assignments 640 6412022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 642 643 * VERSION (_MAKE_VERSION): 20220202 644 Merge with NetBSD make, pick up 645 o remove redundant declaration of HashIter_Init 646 o make DEBUG0 simpler 647 6482022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 649 650 * cast gn->lineno to avoid %z 651 652 * VERSION (_MAKE_VERSION): 20220130 653 Merge with NetBSD make, pick up 654 o more unit tests 655 o make GNode lineno unsigned to please lint 656 o print location of recursive variable references in commands 657 o print "stack trace" (makefile includes) on fatal errors 658 o make.1: refine documentation for target local assignments 659 6602022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 661 662 * VERSION (_MAKE_VERSION): 20220128 663 Merge with NetBSD make, pick up 664 o inline functions called only once 665 o for.c: clean up AddEscape for building the body of a .for loop 666 o hash.c: merge duplicate code for finding an entry in a hash table 667 replace HashEntry_KeyEquals with strncmp 668 o make.1: document quirks of target local variable assignments. 669 o parse.c: cleanup white-space 670 6712022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 672 673 * VERSION (_MAKE_VERSION): 20220126 674 Merge with NetBSD make, pick up 675 o allow setting target local variables 676 o more unit tests 677 o add missing newline after "cannot continue" message 678 o meta.c: clean up eat_dots 679 o parse.c: fix filename in warning about duplicate script 680 o var.c: when expanding nested variables, check simple things first 681 6822022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 683 684 * VERSION (_MAKE_VERSION): 20220116 685 Merge with NetBSD make, pick up 686 o fix for unit-tests/varname-makeflags on non-BSD systems 687 o use Var_Exists rather than Var_Value where appropriate 688 o remove unnecessary functions for expanding variable names 689 o cond.c: inline EvalBare 690 o main.c: lint cleanup 691 o parse.c: condense code in Parse_IsVar 692 use islower for parsing directives (none have upper case) 693 6942022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 695 696 * VERSION (_MAKE_VERSION): 20220112 697 Merge with NetBSD make, pick up 698 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 699 comparion, rarely needed but useful when it is. 700 7012022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 702 703 * VERSION (_MAKE_VERSION): 20220110 704 Merge with NetBSD make, pick up 705 o inline Buf_Clear 706 o remove redundant braces 707 o rename and inline Targ_Precious 708 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 709 o for.c: clean up handling of .for loops 710 fix reported line numbers of continuation lines 711 add details about .for loop variables to stack traces 712 o job.c: reduce code for initializing error handling in shell 713 o main.c: in Cmd_Exec, return error message instead of format string 714 have as few statements as possible between va_start and va_end 715 add debug logging for capturing the output of external commands 716 o make.c: use consistent variable names for varargs 717 o make_malloc.c: remove duplicate code from bmake_strdup 718 o parse.c: add missing printflike annotations 719 remove redundant lines from stack traces 720 fix stack traces in -dp mode 721 reduce confusing code in ParseForLoop 722 fix line number in debug log after returning from a file 723 rename IFile and its fields to match their actual content 724 clean up ParseDependencySources 725 o var.c: shorten ApplyModifier_Assign 726 rename is_shell_metachar, fix character conversion warning 727 merge calls to ApplyModifier_Time 728 merge duplicate code for modifiers 'gmtime' and 'localtime' 729 7302022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 731 732 * parse.c: loadfile restore extra byte in buffer. 733 7342022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 735 736 * VERSION (_MAKE_VERSION): 20220101 737 Merge with NetBSD make, pick up 738 o more unit-tests 739 o remove unnecessary words from command line options in CmdOpts 740 o rename eunlink to unlink_file 741 o cond.c: make ParseWord in condition parser simpler 742 internally return false for irrelevant leaves in conditions 743 replace table for function lookup in conditions with simple code 744 merge duplicate types CondEvalResult and CondResult 745 o for.c: clean up handling of .for loops and .include directives 746 o main.c: constify cached_realpath 747 clean up Cmd_Exec 748 o parse.c: sync API documentation 749 fix error message when reading more than 1 GB from stdin 750 clean up parsing of makefiles 751 fix line number in error message about open conditionals 752 unexport types VarAssignOp and VarAssign 753 clean up function names 754 remove redundant parameters in dependency parsing functions 755 reduce scope of the list of wildcard target names 756 extract OP_NOTARGET into separate function 757 clean up variable names for parsing dependency lines 758 make debug logging a bit more human-friendly 759 o var.c: condense code in ApplyModifier_Assign 760 7612021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 762 763 * VERSION (_MAKE_VERSION): 20211221 764 Merge with NetBSD make, pick up 765 o more unit-tests 766 o style cleanup 767 o in CLEANUP mode, free interned strings at the very end 768 o fix memory leak for filenames in .for loops 769 o buf.c: avoid memory leak 770 o cond.c: condense CondParser_ComparisonOp 771 o hash.c: change return type of HashTable_Set to void 772 o job.c: change return type of Compat_RunCommand from int to bool 773 o main.c: remove bmake_free 774 o parse.c: condense repetetive code in ParseDirective 775 remove dead code for handling traditional include directives 776 clean up parsing of variable assignments 777 remove unreachable code for parsing the dependency operator 778 clean up loading of files 779 fix memory leak in IncludeFile 780 o var.c: fix memory leak when parsing a variable name 781 fix memory leak from ${.SUFFIXES} 782 reduce memory allocation in modifier ':?' and ':C' 783 condense RegexReplace for the modifier ':C' and avoid strlen 784 merge duplicate code for memory handling in Var_Parse 785 distinguish between short-lived and environment variables 786 rename VarFreeEnv to VarFreeShortLived 787 7882021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 789 790 * cond.c: fix mem leak in CondParser_Leaf 791 7922021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 793 794 * VERSION (_MAKE_VERSION): 20211212 795 Merge with NetBSD make, pick up 796 o rename Parse_SetInput to Parse_PushInput 797 o remove remove period from end of error messages and warnings 798 to be more consistent 799 o arch.c: use simpler memory management for parsing archive members 800 o cond.c: rework and reduce recursion 801 o for.c: rename some functions to better reflect purpose 802 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 803 o var.c: in parse errors, mark whitespace more clearly 804 inline ParseEmptyArg into CondParser_FuncCallEmpty 805 minimize calls to LazyBuf_Get in ParseVarnameLong 806 treat .SUFFIXES as a read-only variable 807 8082021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 809 810 * VERSION (_MAKE_VERSION): 20211207 811 Merge with NetBSD make, pick up 812 o inline HashIter_Init 813 o parse.c: inline common subexpression in ParseRawLine 814 o var.c: merge branches for modifiers ':D' and ':U' 815 extract common code into Expr_Words 816 extract common code into Expr_Str 817 move low-level implementation details out of Var_Parse 818 8192021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 820 821 * VERSION (_MAKE_VERSION): 20211206 822 Merge with NetBSD make, pick up 823 o add unit-tests/varmod-loop-delete 824 o for.c: inline Str_Words - reduce memory allocation 825 o parse.c: do not try to expand fixed variable names 826 only allocate the name of an included file if necessary 827 clean up ParseInclude 828 o var.c: fix use-after-free in modifier ':@' 829 save a memory allocation in each modifier ':O' and ':u' 830 save a memory allocation in the modifier ':[...]' 831 in UnexportVars, replace Str_Words with Substring_Words to 832 reduce allocations and copying. 833 8342021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 835 836 * VERSION (_MAKE_VERSION): 20211204 837 Merge with NetBSD make, pick up 838 o flesh out a number of tests 839 o replace enums with bitfields, this simplifies a lot of code. 840 o var.c: refactor ParseModifierPartSubst 841 8422021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 843 844 * VERSION (_MAKE_VERSION): 20211024 845 Merge with NetBSD make, pick up 846 o Punt on write errors - ENOSPC etc. 847 8482021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 849 850 * configure.in: use_defshell, set both DEFSHELL_INDEX 851 and defshell_path if appropriate. 852 This makes it easier to use say the KSH specification with 853 and alternate path for the shell. 854 855 * configure.in compat.c: for SCO we need to force UseShell 856 857 * configure.in: SCO /bin/sh is not usable, provide a list of 858 alternatives for use as .SHELL. 859 We still have to mark some tests as broken, plus more if we end up 860 with ksh as .SHELL. 861 Issue a warning about skipped tests. 862 863 * boot-strap: leave TOOL_DIFF to configure 864 865 * configure.in: on SCO native cc is not usable, 866 gcc is to be found in /usr/gnu/bin 867 and while ancient is at least able to compile bmake. 868 Thus we add /usr/gnu/bin to PATH if it exists, and later 869 check if $CC would have been found via $PATH. 870 If not we set CC to the full path of $CC. 871 Also gnu diff is known to support -u, so if it exists use it. 872 873 * configure.in: move getopt to AC_REPLACE_FUNCS 874 also add AC_C_INLINE - in an attempt to compile using 875 native cc on SCO. 876 877 * configure.in: check for stresep as well as strsep, since we 878 define the later to the former if necessary, and if we have to 879 provide stresep we also need to provide a prototype. 880 881 * configure.in: we no longer need to worry about 882 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 883 884 * make.h: make sure we have __RCSID 885 886 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 887 can control it. 888 8892021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 890 891 * VERSION: 20211020 892 Merge with NetBSD make, pick up 893 o confirm sync of unit-tests 894 8952021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 896 897 * configure.in: check if timezone Europe/Berlin is supported 898 if not try UTC-1 899 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 900 symlink unit-tests -> ../unit-tests/obj so that 901 unit-tests/Makefile.config is put in the right place. 902 * refine filtering of .OBJDIR in unit-tests 903 9042021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 905 906 * Fix unit-tests on Minix 3.2.0 907 o job.c: do not punt if read of token pipe fails for EAGAIN. 908 On Minix at least, we are not ready to read the childExitJob pipe 909 when poll says we are. 910 There should actually be no reason for this pipe to be 911 non-blocking, but while that works fine on {Net,Free}BSD it 912 breaks another test case on Minix. 913 o unit-tests/Makefile: deal with variants of error messages 914 and use of obj as .OBJDIR 915 9162021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 917 918 * configure.in: add sigaction to AC_REPLACE_FUNCS 919 we also need to check for sigaddset etc just for the benefit of 920 sigact.c 921 922 * Add sigact.c as sigaction.c so this "just works". 923 This should have been done back when bmake_signal started using 924 sigaction (I only just noticed that sigact.c wasn't here ;-) 925 Note: I no longer have access to any system where this would matter. 926 9272021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 928 929 * VERSION (_MAKE_VERSION): 20211011 930 931 * Makefile: cleanup a little 932 933 * configure.in: check for sigsetmask 934 9352021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 936 937 * VERSION (_MAKE_VERSION): 20211001 938 Merge with NetBSD make, pick up 939 o reduce locations reducing text size 940 o remove unnecessary const 941 o cond.c: fix lint warning on i386 942 do not allow unquoted 'left == right' after modifier ':?' 943 o hash.c: fix build for DEBUG_HASH_LOOKUP 944 o var.c: fix memory leak in error case of the ':?' modifier 945 9462021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 947 948 * VERSION (_MAKE_VERSION): 20210911 949 Merge with NetBSD make, pick up 950 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 951 9522021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 953 954 * VERSION (_MAKE_VERSION): 20210906 955 Merge with NetBSD make, pick up 956 o more unit tests 957 o lint cleanup 958 o rename some functions to better fit purpose 959 o for.c: cleanup - remove unnecessary optimization 960 fix embedded newlines 961 o parse.c: correct case for CVS/RCS 962 9632021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 964 965 * VERSION (_MAKE_VERSION): 20210808 966 Merge with NetBSD make, pick up 967 o var.c: remove redundant initialization in ApplyModifier_Order 968 969 * mk/options.mk: issue warning for incorrect usage 970 9712021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 972 973 * var.c: use long for :On if we don't have a 64bit int type 974 975 * VERSION (_MAKE_VERSION): 20210803 976 Merge with NetBSD make, pick up 977 o rework varmod-order tests to avoid qsort instability 978 o make.1: clarify :On entry 979 9802021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 981 982 * VERSION (_MAKE_VERSION): 20210731 983 Merge with NetBSD make, pick up 984 o fix some lint issues 985 o more unit tests 986 o var.c: rework of ApplyModifier_Order 987 9882021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 989 990 * util.c: add strto*l if HAVE_STRTO*L not defined 991 992 * VERSION (_MAKE_VERSION): 20210730 993 Merge with NetBSD make, pick up 994 o var.c: add :On and :Orn for numeric sort 995 disabled if no 64bit type available. 996 o _strtol.h: to implement strto*l functions 997 9982021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 999 1000 * VERSION (_MAKE_VERSION): 20210704 1001 Merge with NetBSD make, pick up 1002 o unit-tests: fix some tests to be more portable 1003 - job-output-null not all shells do the same number of write calls 1004 - objdir-writable if TMPDIR is set; /tmp may not be usable 1005 10062021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1007 1008 * VERSION (_MAKE_VERSION): 20210701 1009 Merge with NetBSD make, pick up 1010 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1011 some tests just cannot work in some environments. 1012 o buf.c: simpler upper bound for length in Buf_AddInt 1013 o cond.c: fix grammar in error message for malformed conditional 1014 o for.c: prevent newline injection (from ${.newline}) in .for loops 1015 o var.c: use more practical data type in RegexReplace 1016 (avoid need for %zu) 1017 extract RegexReplace from ModifyWord_SubstRegex 1018 10192021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1020 1021 * VERSION (_MAKE_VERSION): 20210621 1022 Merge with NetBSD make, pick up 1023 o var.c: only report error for unmatched regex subexpression 1024 when linting (-dL) since we cannot tell when an unmatched 1025 subexpression is an expected result. 1026 o move unmatched regex subexpression tests to 1027 varmod-subst-regex.mk and enable strict (lint) mode 1028 10292021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1030 1031 * VERSION (_MAKE_VERSION): 20210616 1032 Merge with NetBSD make, pick up 1033 o more unit tests 1034 o cond.c: rename If_Eval to EvalBare 1035 improve function names for parsing conditions 1036 o job.c: fix error handling of targets that cannot be made 1037 o var.c: uncompress code in ApplyModifier_Unique 1038 10392021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1040 1041 * VERSION (_MAKE_VERSION): 20210518 1042 Merge with NetBSD make, pick up 1043 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1044 o job.c: Print -de error information when running multiple jobs 1045 10462021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1047 1048 * VERSION (_MAKE_VERSION): 20210420 1049 Merge with NetBSD make, pick up 1050 o use C99 bool type 1051 o convert VarEvalFlags back into an enum 1052 o cond.c: do not complain when skipping the condition 'no >= 10' 1053 o hash.c: avoid allocating memory for simple variable names 1054 o job.c: use distinct wording for writing to the shell commands file 1055 remove type name for the abort status in job handling 1056 rename PrintOutput to PrintFilteredOutput to avoid confusion 1057 o main.c: avoid double slash in name of temporary directory 1058 o var.c: use straight quotes for error 'Bad conditional expression' 1059 reduce memory allocations in the modifiers ':D' and ':U' 1060 rename members of ModifyWord_LoopArgs 1061 clean up pattern flags for the modifiers ':S' and ':C' 1062 reduce memory allocation and strlen calls in modifier ':from=to' 1063 in the ':Q' modifier, only allocate memory if necessary 1064 improve performance for LazyBuf 1065 remove redundant parameter from ParseVarnameLong 1066 migrate ParseModifierPart to use Substring 1067 avoid unnecessary calls to strlen when evaluating modifiers 1068 migrate ModifyWord functions to use Substring 1069 migrate handling of the modifier ':S,from,to,' to Substring 1070 reduce debug logging and memory allocation for ${:U...} 1071 reduce verbosity of the -dv debug logging for standard cases 1072 clean up debug logging for ':M' and ':N' 1073 disallow '$' in the variable name of the modifier ':@' 1074 simplify access to the name of an expression during evaluation 1075 10762021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1077 1078 * VERSION (_MAKE_VERSION): 20210330 1079 Merge with NetBSD make, pick up 1080 o replace enum bit-field with struct bit-field for VarEvalFlags 1081 o rename VARE_NONE to VARE_PARSE_ONLY 1082 o var.c: rename ApplyModifiersState to ModChain 1083 fix double varname expansion in the variable modifier '::=' 1084 change debug log for variable evaluation flags to lowercase 1085 10862021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1087 1088 * VERSION (_MAKE_VERSION): 20210314 1089 Merge with NetBSD make, pick up 1090 o var.c: avoid evaluating many modifiers in parse only mode 1091 in strict mode (-dL) many variable references are parsed twice, 1092 the first time just to report parse errors early, so we want to 1093 avoid side effects and wasted effort to the extent possible. 1094 10952021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1096 1097 * VERSION (_MAKE_VERSION): 20210226 1098 Merge with NetBSD make, pick up 1099 o remove freestanding freeIt variables 1100 link via FStr 1101 o var.c: restructure code in ParseVarname to target human readers 1102 improve error message for; 1103 bad modifier in variable expression 1104 unclosed modifier 1105 unknown modifier 1106 remove redundant parameter of ApplySingleModifier 1107 explain non-obvious code around indirect variable modifiers 1108 quote ':S' in error message about missing delimiter 1109 extract ParseModifier_Match into separate function 1110 add context information to error message about ':range' modifier 1111 add quotes around variable name in an error message 1112 reorder code in ModifyWords 1113 use more common parameter order for VarSelectWords 1114 make ModifyWord_Subst a little easier to understand 1115 do not expand variable name from the command line twice 1116 extract ExistsInCmdline from Var_SetWithFlags 1117 save a hash map lookup when defining a cmdline variable 1118 clean up VarAdd, Var_Delete, Var_ReexportVars 1119 use bit-shift expressions for VarFlags constants 1120 rename constants for VarFlags 1121 rename ExprDefined constants for debug logging 1122 rename ExprStatus to ExprDefined 1123 split parameters for evaluating variable expressions 1124 reduce redundant code around ModifyWords 1125 print error about failed shell command before overwriting variable 1126 clean up ValidShortVarname, ParseVarnameShort 1127 rename VarExprStatus to ExprStatus 1128 add functions for assigning the value of an expression 1129 rename ApplyModifiersState_Define to Expr_Define 1130 condense the code for parsing :S and :C modifiers 1131 11322021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1133 1134 * VERSION (_MAKE_VERSION): 20210206 1135 Merge with NetBSD make, pick up 1136 o unit-tests: use private TMPDIR to avoid errors from other users 1137 11382021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1139 1140 * VERSION (_MAKE_VERSION): 20210205 1141 Merge with NetBSD make, pick up 1142 o avoid strdup in mkTempFile 1143 o always use vfork 1144 o rename context and ctxt to scope 1145 o rename some VAR constants to SCOPE 1146 o Var_ functions, move the scope to the front 1147 o use shortcut functions Global_Set and Global_Append 1148 o add shortcut Global_Delete for deleting a global variable 1149 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1150 o compat.c: when exiting due to an error, print graph information 1151 o enum.c: remove overengineered Enum_ValueToString 1152 o make.c: remove unused INTERNAL flag 1153 remove unused return type of MakeBuildParent 1154 o parse.c: replace parse error "Need an operator" with better message 1155 o var.c: improve documentation about variable scopes 1156 rename Var_ValueDirect to GNode_ValueDirect 1157 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1158 merge SetVar into Var_SetWithFlags 1159 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1160 split Var_Append into Var_Append and Var_AppendExpand 1161 replace enum bit-set with bit-field 1162 o unit-tests/var-op-shell: use kill rather than kill -14 1163 which broke on darwin with recent update. 1164 11652021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1166 1167 * configure.in: check for sig_atomic_t and define it as 'int' 1168 if missing. 1169 1170 * VERSION (_MAKE_VERSION): 20210201 1171 Merge with NetBSD make, pick up 1172 o use sig_atomic_t for caught_sigchld 1173 11742021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1175 1176 * VERSION (_MAKE_VERSION): 20210130 1177 Merge with NetBSD make, pick up 1178 o more unit tests 1179 o convert SearchPath to struct 1180 o split Buf_Destroy into Buf_Done and Buf_DoneData 1181 o for.c: split For_Eval into separate functions 1182 rename struct For to struct ForLoop 1183 o job.c: do not create empty shell files in jobs mode 1184 rename JobOpenTmpFile to JobWriteShellCommands 1185 reduce unnecessary calls to waitpid 1186 o parse.c: in -dp mode, print stack trace with each diagnostic 1187 11882021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1189 1190 * VERSION (_MAKE_VERSION): 20210123 1191 Merge with NetBSD make, pick up 1192 o rename Dir_Expand to SearchPath_Expand 1193 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1194 o cond.c: fix debug output for comparison operators in conditionals 1195 o dir.c: split Dir_FindFile into separate functions 1196 11972021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1198 1199 * VERSION (_MAKE_VERSION): 20210120 1200 Merge with NetBSD make, pick up 1201 o fix some more lint nits 1202 o refine some unit tests for portability 1203 o cond.c: rework parsing 1204 12052021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1206 1207 * VERSION (_MAKE_VERSION): 20210110 1208 Merge with NetBSD make, pick up 1209 o fix lint warnings 1210 o consistently use boolean expressions in conditions 1211 12122021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1213 1214 * VERSION (_MAKE_VERSION): 20210108 1215 Merge with NetBSD make, pick up 1216 o job.c: back to polling token pipe if we want a token 1217 o main.c: always print 'stopped in' on first call 1218 The execption is if we bail because of an abort token 1219 in which case just exit 6. 1220 12212021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1222 1223 * VERSION (_MAKE_VERSION): 20210101 1224 Merge with NetBSD make, pick up 1225 o Happy New Year! 1226 o rename CmdOpts.lint to strict 1227 o exit 2 on technical errors 1228 o replace pointers in controlling conditions with booleans 1229 o replace global preserveUndefined with VARE_KEEP_UNDEF 1230 o compat.c: re-export variables from the actual make process 1231 if using vfork this is the effect anyway 1232 o cond.c: clean up VarParseResult constants 1233 o for.c: fix undefined behavior in SubstVarLong 1234 make control flow in SubstVarLong of .for loops more obvious 1235 clean up SubstVarShort in .for loops 1236 extract ForSubstBody from ForReadMore 1237 clean up ForReadMore 1238 simplify termination condition for .for loop 1239 add error handling for .for loop items 1240 job.c: re-export variables from the actual make process 1241 parse.c: remove mmap for loading files, only allow files < 1 GiB 1242 fix edge case in := with undefined in variable name 1243 skip variable expansion in ParseDependencyTargetWord 1244 var.c: split ExportVar into separate functions 1245 clean up code in extracted ExportVar functions 1246 remove dead code from ApplyModifiersIndirect 1247 split Var_Subst into easily understandable functions 1248 clean up VarParseResult constants 1249 12502020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1251 1252 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1253 12542020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1255 1256 * VERSION (_MAKE_VERSION): 20201222 1257 Merge with NetBSD make, pick up 1258 o make DEBUG macro return boolean 1259 o parse.c: fix assertion failure for files without trailing newline 1260 o var.c: allow .undef to undefine multiple variables at once 1261 remove excess newline from parse errors 1262 12632020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1264 1265 * VERSION (_MAKE_VERSION): 20201221 1266 Merge with NetBSD make, pick up 1267 o some unit-test updates 1268 12692020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1270 1271 * VERSION (_MAKE_VERSION): 20201220 1272 Merge with NetBSD make, pick up 1273 o more unit tests 1274 o return FStr from Var_Parse and Var_Value 1275 o spell nonexistent consistently 1276 o add str_basename to reduce duplicate code 1277 o compat.c: fix .ERROR_TARGET in compat -k mode 1278 extract InitSignals from Compat_Run 1279 extract UseShell from Compat_RunCommand 1280 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1281 o for.c: rename ForIterate to ForReadMore 1282 o hash.c: clean up hash function for HashTable 1283 o lst.c: rename Vector.priv_cap to cap 1284 o main.c: remove constant parameter from MakeMode 1285 o make.c: use symbolic time for 0 in Make_Recheck 1286 extract MakeChildren from MakeStartJobs 1287 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1288 fix error message for .info/.warning/.error without argument 1289 extract Var_Undef from ParseDirective 1290 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1291 rename mode constants for ParseGetLine to be more expressive 1292 reduce debugging details in Parse_SetInput 1293 fix line numbers in .for loops 1294 split ParseGetLine into separate functions 1295 fix garbled output for failed shell command 1296 var.c: remove redundant assignment in ApplyModifier_SysV 1297 error out on unknown variable modifiers at parse time 1298 remove wrong error message for indirect modifier in lint mode 1299 extract ApplySingleModifier from ApplyModifiers 1300 use FStr for memory management in Var_SetWithFlags 1301 extract SetVar from Var_SetWithFlags 1302 use FStr in VarNew 1303 extract string functions from ApplyModifier_To 1304 error out if .undef has not exactly 1 argument 1305 extract Var_DeleteVar from Var_Delete 1306 extract Var_Undef from ParseDirective 1307 clean up memory management for expanding variable expressions 1308 13092020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1310 1311 * avoid %zu 1312 1313 * lst.c: avoid anonymous union 1314 1315 * VERSION (_MAKE_VERSION): 20201212 1316 Merge with NetBSD make, pick up 1317 o more unit tests 1318 o inline Targ_Ignore and Targ_Silent 1319 o split JobFlags into separate fields 1320 o remove const from function parameters (left overs from refactoring) 1321 o eliminate boolean argument of Var_Export 1322 o make API of Buf_Init simpler 1323 o rename ParseRunOptions to ParseCommandFlags 1324 o replace *line with line[0] 1325 o compat.c: fix wrong exit status for multiple failed main targets 1326 refactor Compat_Run to show the error condition more clearly 1327 don't make .END if the main targets already failed (-k mode) 1328 fix exit status in -k mode if a dependency fails 1329 o for.c: clean up Buf_AddEscaped in .for loops 1330 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1331 make Job_Touch simpler 1332 refactor JobFinish 1333 rename Shell.exitFlag to errFlag 1334 move Job.xtraced to ShellWriter 1335 make printing of shell commands independent from the job 1336 rename shell flags in struct Shell 1337 extract JobOpenTmpFile from JobStart 1338 rename RunFlags to CommandFlags 1339 split various Job.* into separate fields 1340 rename commandShell to shell 1341 extract InitShellNameAndPath from Shell_Init 1342 replace signal handling macros with local functions 1343 replace macro MESSAGE with local function 1344 parse.c: error out on null bytes in makefiles 1345 error out on misspelled directives 1346 rename IFile.nextbuf to readMore 1347 fix undefined behavior in ParseEOF 1348 str.c: remove redundant call to strlen in Str_Words 1349 var.c: error out on misspelled .unexport-env 1350 error out on misspelled .export directives 1351 extract ExportVars from Var_Export 1352 extract ExportVarsExpand from Var_Export 1353 eliminate boolean argument of Var_Export 1354 fix undefined behavior when exporting ${:U } 1355 rename Var_ExportVars to Var_ReexportVars 1356 rename Var_Export1 to ExportVar 1357 13582020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1359 1360 * VERSION (_MAKE_VERSION): 20201206 1361 Merge with NetBSD make, pick up 1362 o more unit tests 1363 o inline macros for debug logging 1364 o use consistent variable names for list nodes 1365 o define constants for enum zero-values 1366 o dir.c: use fixed format for debug output of the directory cache 1367 remove Dir_InitDir 1368 o lst.c: inline Lst_Enqueue, Vector_Done 1369 o meta.c: remove unused parameter from meta_needed 1370 o parse.c: rename parse functions 1371 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1372 o targ.c: don't concatenate identifiers in Targ_PrintType 1373 o var.c: remove comment decoration 1374 extract UnexportVars from Var_UnExport 1375 extract GetVarnamesToUnexport from Var_UnExport 1376 extract UnexportEnv from Var_UnExport 1377 extract UnexportVar from Var_UnExport 1378 move CleanEnv to UnexportVars 1379 replace pointer comparisons with enum 1380 add FStr to var.c to make memory handling simpler 1381 use FStr in Var_UnExport 1382 move type definitions in var.c to the top 1383 extract FreeEnvVar from Var_Parse 1384 extract ShuffleStrings from ApplyModifier_Order 1385 13862020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1387 1388 * VERSION (_MAKE_VERSION): 20201130 1389 Merge with NetBSD make, pick up 1390 o add unit tests for META MODE 1391 o reduce memory allocation for dirSearchPath, GNode.parents, 1392 GNode.children, OpenDirs 1393 o reduce pointer indirection for GNode.cohorts and 1394 GNode.implicitParents 1395 o remove pointer indirection from GNode.commands 1396 o inline Lst_ForEachUntil in meta mode 1397 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1398 clean up memory management for CachedDirs 1399 fix the reference count of dotLast going negative 1400 add debug logging for OpenDirs_Done 1401 extract CacheNewDir from Dir_AddDir 1402 add debug logging for reference counting of CachedDir 1403 rename some Dir functions to SearchPath 1404 o job.c: rename some global variables 1405 o main.c: reduce memory allocation in ReadBuiltinRules 1406 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1407 CmdOpts.makefiles 1408 Add .MAKE.UID and .MAKE.GID 1409 o make.c: reduce memory allocation for/in toBeMade, 1410 Make_ProcessWait, Make_ExpandUse 1411 o meta.c: reduce memory allocation in meta_oodate 1412 o parse.c: reduce memory allocations for parsing dependencies and 1413 targets 1414 o suff.c: reduce memory allocation in suffix handling 1415 14162020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1417 1418 * VERSION (_MAKE_VERSION): 20201124 1419 Merge with NetBSD make, pick up 1420 o .MAKE.{UID,GID} represent uid and gid running make. 1421 o fix error handling for .BEGIN and .END dependency in -k mode 1422 o fix missing "Stop." after failed .END node in -k mode 1423 o use properly typed comparisons in boolean contexts 1424 o replace a few HashTable_CreateEntry with HashTable_Set 1425 o add HashSet type 1426 o compat.c: split Compat_Make into smaller functions 1427 extract DebugFailedTarget from Compat_RunCommand 1428 o dir.c: refactor Dir_UpdateMTime 1429 migrate CachedDir.files from HashTable to HashSet 1430 o make.c: add high-level API for GNode.made 1431 14322020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1433 1434 * VERSION (_MAKE_VERSION): 20201122 1435 Merge with NetBSD make, pick up 1436 o rename GNode.context to vars 1437 o suff.c: cleanup and refactor 1438 rename some functions and vars to better reflect usage 1439 add high-level API for CandidateSearcher 1440 o targ.c: add more debug logging for suffix handling 1441 o more unit tests 1442 o add debug logging for setting and resetting the main target 1443 14442020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1445 1446 * VERSION (_MAKE_VERSION): 20201117 1447 Merge with NetBSD make, pick up 1448 o fix some unit-tests when .SHELL is dash 1449 o rename Targ_NewGN to GNode_New 1450 o make some GNode functions const 1451 o main.c: call Targ_Init before Var_Init 1452 cleanup PrintOnError, getTmpdir and ParseBoolean 1453 o var.c: fix error message of failed :!cmd! modifier 1454 14552020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1456 1457 * VERSION (_MAKE_VERSION): 20201114 1458 Merge with NetBSD make, pick up 1459 o replace a few HashTable_CreateEntry with HashTable_Set 1460 o clean up cached_stats 1461 o rename DEFAULT to defaultNode 1462 o remove redundant struct make_stat 1463 o cond.c: in lint mode, check for ".else <cond>" 1464 use bitset for IfState 1465 replace large switch with if-else in Cond_EvalLine 1466 o job.c: clean up JobExec, JobStart, JobDoOutput 1467 use stderr for error message about failed touch 1468 clean up Job_Touch 1469 replace macro DBPRINTF with JobPrintln 1470 rename JobState to JobStatus 1471 main.c: switch cache for realpath from GNode to HashTable 1472 clean up Fatal 1473 clean up InitDefSysIncPath 1474 use progname instead of hard-coded 'make' in warning 1475 rename Main_SetVarObjdir to SetVarObjdir 1476 make.1: document the -S option 1477 make.c: fix debug output for GNode details 1478 use symbolic names in debug output of GNodes 1479 14802020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1481 1482 * configure.in: fix --with-force-machine-arch 1483 1484 * VERSION (_MAKE_VERSION): 20201112 1485 Merge with NetBSD make, pick up 1486 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1487 checks in InitObjdir. Explicit .OBJDIR target always allows 1488 read-only directory. 1489 o cond.c: clean up Cond_EvalLine 1490 14912020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1492 1493 * VERSION (_MAKE_VERSION): 20201111 1494 Merge with NetBSD make, pick up 1495 o more unit-tests 1496 o style cleanup 1497 remove redundant parentheses from sizeof operator 1498 replace character literal 0 with '\0'. 1499 replace pointer literal 0 with NULL. 1500 remove redundant parentheses. 1501 replace (expr & mask) == 0 with !(expr & mask). 1502 use strict typing in conditions of the form !var 1503 o rename Make_OODate to GNode_IsOODate 1504 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1505 o rename Var_Set_with_flags to Var_SetWithFlags 1506 o rename dieQuietly to shouldDieQuietly 1507 o buf.c: make API of Buf_Init simpler 1508 o compat.c: clean up Compat_Make, Compat_RunCommand, 1509 CompatDeleteTarget and CompatInterrupt 1510 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1511 clean up CondParser_Comparison 1512 o main.c: rename getBoolean and s2Boolean 1513 rename MAKEFILE_PREFERENCE for consistency 1514 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1515 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1516 replace emptyString with allocated empty string 1517 error out on unclosed expressions after the colon 1518 15192020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1520 1521 * VERSION (_MAKE_VERSION): 20201101 1522 Merge with NetBSD make, pick up 1523 o negate NoExecute to GNode_ShouldExecute 1524 o job.c: rename JobMatchShell to FindShellByName 1525 extract EscapeShellDblQuot from JobPrintCommand 1526 extract ParseRunOptions from JobPrintCommand 1527 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1528 treat malformed :range, :ts and :[...] as errors 1529 add tests for the variable modifiers :[words] and :range 1530 15312020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1532 1533 * VERSION (_MAKE_VERSION): 20201031 1534 Merge with NetBSD make, pick up 1535 o format #include directives consistently 1536 o do not look up local variables like .TARGET anywhere else 1537 o main.c: Main_SetObjdir is first called for curdir which may be 1538 readonly 1539 reduce the scope where recursive expressions are detected 1540 remove redundant :tl from getBoolean 1541 clean up mkTempFile 1542 o meta.c: simplify memory allocation in meta_create and meta_oodate 1543 o parse.c: extract loadedfile_mmap from loadfile 1544 o trace.c: document possible undefined behavior with .CURDIR 1545 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1546 rename ismeta to is_shell_metachar 1547 remove debug logging for the :Q variable modifier 1548 rename VarIsDynamic to VarnameIsDynamic 1549 use consistent parameter order in varname parsing functions 1550 extract ParseVarnameLong from Var_Parse 1551 extract ParseVarnameShort from Var_Parse 1552 fix type of ParseModifierPart parameter delim 1553 extract IsEscapedModifierPart from ParseModifierPart 1554 clean up ModifyWords 1555 add test for combining the :@ and :? variable modifiers 1556 15572020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1558 1559 * VERSION (_MAKE_VERSION): 20201030 1560 Merge with NetBSD make, pick up 1561 o change char * to void * in Var_Value 1562 o make iterating over HashTable simpler 1563 o rename VAR_CMD to VAR_CMDLINE 1564 o cond.c: clean up is_separator 1565 fix parse error in string literal in conditional 1566 o main.c: do not use objdir that is not writable 1567 in lint mode, exit with error status on errors 1568 o parse.c: clean up StrContainsWord 1569 fix out-of-bounds pointer in ParseTrackInput 1570 o var.c: rename Str_SYSVMatch and its parameters 1571 remove unsatisfiable conditions in Var_Set_with_flags 1572 document where the variable name is expanded 1573 fix documentation for VARP_SUB_ONE 1574 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 1575 document VAR_READONLY 1576 prevent appending to read-only variables 1577 extract MayExport from Var_Export1 1578 remove redundant evaluations in VarFind 1579 replace VarFindFlags with a simple Boolean 1580 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 1581 15822020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 1583 1584 * VERSION (_MAKE_VERSION): 20201028 1585 Merge with NetBSD make, pick up 1586 o rename defIncPath to defSysIncPath 1587 o initialize all CmdOpts fields 1588 o lst.c: inline Vector_Get 1589 o main.c: refactor main extract 1590 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 1591 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 1592 InitDefIncPath,CmdOpts_Init,UnlimitFiles 1593 o parse.c: merge curFile into includes 1594 rename predecessor to order_pred 1595 sort ParseSpecial alphabetically 1596 remove unused, undocumented .NOEXPORT 1597 rename ParseSpecial enum values consistently 1598 rename some fields of struct IFile 1599 16002020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 1601 1602 * VERSION (_MAKE_VERSION): 20201026 1603 Merge with NetBSD make, pick up 1604 o group the command line options and arguments into a struct 1605 o rename GNode.cmgn to youngestChild 1606 o rename hash functions to identify the type name 1607 o negate OP_NOP and rename it to GNode_IsTarget 1608 o add GNode_Path to access the path of a GNode 1609 o remove macros MIN and MAX 1610 o remove unused Lst_Find and Lst_FindFrom 1611 o arch.c: and make Arch_FindLib simpler 1612 clean up code layout 1613 make Arch_ParseArchive simpler 1614 o cond.c: inline CondFindStrMatch into FuncMake 1615 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 1616 omit trailing space in debug output for expanding file patterns 1617 refactor DirMatchFiles 1618 document that the SearchPath of Dir_FindFile may be NULL 1619 remove UNCONST from Dir_Expand 1620 inline DirFindName 1621 o for.c: clean up code for handling .for loops 1622 o hash.c: print hash in debug log with fixed width 1623 clean up hash table functions 1624 reduce amount of string hashing 1625 o job.c: refactor JobDeleteTarget 1626 use proper enum constants for aborting 1627 convert result of JobStart from macros to enum 1628 convert abort reason macros to enum 1629 rework Job_CheckCommands to reduce indentation 1630 rename Shell fields 1631 add field names in declaration of DEFSHELL_CUSTOM 1632 convert JobState and JobFlags to enum types 1633 move handling of the "..." command to JobPrintCommands 1634 o lst.c: clean up 1635 refactor LstNodeNew 1636 remove Lst_Open, Lst_Next, Lst_Close 1637 remove code for circular lists from Lst_Next 1638 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 1639 /dev/null or anything starting with "no" 1640 convert macros for debug flags into enum 1641 o make.c: inline Lst_Copy in Make_ExpandUse 1642 o meta.c: inline Lst_Find in meta_oodate 1643 make Lst_RemoveIf simpler in meta_oodate 1644 o parse.c: convert error level for Parse_Error to an enum 1645 o suff.c: properly terminate debug output with newline 1646 add more details to DEBUG_SRC log 1647 replace Dir_CopyDir with Dir_CopyDirSearchPath 1648 don't modify GNode name while rebuilding the suffix graph 1649 o var.c: reduce duplicate code in VarFind 1650 16512020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1652 1653 * VERSION (_MAKE_VERSION): 20201022 1654 Merge with NetBSD make, pick up 1655 o more refactoring and simplification to reduce code size 1656 o var.c: extract CanonicalVarname from VarFind 1657 o make.c: extract UpdateImplicitParentsVars from Make_Update 1658 o main.c: extract PrintVar from doPrintVars 1659 extract HandlePWD from main 1660 o lst.c: inline simple Lst getters 1661 remove unused Lst_ForEach 1662 o job.c: move struct Shell from job.h to job.c 1663 o more unit tests 1664 16652020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 1666 1667 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 1668 16692020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1670 1671 * VERSION (_MAKE_VERSION): 20201018 1672 Merge with NetBSD make, pick up 1673 o remove USE_IOVEC 1674 o rename some Hash_* apis to Hash* 1675 o replace execError with execDie 1676 o rename Lst_Init to Lst_New 1677 o add tags to enum types 1678 o rename Stack to Vector 1679 o parse.c: more refactoring 1680 o unit-tests: make some tests use line buffered stdout 1681 o unit-tests/Makefile: in meta mode do not make all tests depend on 1682 Makefile, it isn't necessary. 1683 16842020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 1685 1686 * main.c: check for CTL_HW being defined. 1687 * unit-tests/Makefile: ensure export tests output are POSIX compliant 1688 disable opt-debug-jobs test until it works on ubuntu 1689 1690 * VERSION (_MAKE_VERSION): 20201010 1691 Merge with NetBSD make, pick up 1692 o dir.c: remove pathname limit for Dir_FindHereOrAbove 1693 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 1694 o main.c: extract init_machine and init_machine_arch from main 1695 allow to disable debug logging options 1696 o parse.c: enable format string truncation warnings 1697 extract parsing of sources from ParseDoDependency 1698 split ParseDoSrc into smaller functions 1699 hide implementation details from Parse_DoVar 1700 clean up parsing of variable assignments 1701 split Parse_DoVar into manageable pieces 1702 don't modify the given line during Parse_DoVar 1703 fix out-of-bounds memory access in Parse_DoVar 1704 fix parsing of the :sh assignment modifier 1705 o var.c: rework memory allocation for the name of variables 1706 extract ApplyModifier_Literal into separate function 1707 in lint mode, reject modifiers without delimiter 1708 do not export variable names starting with '-' 1709 o fix double-free bug in -DCLEANUP mode 1710 o more cleanup to enable higher warnings level 1711 o more unit tests 1712 17132020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 1714 1715 * VERSION (_MAKE_VERSION): 20201002 1716 Merge with NetBSD make, pick up 1717 o dir.c: use hash table for looking up open directories by name 1718 o main.c: clean up option handling 1719 o parse.c: add missing const for Parse_AddIncludeDir 1720 o var.c: ApplyModifier_To, update pp in each branch 1721 o remove redundant function prototypes 1722 o more unit tests 1723 17242020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1725 1726 * VERSION (_MAKE_VERSION): 20201001 1727 Merge with NetBSD make, pick up 1728 o compat.c: comment about "..." 1729 17302020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 1731 1732 * VERSION (_MAKE_VERSION): 20200930 1733 Merge with NetBSD make, pick up 1734 o job.c: split Job.jobPipe into 2 separate fields 1735 replace Lst_Open with direct iteration 1736 o lst.c: remove redundant assertions 1737 o targ.c: replace Lst_Open with direct iteration 1738 o var.c: fix bug in evaluation of indirect variable modifiers 1739 extract ApplyModifier_Quote into separate function 1740 o make debug logging simpler 1741 17422020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 1743 1744 * VERSION (_MAKE_VERSION): 20200927 1745 Merge with NetBSD make, pick up 1746 o parse.c: ensure parse errors result in 'stopped in' message. 1747 o compat.c: make parameter of Compat_RunCommand const 1748 o main.c: extract InitVarTarget from main 1749 o parse.c: rename ParseFinishLine to FinishDependencyGroup 1750 refactor ParseDoDependency 1751 o var.c: Var_Subst no longer returns string result 1752 rename Var_ParsePP back to Var_Parse 1753 in lint mode, improve error handling for undefined variables 1754 extract ParseVarname from Var_Parse 1755 o rename Lst_ForEach to Lst_ForEachUntil 1756 o inline Lst_ForEachUntil in several cases 1757 o clean up API for finding and creating GNodes 1758 o fix assertion failure in -j mode with .END node 1759 o inline and remove LstNode_Prev and LstNode_Next 1760 o use fine-grained type names for lists and their nodes 1761 o more unit tests 1762 17632020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1764 1765 * VERSION (_MAKE_VERSION): 20200911 1766 Merge with NetBSD make, pick up 1767 o cond.c: split EvalComparison into smaller functions 1768 reorder parameters of condition parsing functions 1769 reduce code size in CondParser_Eval 1770 rename CondGetString to CondParser_String 1771 add CondLexer_SkipWhitespace 1772 group the condition parsing state into a struct 1773 in CondGetString, replace repeated Buf_Add with Buf_AddStr 1774 o migrate Var_Parse to Var_ParsePP 1775 o add wrappers around ctype.h functions 1776 o lst.c: use a stack instead of a list for the nested include path 1777 o more unit tests 1778 17792020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 1780 1781 * make-bootstrap.sh.in: adjust object list 1782 17832020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1784 1785 * VERSION (_MAKE_VERSION): 20200902 1786 Merge with NetBSD make, pick up 1787 o use make_stat to ensure no confusion over valid fields 1788 returned by cached_stat 1789 o var.c: make VarQuote const-correct 1790 o add unit tests for .for 1791 17922020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1793 1794 * VERSION (_MAKE_VERSION): 20200901 1795 Merge with NetBSD make, pick up 1796 o rename Hash_Table fields 1797 o make data types in Dir_HasWildcards more precise 1798 17992020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 1800 1801 * VERSION (_MAKE_VERSION): 20200831 1802 Merge with NetBSD make, pick up 1803 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 1804 o lst.c: Lst_Open renable assert that list isn't open 1805 o unit test for .TARGET dependent flags 1806 o var.c: fix aliasing bug in VarUniq 1807 o more unit tests for :u 1808 18092020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 1810 1811 * VERSION (_MAKE_VERSION): 20200830 1812 Merge with NetBSD make, pick up 1813 o allow for strict type checking for Boolean 1814 o Var_Parse never returns NULL 1815 o Var_Subst never returns NULL 1816 o Lst_Find now takes boolean match function 1817 o rename Lst_Memeber to Lst_FindDatum 1818 o rename LstNode functions to match their type 1819 o rename GNode.iParents to implicitParents 1820 o fix assertion failure for .SUFFIXES in archives 1821 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 1822 remove unreachable code from CompatRunCommand 1823 o main.c: simplify getBoolean 1824 o stc.c: replace brk_string with simpler Str_Words 1825 o suff.c: add debug macros 1826 18272020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 1828 1829 * VERSION (_MAKE_VERSION): 20200828 1830 Merge with NetBSD make, pick up 1831 o lst.c: inline LstIsValid and LstNodeIsValid 1832 o remove trailing S from Lst function names after migration complete 1833 o more comment cleanup/clarification 1834 o suff.c: clean up suffix handling 1835 o more unit tests 1836 18372020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 1838 1839 * VERSION (_MAKE_VERSION): 20200826 1840 Merge with NetBSD make, pick up 1841 o enum.c: distinguish between bitsets containing flags and 1842 ordinary enums 1843 o var.c: fix error message for ::!= modifier with shell error 1844 o fix bugs in -DCLEANUP mode 1845 18462020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1847 1848 * VERSION (_MAKE_VERSION): 20200824 1849 Merge with NetBSD make, pick up 1850 o in debug mode, print GNode details in symbols 1851 18522020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 1853 1854 * VERSION (_MAKE_VERSION): 20200823 1855 Merge with NetBSD make, pick up 1856 o lst.c: more asserts, 1857 make args to Lst_Find match others. 1858 o var.c: pass flags to VarAdd 1859 o arch.c: use Buffer 1860 o str.c: brk_string return size_t for nwords 1861 o more unit tests 1862 18632020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 1864 1865 * VERSION (_MAKE_VERSION): 1866 Merge with NetBSD make, pick up 1867 o var.c: support for read-only variables eg .SHELL 1868 being the shell used to run scripts. 1869 o lst.c: more simplification 1870 o more documentation and style cleanup 1871 o more unit tests 1872 o ensure unit-test/Makefile is run by TEST_MAKE 1873 o reduce duplication of header inclusion 1874 18752020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 1876 1877 * VERSION (_MAKE_VERSION): 20200821 1878 Merge with NetBSD make, pick up 1879 o lst.c: revert invalid assertion - but document it 1880 o dir.c: split Dir_Init into two functions 1881 18822020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 1883 1884 * lst.c: needs inttypes.h on Linux 1885 1886 * VERSION (_MAKE_VERSION): 20200820 1887 Merge with NetBSD make, pick up 1888 o make.1: clarify some passages 1889 o var.c: more cleanup, clarify comments 1890 o make_malloc.c: remove unreachable code 1891 o cond.c: make CondGetString easier to debug 1892 o simplify list usage 1893 o unit-tests: more 1894 18952020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 1896 1897 * VERSION (_MAKE_VERSION): 20200816 1898 Merge with NetBSD make, pick up 1899 o refactor unit-tests to be more fine grained 1900 not all tests moved yet 1901 19022020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 1903 1904 * VERSION (_MAKE_VERSION): 20200814 1905 Merge with NetBSD make, pick up 1906 o more str_concat variants 1907 o more enums for flags 1908 o var.c: cleanup for higher warnings level 1909 19102020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 1911 1912 * VERSION (_MAKE_VERSION): 20200810 1913 Merge with NetBSD make, pick up 1914 o more unit tests 1915 o general comment and style cleanup 1916 19172020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1918 1919 * VERSION (_MAKE_VERSION): 20200808 1920 Merge with NetBSD make, pick up 1921 o enum.[ch]: streamline, enums for use in flags and debug output 1922 o cond.c: cleanup 1923 o var.c: reduce duplicate code for modifiers 1924 debug logging for Var_Parse 1925 more detailed debug output 1926 o more unit tests 1927 19282020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 1929 1930 * unit-tests/Makefile: -r for recursive and include Makefile.inc 1931 so I can run tests in meta mode 1932 supress extra noise if in meta mode 1933 1934 * VERSION (_MAKE_VERSION): 20200806 1935 Merge with NetBSD make, pick up 1936 o parse.c: remove VARE_WANTRES for LINT 1937 we just want to check parsing (for now). 1938 19392020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 1940 1941 * VERSION (_MAKE_VERSION): 20200805 1942 Merge with NetBSD make, pick up 1943 o make.1: Rework the description of dependence operators 1944 19452020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1946 1947 * VERSION (_MAKE_VERSION): 20200803 1948 Merge with NetBSD make, pick up 1949 o revert some C99 usage, for max portability 1950 o unit-tests/lint 1951 19522020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 1953 1954 * VERSION (_MAKE_VERSION): 20200802 1955 Merge with NetBSD make, pick up 1956 o more unit tests 1957 19582020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 1959 1960 * Remove NetBSD specific plumbing from unit-tests/Makefile 1961 1962 * VERSION (_MAKE_VERSION): 20200801 1963 Merge with NetBSD make, pick up 1964 o make Var_Value return const 1965 o size_t for buf sizes 1966 o optimize some buffer operations - avoid strlen 1967 19682020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1969 1970 * VERSION (_MAKE_VERSION): 20200731 1971 Merge with NetBSD make, pick up 1972 o var.c: fix undefinded behavior for incomplete :t modifier 1973 fixes unit-test/moderrs on Ubuntu 1974 o parse.c: When parsing variable assignments other than := 1975 if DEBUG(LINT) test substition of value, so we get a file and 1976 line number in the resulting error. 1977 o dir.c: fix parsing of nested braces in dependency lines 1978 add unit-tests 1979 19802020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1981 1982 * VERSION (_MAKE_VERSION): 20200730 1983 Merge with NetBSD make, pick up 1984 o var.c: minor cleanup 1985 o unit-tests: more tests to improve code coverage 1986 19872020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 1988 1989 * VERSION (_MAKE_VERSION): 20200728 1990 Merge with NetBSD make, pick up 1991 o var.c: more optimizations 1992 19932020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1994 1995 * VERSION (_MAKE_VERSION): 20200726 1996 Merge with NetBSD make, pick up 1997 o collapse lsd.lib into lst.c - reduce code size and allow inlining 1998 o lots of function comment updates 1999 o var.c: more optimizations 2000 o make return of Var_Parse const 2001 20022020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2003 2004 * VERSION (_MAKE_VERSION): 20200720 2005 Merge with NetBSD make, pick up 2006 o DEBUG_HASH report stats at end and tone down the noise 2007 o var.c: each flag type gets its own prefix. 2008 move SysV string matching to var.c 2009 make ampersand in ${VAR:from=to&} an ordinary character 2010 cleanup and simplify implementation of modifiers 2011 o make.1: move documentation for assignment modifiers 2012 20132020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2014 2015 * VERSION (_MAKE_VERSION): 20200718 2016 Merge with NetBSD make, pick up 2017 o DEBUG_HASH to see how well the hash tables are working 2018 20192020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2020 2021 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2022 20232020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2024 2025 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2026 2027 * VERSION (_MAKE_VERSION): 20200710 2028 Merge with NetBSD make, pick up 2029 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2030 o meta.c: target flagged .META is out-of-date if meta file missing 2031 20322020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2033 2034 * VERSION (_MAKE_VERSION): 20200709 2035 Merge with NetBSD make, pick up 2036 o cond.c: fix for compare_expression when doEval=0 2037 o unit-tests/Makefile: rework 2038 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2039 20402020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2041 2042 * VERSION (_MAKE_VERSION): 20200704 2043 Merge with NetBSD make, pick up 2044 (most of this by rillig@) 2045 o lots of style and white-space cleanup 2046 o lots more unit tests for variable modifiers 2047 o simplified description of some functions 2048 o str.c: refactor Str_Match 2049 o var.c: debugging output for :@ 2050 constify VarModify parameter 2051 fix :hash modifier on 16-bit platforms 2052 remove unnecessary forward declarations 2053 refactor ApplyModifier_SysV to have less indentation 2054 simplify code for :E and :R 2055 clean up code for :H and :T 2056 refactor ApplyModifiers 2057 2058 * var.c: we need stdint.h on some platforms to get uint32_t 2059 * unit-test/Makefile: we need to supress the specific error 2060 for RE substitution error in modmisc, since it varies accross 2061 different OS. 2062 20632020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2064 2065 * VERSION (_MAKE_VERSION): 20200702 2066 Merge with NetBSD make, pick up 2067 o var.c: more improvements to avoiding unnecessary evaluation 2068 use enums for flags 2069 o remove flags arg to Var_Set which outside of var.c is always 0 2070 20712020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2072 2073 * VERSION (_MAKE_VERSION): 20200701 2074 Merge with NetBSD make, pick up 2075 o var.c: with change to cond.c; ensure that nested variables 2076 within a variable name are expanded. 2077 o unit-tests/varmisc.mk: test for nested varname 2078 20792020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2080 2081 * VERSION (_MAKE_VERSION): 20200629 2082 Merge with NetBSD make, pick up 2083 o cond.c: do not eval unnecessary terms of conditionals. 2084 20852020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2086 2087 * VERSION (_MAKE_VERSION): 20200625 2088 Merge with NetBSD make, pick up 2089 o meta.c: report error if lseek in filemon_read fails 2090 20912020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2092 2093 * VERSION (_MAKE_VERSION): 20200622 2094 Merge with NetBSD make, pick up 2095 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2096 20972020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2098 2099 * VERSION (_MAKE_VERSION): 20200619 2100 Merge with NetBSD make, pick up 2101 o str.c: performance improvement for Str_Match for multiple '*' 2102 o dieQuietly: supress the failure output from make 2103 when failing node is a sub-make or a sibling failed. 2104 This cuts down greatly on unhelpful noise at the end of 2105 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2106 21072020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2108 2109 * FILES: add LICENSE to appease some packagers. 2110 This is an attempt to fairly represent the license on almost 2111 200 files, which are almost all BSD-3-Clause 2112 The few exceptions being more liberal. 2113 2114 * VERSION (_MAKE_VERSION): 20200610 2115 Merge with NetBSD make, pick up 2116 o unit test for :Or 2117 21182020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2119 2120 * VERSION (_MAKE_VERSION): 20200606 2121 Merge with NetBSD make, pick up 2122 o make.1: cleanup 2123 2124 * Makefile: fix depends for main.o which broke MAKE_VERSION 2125 21262020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2127 2128 * VERSION (_MAKE_VERSION): 20200605 2129 Merge with NetBSD make, pick up 2130 o dir.c: cached_stats - don't confuse stat and lstat results. 2131 o var.c: add :Or for reverse sort. 2132 21332020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2134 2135 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2136 also if --with-filemon= specifies path to filemon.h 2137 set use_filemon=dev 2138 * dirname.c: remove include of namespace.h 2139 21402020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2141 2142 * VERSION (_MAKE_VERSION): 20200517 2143 Merge with NetBSD make, pick up 2144 o modified dollar tests to avoid shell dependencies 2145 o new tests for .INCLUDEFROM 2146 21472020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2148 2149 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2150 to not depend so much on shell behavior 2151 21522020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2153 2154 * VERSION (_MAKE_VERSION): 20200510 2155 Merge with NetBSD make, pick up 2156 o unit test for dollar handling 2157 21582020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2159 2160 * VERSION (_MAKE_VERSION): 20200506 2161 Merge with NetBSD make, pick up 2162 o str.c: empty string does not match % pattern 2163 plus unit-test changes 2164 21652020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2166 2167 * VERSION (_MAKE_VERSION): 20200504 2168 May the 4th be with you 2169 Merge with NetBSD make, pick up 2170 o var.c: import handling of old sysV style modifier using '%' 2171 o str.c: refactor brk_string 2172 o unit-tests: add test case for lazy conditions 2173 21742020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2175 2176 * VERSION (_MAKE_VERSION): 20200418 2177 2178 * configure.in: use_makefile=no for cygwin et al. 2179 case insensitive filesystems just don't work if both 2180 makefile and Makefile exist. 2181 NOTE: bmake does not support cygwin and likely never will, 2182 but if brave souls want to try it - help them out. 2183 21842020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2185 2186 * VERSION (_MAKE_VERSION): 20200402 2187 Merge with NetBSD make, pick up 2188 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2189 a blank command is perfectly valid. 2190 21912020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2192 2193 * VERSION (_MAKE_VERSION): 20200330 2194 Merge with NetBSD make, pick up 2195 o make.h: extern debug_file 2196 21972020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2198 2199 * VERSION (_MAKE_VERSION): 20200318 2200 Merge with NetBSD make, pick up 2201 o meta.c: meta_oodate, check for corrupted meta file 2202 earlier and more often. 2203 22042020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2205 2206 * VERSION (_MAKE_VERSION): 20200220 2207 22082020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2209 2210 * boot-strap: unset MAKEFLAGS 2211 22122020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2213 2214 * VERSION (_MAKE_VERSION): 20200212 2215 * meta.c: meta_compat_parent check for USE_FILEMON 2216 patch from Soeren Tempel 2217 22182020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2219 2220 * VERSION: 20200205 2221 Merge with NetBSD make, pick up 2222 o meta.c: fix compat mode, need to call meta_job_output() 2223 o job.c: extra fds for meta mode not needed if using filemon_dev 2224 22252020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2226 2227 * VERSION: 20200122 2228 Merge with NetBSD make, pick up 2229 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2230 returns FALSE. 2231 22322020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2233 2234 * VERSION: 20200121 2235 Merge with NetBSD make, pick up 2236 o filemon/filemon_{dev,ktrace}.c: allow selection of 2237 filemon implementation. filemon_dev.c uses the kernel module 2238 while filemon_ktrace.c leverages the fktrace api available in 2239 NetBSD. filemon_ktrace.c can hopefully form the basis for 2240 adding support for other tracing mechanisms such as strace on 2241 Linux. 2242 o meta.c: when target is out-of-date per normal make rules 2243 record value of .OODATE in meta file. 2244 22452019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2246 2247 * VERSION: 20190926 2248 Merge with NetBSD make, pick up 2249 o parse.c: don't pass NULL to realpath(3) 2250 some versions cannot handle it. 2251 22522019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2253 2254 * VERSION: 20190409 2255 Merge with NetBSD make, pick up 2256 o parse.c: ParseDoDependency: free paths rather than assert 2257 22582018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2259 2260 * VERSION: 20181222 2261 2262 * configure.in: add --without-makefile to avoid generating 2263 makefile and make-bootstrap.sh 2264 2265 * include Makefile.inc if it exists 2266 2267 * Use Makefile and Makefile.config.in in unit-tests 2268 so we can use just: make obj && make && make test 2269 when bmake is already available. 2270 We add --without-makefile to CONFIGURE_ARGS in this case. 2271 2272 * tweak bsd.after-import.mk (captures Makefile.config etc 2273 after import to FreeBSD for example) to cope with all the above. 2274 22752018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2276 2277 * VERSION: 20181221 2278 Merge with NetBSD make, pick up 2279 o parse.c: ParseVErrorInternal use .PARSEDIR 2280 and apply if relative, and then use .PARSEFILE 2281 for consistent result. 2282 22832018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2284 2285 * VERSION: 20181220 2286 Merge with NetBSD make, pick up 2287 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2288 is relative 2289 o var.c: avoid SEGFAULT in .unexport-env 2290 when MAKELEVEL is not set 2291 22922018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2293 2294 * VERSION: 20181216 2295 Merge with NetBSD make, pick up 2296 o fix for unit-tests/varquote.mk on Debian 2297 22982018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2299 2300 * VERSION: 20180919 2301 Merge with NetBSD make, pick up 2302 o var.c: add :q 2303 o dir.c: cleanup caching of stats 2304 23052018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2306 2307 * Makefile.config.in: use += where it makes sense. 2308 23092018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2310 2311 * VERSION: 20180512 2312 Merge with NetBSD make, pick up 2313 o job.c: skip polling job token pipe 2314 23152018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2316 2317 * VERSION: 20180405 2318 Merge with NetBSD make, pick up 2319 o parse.c: be more cautious about detecting depenency line 2320 rather than sysV style include. 2321 23222018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2323 2324 * VERSION: 20180222 2325 Merge with NetBSD make, pick up 2326 o parse.c: avoid calling sysconf for every call to loadfile 2327 23282018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2329 2330 * VERSION: 20180218 2331 Merge with NetBSD make, pick up 2332 o var.c: Var_Set handle NULL value anytime. 2333 23342018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2335 2336 * VERSION: 20180212 2337 Merge with NetBSD make, pick up 2338 o parse.c: do not treat .info as warning with -W 2339 23402017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2341 2342 * VERSION: 20171207 2343 Merge with NetBSD make, pick up 2344 o var.c: Var_Append use Var_Set if var not previously set 2345 so that VAR_CMD is handled correctly. 2346 Add a suitable unit-test. 2347 23482017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2349 2350 * VERSION (_MAKE_VERSION): 20171126 2351 2352 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2353 since AC_TRY_COMPILE puts input inside main() 2354 which upsets modern compilers. 2355 23562017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2357 2358 * VERSION: 20171118 2359 Merge with NetBSD make, pick up 2360 o var.c: do not append to variable set on command line 2361 add unit-test to catch this. 2362 23632017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2364 2365 * VERSION: 20171028 2366 Merge with NetBSD make, pick up 2367 o main.c: ignore empty MAKEOBJDIR 2368 2369 * Makefile.config.in: 2370 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2371 23722017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2373 2374 * VERSION: 20171005 2375 2376 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2377 consistent result on some platforms. 2378 23792017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2380 2381 * machine.sh: entry for AIX 2382 23832017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2384 2385 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2386 to a file that can be included by configure as well as make. 2387 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2388 23892017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2390 2391 * Makefile (_MAKE_VERSION): 20170810 2392 Merge with NetBSD make, pick up 2393 o meta.c: if target is in subdir we only need subdir name in 2394 meta_name. 2395 23962017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2397 2398 * Makefile (_MAKE_VERSION): 20170720 2399 Merge with NetBSD make, pick up 2400 o compat.c: pass SIGINT etc onto child and wait for it to exit 2401 before we self-terminate. 2402 24032017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2404 2405 * Makefile (_MAKE_VERSION): 20170711 2406 forgot to update after merge on 20170708 ;-) 2407 o main.c: refactor to reduce size of main function. 2408 add -v option to always fully expand values. 2409 o meta.c: ensure command output in meta file has ending newline 2410 even when filemon not being used. 2411 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2412 pathname via ':L' since any ':' in pathname breaks that. 2413 Instead set a '${.p.}' to pathname in the target context and 2414 use that. 2415 24162017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2417 2418 * Makefile (_MAKE_VERSION): 20170510 2419 Merge with NetBSD make, pick up 2420 o main.c: Main_SetObjdir: ensure buf2 is in scope 2421 24222017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2423 2424 * Makefile (_MAKE_VERSION): 20170505 2425 see mk/ChangeLog 2426 24272017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2428 2429 * parse.c: not everyone has stdint.h 2430 24312017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2432 2433 * Makefile (_MAKE_VERSION): 20170501 2434 see mk/ChangeLog 2435 24362017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2437 2438 * Makefile (_MAKE_VERSION): 20170421 2439 Merge with NetBSD make, pick up 2440 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2441 24422017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2443 2444 * Makefile (_MAKE_VERSION): 20170420 2445 Merge with NetBSD make, pick up 2446 o main.c: only use -C arg "as is" if it contains no 2447 relative component. 2448 24492017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2450 2451 * Makefile (_MAKE_VERSION): 20170418 2452 Merge with NetBSD make, pick up 2453 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2454 24552017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2456 2457 * Makefile (_MAKE_VERSION): 20170417 2458 Merge with NetBSD make, pick up 2459 o fixes a number of coverity complaints 2460 - check return value of fseek, fcntl 2461 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2462 JobPrintCommand, ParseTraditionalInclude 2463 - use bmake_malloc() where NULL is not tollerated 2464 - use MAKE_ATTR_UNUSED rather that kludges like 2465 return(unused ? 0 : 0) 2466 - use purge_cached_realpaths() rather than abuse cached_realpath() 2467 24682017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2469 2470 * Makefile (_MAKE_VERSION): 20170413 2471 Merge with NetBSD make, pick up 2472 o main.c: when setting .OBJDIR ignore '$' in paths. 2473 2474 * job.c: use MALLOC_OPTIONS to set malloc_options. 2475 24762017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2477 2478 * Makefile (_MAKE_VERSION): 20170411 2479 Merge with NetBSD make, pick up 2480 o str.c: Str_Match: allow [^a-z] to behave as expected. 2481 24822017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2483 2484 * Makefile (_MAKE_VERSION): 20170326 2485 Merge with NetBSD make, pick up 2486 o main.c: purge relative paths from realpath cache when .OBJDIR 2487 is changed. 2488 24892017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2490 2491 * Makefile (_MAKE_VERSION): 20170311 2492 Merge with NetBSD make, pick up 2493 o main.c: only use -C arg "as is" if it starts with '/'. 2494 24952017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2496 2497 * Makefile (_MAKE_VERSION): 20170301 2498 Merge with NetBSD make, pick up 2499 o main.c: use -C arg "as is" rather than getcwd() 2500 if they identify the same directory. 2501 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2502 25032017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2504 2505 * Makefile (_MAKE_VERSION): 20170201 2506 Merge with NetBSD make, pick up 2507 o var.c: allow :_=var and avoid use of special context. 2508 25092017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2510 2511 * Makefile (_MAKE_VERSION): 20170130 2512 Merge with NetBSD make, pick up 2513 o var.c: add :range and :_ 2514 o main.c: partially initialize Dir_* before MainParseArgs() 2515 can be called. 2516 If -V, skip Main_ExportMAKEFLAGS() 2517 25182017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2519 2520 * Makefile (_MAKE_VERSION): 20170114 2521 Merge with NetBSD make, pick up 2522 o var.c: allow specifying the utc value used by :{gm,local}time 2523 25242016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2525 2526 * Makefile (_MAKE_VERSION): 20161212 2527 Merge with NetBSD make, pick up 2528 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2529 25302016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2531 2532 * Makefile (_MAKE_VERSION): 20161209 2533 Merge with NetBSD make, pick up 2534 o main.c: cleanup setting of .OBJDIR 2535 o parse.c: avoid coredump from (var)=val 2536 25372016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2538 2539 * Makefile (_MAKE_VERSION): 20161126 2540 Merge with NetBSD make, pick up 2541 o make.c: Make_OODate: report src node name if path not set 2542 25432016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2544 2545 * Makefile (_MAKE_VERSION): 20160926 2546 Merge with NetBSD make, pick up 2547 o support for .DELETE_ON_ERROR: (remove targets that fail) 2548 25492016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2550 2551 * Makefile MAN: tweak .Dt to match ${PROG} 2552 25532016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2554 2555 * Makefile (_MAKE_VERSION): 20160818 2556 its a neater number; pick up whitespace fixes to man page. 2557 25582016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2559 2560 * Makefile (_MAKE_VERSION): 20160817 2561 Merge with NetBSD make, pick up 2562 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2563 so we can call it before adding entries to missingFiles. 2564 Thus we do not track files we have been told to ignore. 2565 25662016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2567 2568 * Makefile (_MAKE_VERSION): 20160815 2569 Merge with NetBSD make, pick up 2570 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 2571 pathnames, and skip if the expansion is empty. 2572 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 2573 25742016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2575 2576 * Makefile (_MAKE_VERSION): 20160812 2577 Merge with NetBSD make, pick up 2578 o meta.c: remove all missingFiles entries that match a deleted 2579 dir. 2580 o main.c: set .ERROR_CMD if possible. 2581 25822016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2583 2584 * Makefile (_MAKE_VERSION): 20160606 2585 Merge with NetBSD make, pick up 2586 o dir.c: extend mtimes cache to others via cached_stat() 2587 25882016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2589 2590 * Makefile (_MAKE_VERSION): 20160604 2591 Merge with NetBSD make, pick up 2592 o meta.c: missing filemon data is only relevant if we read a 2593 meta file. 2594 Also do not return oodate for a missing metafile if gn->path 2595 points to .CURDIR 2596 25972016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2598 2599 * Makefile (_MAKE_VERSION): 20160602 2600 Merge with NetBSD make, pick up 2601 o cached_realpath(): avoid hitting filesystem more than necessary. 2602 o meta.c: refactor need_meta decision, add knobs for 2603 missing meta file and filemon data wrt out-of-datedness. 2604 26052016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2606 2607 * Makefile (_MAKE_VERSION): 20160528 2608 2609 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 2610 26112016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2612 2613 * Makefile (_MAKE_VERSION): 20160512 2614 Merge with NetBSD make, pick up 2615 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 2616 this is useful for gcov builds. 2617 o propagate errors from filemon(4). 2618 26192016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 2620 2621 * Makefile (_MAKE_VERSION): 20160509 2622 Merge with NetBSD make, pick up 2623 o remove use of non-standard types u_int etc. 2624 o meta.c: apply realpath() before matching against metaIgnorePaths 2625 26262016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 2627 2628 * Makefile (_MAKE_VERSION): 20160404 2629 Merge with NetBSD make, pick up 2630 o allow makefile to set .MAKE.JOBS 2631 2632 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 2633 26342016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 2635 2636 * Makefile (_MAKE_VERSION): 20160315 2637 Merge with NetBSD make, pick up 2638 o fix handling of archive members 2639 26402016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2641 2642 * Makefile (_MAKE_VERSION): rename variable to avoid interference 2643 with checks for ${MAKE_VERSION} 2644 26452016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 2646 2647 * Makefile (MAKE_VERSION): 20160310 2648 Merge with NetBSD make, pick up 2649 o meta.c: treat missing Read file same as Write, incase we Delete it. 2650 26512016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 2652 2653 * Makefile (MAKE_VERSION): 20160307 2654 Merge with NetBSD make, pick up 2655 o var.c: fix :ts\nnn to be octal by default. 2656 o meta.c: meta_finish() to cleanup memory. 2657 26582016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 2659 2660 * Makefile (MAKE_VERSION): 20160226 2661 Merge with NetBSD make, pick up 2662 o meta.c: allow meta file for makeDepend if makefiles want it. 2663 26642016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 2665 2666 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 2667 for backwards compatability. 2668 2669 * Makefile (MAKE_VERSION): 20160220 2670 Merge with NetBSD make, pick up 2671 o var.c: add knob to control handling of '$$' in := 2672 26732016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2674 2675 * Makefile (MAKE_VERSION): 20160218 2676 Merge with NetBSD make, pick up 2677 o var.c: add .export-literal allows us to fix sys.clean-env.mk 2678 post the changes to Var_Subst. 2679 Var_Subst now takes flags, and does not consume '$$' in := 2680 26812016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 2682 2683 * Makefile (MAKE_VERSION): 20160217 2684 Merge with NetBSD make, pick up 2685 o var.c: preserve '$$' in := 2686 o parse.c: add .dinclude for handling included 2687 makefile like .depend 2688 26892015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 2690 2691 * Makefile (MAKE_VERSION): 20151220 2692 Merge with NetBSD make, pick up 2693 o suff.c: re-initialize suffNull when clearing suffixes. 2694 26952015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 2696 2697 * Makefile (MAKE_VERSION): 20151201 2698 Merge with NetBSD make, pick up 2699 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 2700 o meta.c: meta_oodate: use lstat(2) for checking link target 2701 in case it is a symlink. 2702 o var.c: avoid calling brk_string and Var_Export1 with empty 2703 strings. 2704 27052015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2706 2707 * Makefile (MAKE_VERSION): 20151126 2708 Merge with NetBSD make, pick up 2709 o parse.c: ParseTrackInput don't access beyond 2710 end of old value. 2711 27122015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 2713 2714 * Makefile (MAKE_VERSION): 20151022 2715 2716 * Add support for BSD/OS which lacks inttypes.h 2717 and really needs sys/param.h for sys/sysctl.h 2718 also 'type' is not a shell builtin. 2719 2720 * var.c: eliminate uint32_t and need for inttypes.h 2721 2722 * main.c: PrintOnError flush stdout before run .ERROR 2723 2724 * parse.c: cope with _SC_PAGESIZE not being defined. 2725 2726 27272015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 2728 2729 * Makefile (MAKE_VERSION): 20151020 2730 Merge with NetBSD make, pick up 2731 o var.c: fix uninitialized var 2732 27332015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 2734 2735 * var.c: the conditional expressions used with ':?' can be 2736 expensive, if already discarding do not evaluate or expand 2737 anything. 2738 27392015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2740 2741 * Makefile (MAKE_VERSION): 20151010 2742 Merge with NetBSD make, pick up 2743 o Add Boolean wantit flag to Var_Subst and Var_Parse 2744 when FALSE we know we are discarding the result and can 2745 skip operations like Cmd_Exec. 2746 27472015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2748 2749 * Makefile (MAKE_VERSION): 20151009 2750 Merge with NetBSD make, pick up 2751 o var.c: don't check for NULL before free() 2752 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 2753 27542015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2755 2756 * Makefile (MAKE_VERSION): 20150910 2757 Merge with NetBSD make, pick up 2758 o main.c: with -w print Enter/Leaving messages for objdir too 2759 if necessary. 2760 o centralize shell metachar handling 2761 2762 * FILES: add metachar.[ch] 2763 27642015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2765 2766 * Makefile (MAKE_VERSION): 20150606 2767 Merge with NetBSD make, pick up 2768 o make.1: document .OBJDIR target 2769 27702015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2771 2772 * Makefile (MAKE_VERSION): 20150505 2773 Merge with NetBSD make, pick up 2774 o cond.c: be strict about lhs of comparison when evaluating .if 2775 but less so when called from variable expansion. 2776 o unit-tests/cond2.mk: test various error conditions 2777 27782015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 2779 2780 * machine.sh (MACHINE): Add Bitrig 2781 patch from joerg@netbsd.org 2782 27832015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2784 2785 * Makefile (MAKE_VERSION): 20150418 2786 Merge with NetBSD make, pick up 2787 o job.c: use memmove() rather than memcpy() 2788 2789 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 2790 case, so skip it. 2791 27922015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2793 2794 * Makefile (MAKE_VERSION): 20150411 2795 bump version - only mk/ changes. 2796 27972015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2798 2799 * Makefile (MAKE_VERSION): 20150410 2800 Merge with NetBSD make, pick up 2801 o document different handling of '-' in jobs mode vs compat 2802 o fix jobs mode so that '-' only applies to whole job 2803 when shell lacks hasErrCtl 2804 o meta.c: use separate vars to track lcwd and latestdir (read) 2805 per process 2806 28072015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 2808 2809 * Makefile (MAKE_VERSION): 20150401 2810 Merge with NetBSD make, pick up 2811 o meta.c: close meta file in child 2812 2813 * Makefile: use BINDIR.bmake if set. 2814 Same for MANDIR and SHAREDIR 2815 Handy for testing release candidates 2816 in various environments. 2817 28182015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2819 2820 * move initialization of savederr to block where it is used 2821 to avoid spurious warning from gcc5 2822 28232014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2824 2825 * Makefile (MAKE_VERSION): 20141111 2826 just a cooler number 2827 28282014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 2829 2830 * Makefile (MAKE_VERSION): 20141105 2831 Merge with NetBSD make, pick up 2832 o revert major overhaul of suffix handling 2833 and POSIX compliance - too much breakage 2834 and impossible to make backwards compatible. 2835 o we still have the new unit test structure which is ok. 2836 o meta.c ensure "-- filemon" is at start of line. 2837 28382014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 2839 2840 * configure.in: test that result of getconf PATH_MAX is numeric 2841 and discard if not. Apparently needed for Hurd. 2842 28432014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2844 2845 * Makefile (MAKE_VERSION): 20140830 2846 Merge with NetBSD make, pick up 2847 o major overhaul of suffix handling 2848 o improved POSIX compliance 2849 o overhauled unit-tests 2850 28512014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2852 2853 * Makefile (MAKE_VERSION): 20140620 2854 Merge with NetBSD make, pick up 2855 o var.c return varNoError rather than var_Error for ::= modifiers. 2856 28572014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 2858 2859 * Makefile (MAKE_VERSION): 20140522 2860 Merge with NetBSD make, pick up 2861 o var.c detect some parse errors. 2862 28632014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2864 2865 * Fix spelling errors - patch from Pedro Giffuni 2866 28672014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 2868 2869 * Makefile (MAKE_VERSION): 20140214 2870 Merge with NetBSD make, pick up 2871 o .INCLUDEFROM* 2872 o use Var_Value to get MAKEOBJDIR[PREFIX] 2873 o reduced realloc'ign in brk_string. 2874 * configure.in: add a check for compiler supporting __func__ 2875 28762014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2877 2878 * boot-strap: ignore mksrc=none 2879 28802014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 2881 2882 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 2883 28842014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2885 2886 * Makefile (MAKE_VERSION): 20140101 2887 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 2888 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 2889 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 2890 Hurd) 2891 * configure.in: Add AC_PREREQ and check for 2892 sysctl; patch from Andrew Shadura andrewsh at debian.org 2893 28942013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2895 2896 * Makefile (MAKE_VERSION): 20131010 2897 * lose the const from arg to systcl to avoid problems on older BSDs. 2898 28992013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2900 2901 * Makefile (MAKE_VERSION): 20131001 2902 Merge with NetBSD make, pick up 2903 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 2904 hw.machine_arch if necessary. 2905 o meta.c: meta_oodate - need to look at src of Link and target 2906 of Move as well. 2907 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 2908 provide __arraycount() if needed. 2909 29102013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 2911 2912 * Makefile (MAKE_VERSION): 20130904 2913 Merge with NetBSD make, pick up 2914 o Add VAR_INTERNAL context, so that internal setting of 2915 MAKEFILE does not override value set by makefiles. 2916 29172013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 2918 2919 * Makefile (MAKE_VERSION): 20130902 2920 Merge with NetBSD make, pick up 2921 o CompatRunCommand: only apply shellErrFlag when errCheck is true 2922 29232013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2924 2925 * Makefile (MAKE_VERSION): 20130828 2926 Merge with NetBSD make, pick up 2927 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 2928 o Call Job_SetPrefix() from Job_Init() so makefiles have 2929 opportunity to set .MAKE.JOB.PREFIX 2930 29312013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 2932 2933 * Makefile (MAKE_VERSION): 20130730 2934 Merge with NetBSD make, pick up 2935 o Allow suppression of --- job -- tokens by setting 2936 .MAKE.JOB.PREFIX empty. 2937 29382013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 2939 2940 * Makefile (MAKE_VERSION): 20130716 2941 Merge with NetBSD make, pick up 2942 o number of gmake compatibility tweaks 2943 -w for gmake style entering/leaving messages 2944 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 2945 handle MAKEFLAGS containing only letters. 2946 o when overriding a GLOBAL variable on the command line, 2947 delete it from GLOBAL context so -V doesn't show the wrong 2948 value. 2949 29502013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 2951 2952 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 2953 2954 * Makefile (MAKE_VERSION): 20130706 2955 Merge with NetBSD make, pick up 2956 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 2957 true so that CompatRunCommand() can use it, to ensure 2958 consistent behavior with jobs mode. 2959 o use MAKE_LEVEL_ENV to define the variable to propagate 2960 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 2961 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 2962 paths to ignore. 2963 29642013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2965 2966 * Makefile (MAKE_VERSION): 20130604 2967 Merge with NetBSD make, pick up 2968 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 2969 to avoid leaking descriptors. 2970 29712013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2972 2973 * Makefile (MAKE_VERSION): 20130528 2974 Merge with NetBSD make, pick up 2975 o var.c: cleanup some left-overs in VarHash() 2976 29772013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2978 2979 * Makefile (MAKE_VERSION): 20130520 2980 generate manifest from component FILES rather than have to 2981 update FILES when mk/FILES changes. 2982 29832013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2984 2985 * Makefile (MAKE_VERSION): 20130518 2986 Merge with NetBSD make, pick up 2987 o suff.c: don't skip all processsing for .PHONY targets 2988 else wildcard srcs do not get expanded. 2989 o var.c: expand name of variable to delete if necessary. 2990 29912013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2992 2993 * Makefile (MAKE_VERSION): 20130330 2994 Merge with NetBSD make, pick up 2995 o meta.c: refine the handling of .OODATE in commands. 2996 Rather than suppress command comparison for the entire script 2997 as though .NOMETA_CMP had been used, only suppress it for the 2998 one command line. 2999 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3000 suppress comparison of a command without otherwise affecting it. 3001 o make.1: document that 3002 30032013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3004 3005 * Makefile (MAKE_VERSION): 20130321 3006 yes, not quite right but its a cooler number. 3007 Merge with NetBSD make, pick up 3008 o parse.c: fix ParseGmakeExport to be portable 3009 and add a unit-test. 3010 * meta.c: call meta_init() before makefiles are read and if built 3011 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3012 this let's makefiles test for support. 3013 Call meta_mode_init() to process .MAKE.MODE. 3014 30152013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3016 3017 * Makefile (MAKE_VERSION): 20130305 3018 Merge with NetBSD make, pick up 3019 o run .STALE: target when a dependency from .depend is missing. 3020 o job.c: add Job_RunTarget() for the above and .BEGIN 3021 30222013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3023 3024 * Makefile (MAKE_VERSION): 20130303 3025 Merge with NetBSD make, pick up 3026 o main.c: set .MAKE.OS to utsname.sysname 3027 o job.c: more checks for read and poll errors 3028 o var.c: lose VarChangeCase() saves 4% time 3029 30302013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3031 3032 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3033 want to use MAKEOBJDIR 3034 30352013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3036 3037 * Merge with NetBSD make, pick up 3038 o make.1: more info on how shell commands are handled. 3039 o job.c,main.c: detect write errors to job pipes. 3040 30412013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3042 3043 * Makefile (MAKE_VERSION): 20130123 3044 Merge with NetBSD make, pick up 3045 o meta.c: if script uses .OODATE and meta_oodate() decides 3046 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3047 o var.c: in debug output indicate which variabale modifiers 3048 apply to. 3049 o remove Check_Cwd logic the makefiles have been fixed. 3050 30512012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3052 3053 * makefile.in: add a simple makefile for folk who insist on 3054 ./configure; make; make install 3055 it just runs boot-strap 3056 * include mk/* to accommodate the above 3057 * boot-strap: re-work to accommodate the above 3058 mksrc defaults to $Mydir/mk 3059 allow op={configure,build,install,clean,all} 3060 add options to facilitate install 3061 * Makefile.config.in: just the bits set by configure 3062 * Makefile: bump version to 20121212 3063 abandon Makefile.in (NetBSD Makefile) 3064 leverage mk/* instead 3065 * configure.in: ensure srcdir is absolute 3066 30672012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3068 3069 * Makefile.in (MAKE_VERSION): 20121111 3070 fix generation of bmake.cat1 3071 30722012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3073 3074 * Makefile.in (MAKE_VERSION): 20121109 3075 Merge with NetBSD make, pick up 3076 o make.c: MakeBuildChild: return 0 so search continues if a 3077 .ORDER dependency is detected. 3078 o unit-tests/order: test the above 3079 30802012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3081 3082 * Makefile.in (MAKE_VERSION): 20121102 3083 Merge with NetBSD make, pick up 3084 o cond.c: allow cond_state[] to grow. 3085 In meta mode with a very large tree, we can hit the limit 3086 while processing dirdeps. 3087 30882012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3089 3090 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3091 30922012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3093 3094 * Makefile.in (MAKE_VERSION): 20121010 3095 o protect syntax that only bmake parses correctly. 3096 o remove auto setting of FORCE_MACHINE, use configure's 3097 --with-force-machine=whatever if that is desired. 3098 30992012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3100 3101 * Makefile.in: do not lose history from make.1 when generating bmake.1 3102 31032012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3104 3105 * Makefile.in (MAKE_VERSION): 20121007 3106 Merge with NetBSD make, pick up 3107 o compat.c: ignore empty commands - same as jobs mode. 3108 o make.1: document meta chars that cause use of shell 3109 31102012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3111 3112 * Makefile.in (MAKE_VERSION): bump version to 20120911 3113 * bsd.after-import.mk: include Makefile.inc early and allow it to 3114 override PROG 3115 31162012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3117 3118 * Makefile.in (MAKE_VERSION): bump version to 20120831 3119 Merge with NetBSD make, pick up 3120 o cast sizeof() to int for comparison 3121 o minor make.1 tweak 3122 31232012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3124 3125 * Makefile.in (MAKE_VERSION): bump version to 20120830 3126 Merge with NetBSD make, pick up 3127 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3128 o debug flag -dV causes -V to show raw value regardless. 3129 31302012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3131 3132 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3133 gets SRCTOP set. 3134 31352012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3136 3137 * Makefile.in (MAKE_VERSION): bump version to 20120704 3138 Merge with NetBSD make, pick up 3139 o Job_ParseShell should call Shell_Init if it has been 3140 previously called. 3141 * Makefile.in: set USE_META based on configure result. 3142 also .PARSEDIR is safer indicator of bmake. 3143 31442012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3145 3146 * Makefile.in: bump version to 20120626 3147 ensure CPPFLAGS is in CFLAGS 3148 * meta.c: avoid nested externs 3149 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3150 31512012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3152 3153 * Makefile.in (MAKE_VERSION): bump version to 20120620 3154 Merge with NetBSD make, pick up 3155 o make_malloc.c: avoid including make_malloc.h again 3156 3157 * Makefile.in: avoid bmake only syntax or protect with 3158 .if defined(.MAKE.LEVEL) 3159 * bsd.after-import.mk: replace .-include with .sinclude 3160 ensure? SRCTOP gets a value 3161 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3162 31632012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3164 3165 * Makefile.in (MAKE_VERSION): bump version to 20120612 3166 Merge with NetBSD make, pick up 3167 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3168 for greater portability. 3169 o unit-tests/forloop: check that .for works as expected wrt 3170 number of times and with "quoted strings". 3171 31722012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3173 3174 * Makefile.in (MAKE_VERSION): bump version to 20120606 3175 Merge with NetBSD make, pick up 3176 o compat.c: use kill(2) rather than raise(3). 3177 * configure.in: look for sys/dev/filemon 3178 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3179 and pass BOOTSTRAP_XTRAS to boot-strap. 3180 31812012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3182 3183 * Makefile.in (MAKE_VERSION): bump version to 20120604 3184 Merge with NetBSD make, pick up 3185 o util.c and var.c share same var for tracking if environ 3186 has been reallocated. 3187 o util.c provide getenv with setenv. 3188 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3189 when the shell actively strips .MAKE.* from the environment. 3190 We still refer to the variable always as .MAKE.LEVEL 3191 * util.c fix bug in findenv() was finding prefix of name. 3192 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3193 results in more reliable termination of all activity on many 3194 platforms. 3195 31962012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3197 3198 * Makefile.in (MAKE_VERSION): bump version to 20120602 3199 Merge with NetBSD make, pick up 3200 o for.c: handle quoted items in .for list 3201 32022012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3203 3204 * Makefile.in (MAKE_VERSION): bump version to 20120530 3205 Merge with NetBSD make, pick up 3206 o compat.c: ignore empty command. 3207 32082012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3209 3210 * Makefile.in (MAKE_VERSION): bump version to 20120524 3211 * FILES: add bsd.after-import.mk: 3212 A simple means of integrating bmake into a BSD build system. 3213 32142012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3215 3216 * Makefile.in (MAKE_VERSION): bump version to 20120520 3217 Merge with NetBSD make, pick up 3218 o increased limit for nested conditionals. 3219 32202012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3221 3222 * Makefile.in (MAKE_VERSION): bump version to 20120518 3223 Merge with NetBSD make, pick up 3224 o use _exit(2) in signal hanlder 3225 o Don't use the [dir] cache when building nodes that might have 3226 changed since the last exec. 3227 o Avoid nested extern declaration warnings. 3228 32292012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3230 3231 * meta.c (fgetLine): avoid %z - not portable. 3232 * parse.c: Since we moved include of sys/mman.h 3233 and def's of MAP_COPY etc. we got dups from a merge. 3234 32352012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3236 3237 * Makefile.in (MAKE_VERSION): bump version to 20120420 3238 Merge with NetBSD make, pick up 3239 o restore duplicate supression in .MAKE.MAKEFILES 3240 runtime saving can be significant. 3241 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3242 consumption up to 20%. 3243 32442012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3245 3246 * Makefile.in (MAKE_VERSION): bump version to 20120420 3247 Merge with NetBSD make, pick up 3248 o remove duplicate supression in .MAKE.MAKEFILES 3249 o improved dir cache behavior 3250 o gmake'ish export command 3251 32522012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3253 3254 * Makefile.in (MAKE_VERSION): bump version to 20120325 3255 Merge with NetBSD make, pick up 3256 o fix parsing of :[#] in conditionals. 3257 32582012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3259 3260 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3261 since some systems cannot cope with .Nx <version> 3262 32632011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3264 3265 * Makefile.in (MAKE_VERSION): bump version to 20111111 3266 Merge with NetBSD make, pick up 3267 o debug output for .PARSEDIR and .PARSEFILE 3268 32692011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3270 3271 * Makefile.in (MAKE_VERSION): bump version to 20111010 3272 32732011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3274 3275 * boot-strap: check for an expected file in the dirs we look for. 3276 * make-bootstrap.sh: pass on LDSTATIC 3277 32782011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3279 3280 * Makefile.in (MAKE_VERSION): bump version to 20111001 3281 Merge with NetBSD make, pick up 3282 o ensure .PREFIX is set for .PHONY 3283 and .TARGET set for .PHONY run via .END 3284 o __dead used consistently 3285 32862011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3287 3288 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3289 32902011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3291 3292 * Makefile.in (MAKE_VERSION): bump version to 20110905 3293 Merge with NetBSD make, pick up 3294 o meta_oodate: ignore makeDependfile 3295 32962011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3297 3298 * Makefile.in (MAKE_VERSION): bump version to 20110828 3299 Merge with NetBSD make, pick up 3300 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3301 as SILENT if a .meta file is created 3302 33032011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3304 3305 * Makefile.in (MAKE_VERSION): bump version to 20110818 3306 Merge with NetBSD make, pick up 3307 o in meta mode, if target flagged .META a missing .meta file 3308 means target is out-of-date 3309 o fixes for gcc 4.5 warnings 3310 o simplify job printing code 3311 33122011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3313 3314 * Makefile.in (MAKE_VERSION): bump version to 20110808 3315 Merge with NetBSD make, pick up 3316 o do not touch OP_SPECIAL targets when doing make -t 3317 33182011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3319 3320 * Makefile.in (MAKE_VERSION): bump version to 20110622 3321 Merge with NetBSD make, pick up 3322 o meta_oodate detect corrupted .meta file and declare oodate. 3323 * configure.in: add check for setsid 3324 33252011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3326 3327 * Merge with NetBSD make, pick up 3328 o unit-tests/modts now works on MirBSD 3329 33302011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3331 3332 * Makefile.in (MAKE_VERSION): bump version to 20110606 3333 Merge with NetBSD make, pick up 3334 o ApplyModifiers: when we parse a variable which is not 3335 the entire modifier string, or not followed by ':', do not 3336 consider it as containing modifiers. 3337 o loadfile: ensure newline at end of mapped file. 3338 33392011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3340 3341 * Makefile.in (MAKE_VERSION): bump version to 20110505 3342 Merge with NetBSD make, pick up 3343 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3344 of make's control. In meta mode, any generated file within 3345 said bailiwick, which is found to be missing, causes current 3346 target to be out-of-date. 3347 33482011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3349 3350 * Makefile.in (MAKE_VERSION): bump version to 20110411 3351 Merge with NetBSD make, pick up 3352 o when long modifiers fail to match, check sysV style. 3353 - add a test case 3354 33552011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3356 3357 * Makefile.in (MAKE_VERSION): bump version to 20110410 3358 Merge with NetBSD make, pick up 3359 o :hash - cheap 32bit hash of value 3360 o :localtime, :gmtime - use value as format string for strftime. 3361 33622011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3363 3364 * Makefile.in (MAKE_VERSION): bump version to 20110330 3365 mostly because its a cooler version. 3366 Merge with NetBSD make, pick up 3367 o NetBSD tags for meta.[ch] 3368 o job.c call meta_job_finish() after meta_job_error(). 3369 o meta_job_error() should call meta_job_finish() to ensure 3370 .meta file is closed, and safe to copy - if .ERROR target wants. 3371 meta_job_finish() is safe to call repeatedly. 3372 33732011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3374 3375 * unit-tests/modts: use printf if it is a builtin, 3376 to save us from MirBSD 3377 3378 * Makefile.in (MAKE_VERSION): bump version to 20110329 3379 Merge with NetBSD make, pick up 3380 o fix for use after free() in CondDoExists(). 3381 o meta_oodate() report extra commands and return earlier. 3382 33832011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3384 3385 * Makefile.in (MAKE_VERSION): bump version to 20110327 3386 Merge with NetBSD make, pick up 3387 o meta.c, if .MAKE.MODE contains curdirOk=yes 3388 allow creating .meta files in .CURDIR 3389 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3390 formats the output of 'type' differently - so eat any "()" 3391 33922011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3393 3394 * Makefile.in (MAKE_VERSION): bump version to 20110306 3395 Merge with NetBSD make, pick up 3396 o meta.c, only do getcwd() once 3397 33982011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3399 3400 * Makefile.in (MAKE_VERSION): bump version to 20110305 3401 Merge with NetBSD make, pick up 3402 o correct sysV substitution handling of empty lhs and variable 3403 o correct exists() check for dir with trailing / 3404 o correct handling of modifiers for non-existant variables 3405 during evaluation of conditionals. 3406 o ensure MAP_FILE is defined. 3407 o meta.c use curdir[] now exported by main.c 3408 34092011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3410 3411 * Makefile.in (MAKE_VERSION): bump version to 20110225 3412 Merge with NetBSD make, pick up 3413 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3414 makefiles have been read. 3415 o fix example of :? modifier in man page. 3416 34172011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3418 3419 * Makefile.in (MAKE_VERSION): bump version to 20110214 3420 Merge with NetBSD make, pick up 3421 o meta.c handle realpath() failing when generating meta file 3422 name. 3423 3424 * sigcompat.c: convert to ansi so we can use higher warning levels. 3425 3426 34272011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3428 3429 * Makefile.in (MAKE_VERSION): bump version to 20110207 3430 Merge with NetBSD make, pick up 3431 o fix for bug in meta mode. 3432 34332011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3434 3435 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3436 34372011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3438 3439 * Makefile.in (MAKE_VERSION): bump version to 20110101 3440 Merge with NetBSD make, pick up 3441 o use mmap(2) if available, for reading makefiles 3442 34432010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3444 3445 * Makefile.in (MAKE_VERSION): bump version to 20101215 3446 Merge with NetBSD make, pick up 3447 o ensure meta_job_error() does not report a previous .meta file 3448 as being culprit. 3449 34502010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3451 3452 * Makefile.in (MAKE_VERSION): bump version to 20101210 3453 Merge with NetBSD make, pick up 3454 o meta_oodate: track cwd per process, and only consider target 3455 out-of-date if missing file is outside make's CWD. 3456 Ignore files in /tmp/ etc. 3457 o to ensure unit-tests results match, need to control LC_ALL 3458 as well as LANG. 3459 o fix for parsing bug in var.c 3460 34612010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3462 3463 * Makefile.in (MAKE_VERSION): bump version to 20101126 3464 Merge with NetBSD make, pick up 3465 o if stale dependency is an IMPSRC, search via .PATH 3466 o meta_oodate: if a referenced file is missing, target is 3467 out-of-date. 3468 o meta_oodate: if a target uses .OODATE in its commands, 3469 it (.OODATE) needs to be recomputed. 3470 o keep a pointer to youngest child node, rather than just its 3471 mtime. 3472 34732010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3474 3475 * Makefile.in (MAKE_VERSION): bump version to 20101101 3476 34772010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3478 3479 * machine.sh: like os.sh, 3480 allow for uname -p producing useless drivel 3481 34822010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3483 3484 * boot-strap: document configure knobs for meta and filemon. 3485 3486 * Makefile.in (MAKE_VERSION): bump version to 20100911 3487 Merge with NetBSD make, pick up 3488 o meta.c - meta mode 3489 3490 * make-bootstrap.sh.in: handle meta.c 3491 * configure.in: add knobs for use_meta and filemon_h 3492 also, look for dirname, str[e]sep and strlcpy 3493 * util.c: add simple err[x] and warn[x] 3494 34952010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3496 3497 * boot-strap (TOOL_DIFF): set this to ensure tests use 3498 the same version of diff that configure tested 3499 3500 * Makefile.in (MAKE_VERSION): bump version to 20100808 3501 Merge with NetBSD make, pick up 3502 o in jobs mode, when we discover we cannot make something, 3503 call PrintOnError before exit. 3504 35052010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3506 3507 * Makefile.in (MAKE_VERSION): bump version to 20100806 3508 Merge with NetBSD make, pick up 3509 o formatting fixes for ignored errors 3510 o ensure jobs are cleaned up regardless of where wait() was called. 3511 35122010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3513 3514 * Makefile.in (MAKE_VERSION): bump version to 20100618 3515 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3516 35172010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3518 3519 * Makefile.in (MAKE_VERSION): bump version to 20100616 3520 Merge with NetBSD make, pick up 3521 o man page update 3522 o call PrintOnError from JobFinish when we detect an error we 3523 are not ignoring. 3524 35252010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3526 3527 * Makefile.in (MAKE_VERSION): bump version to 20100606 3528 Merge with NetBSD make, pick up 3529 o man page update 3530 35312010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3532 3533 * Makefile.in (MAKE_VERSION): bump version to 20100605 3534 Merge with NetBSD make, pick up 3535 o use bmake_signal() which is a wrapper around sigaction() 3536 in place of signal() 3537 o add .export-env to allow exporting variables to environment 3538 without tracking (so no re-export when the internal value is 3539 changed). 3540 35412010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3542 3543 * Makefile.in (MAKE_VERSION): bump version to 20100524 3544 Merge with NetBSD make, pick up 3545 o fix for .info et al being greedy. 3546 35472010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3548 3549 * Makefile.in (MAKE_VERSION): bump version to 20100520 3550 Merge with NetBSD make, pick up 3551 o back to using realpath on argv[0] 3552 but only if contains '/' and does not start with '/'. 3553 35542010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3555 3556 * boot-strap: use absolute path for bmake when running tests. 3557 3558 * Makefile.in (MAKE_VERSION): bump version to 20100510 3559 Merge with NetBSD make, pick up 3560 o revert use of realpath on argv[0] 3561 too many corner cases. 3562 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3563 35642010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3565 3566 * Makefile.in (MAKE_VERSION): bump version to 20100505 3567 Merge with NetBSD make, pick up 3568 o fix for missed SIGCHLD when compiled with SunPRO 3569 actually for bmake, defining FORCE_POSIX_SIGNALS would have 3570 done the job. 3571 35722010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 3573 3574 * Makefile.in (MAKE_VERSION): bump version to 20100430 3575 Merge with NetBSD make, pick up 3576 o fflush stdout before writing to stdout 3577 35782010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 3579 3580 * Makefile.in (MAKE_VERSION): bump version to 20100423 3581 Merge with NetBSD make, pick up 3582 o updated unit tests for Haiku (this time for sure). 3583 * boot-strap: based on patch from joerg 3584 honor --with-default-sys-path better. 3585 * boot-strap: remove mention of --with-prefix-sys-path 3586 35872010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 3588 3589 * Makefile.in (MAKE_VERSION): bump version to 20100422 3590 * Merge with NetBSD make, pick up 3591 o fix for vfork() on Darwin. 3592 o fix for bogus $TMPDIR. 3593 o set .MAKE.MODE=compat for -B 3594 o set .MAKE.JOBS=max_jobs for -j max_jobs 3595 o allow unit-tests to run without any *.mk 3596 o unit-tests/modmisc be more conservative in dirs presumed to exist. 3597 * boot-strap: ignore /usr/share/mk except on NetBSD. 3598 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 3599 ensure sort(1) behaves as expected. 3600 36012010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3602 3603 * boot-strap: add FindHereOrAbove so we can use -m .../mk 3604 36052010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3606 3607 * Makefile.in (MAKE_VERSION): bump version to 20100420 3608 * Merge with NetBSD make, pick up 3609 o fix for variable realpath() behavior. 3610 we have to stat(2) the result to be sure. 3611 o fix for .export (all) when nested vars use :sh 3612 36132010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 3614 3615 * Makefile.in (MAKE_VERSION): bump version to 20100414 3616 * Merge with NetBSD make, pick up 3617 o use realpath to resolve argv[0] (for .MAKE) if needed. 3618 o add realpath from libc. 3619 o add :tA to resolve variable via realpath(3) if possible. 3620 36212010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 3622 3623 * Makefile.in (MAKE_VERSION): bump version to 20100408 3624 * Merge with NetBSD make, pick up 3625 o unit tests for .ERROR, .error 3626 o fix for .ERROR to ensure it cannot be default target. 3627 36282010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 3629 3630 * Makefile.in (MAKE_VERSION): bump version to 20100406 3631 * Merge with NetBSD make, pick up 3632 o fix for compat mode "Error code" going to debug_file. 3633 o fix for .ALLSRC being populated twice. 3634 o support for .info, .warning and .error directives 3635 o .MAKE.MODE to control make's operational mode 3636 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 3637 name(s). 3638 o .MAKE.DEPENDFILE to control the name of the depend file 3639 o .ERROR target - run on failure. 3640 36412010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 3642 3643 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 3644 3645 * os.sh,arch.c: patch for Haiku from joerg at netbsd 3646 36472010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 3648 3649 * Makefile.in (MAKE_VERSION): bump version to 20100222 3650 * Merge with NetBSD make, pick up 3651 o better error msg for .for with mutiple inter vars 3652 3653 * boot-strap: 3654 o use make-bootstrap.sh from joerg at netbsd 3655 to avoid the need for a native make when bootstrapping. 3656 o add "" everywhere ;-) 3657 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 3658 otherwise the pre-formated version. 3659 36602010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 3661 3662 * Makefile.in (MAKE_VERSION): bump version to 20100102 3663 * Merge with NetBSD make, pick up: 3664 o fix for -m .../ 3665 36662009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 3667 3668 * Makefile.in (MAKE_VERSION): bump version to 20091118 3669 * Merge with NetBSD make, pick up: 3670 o .unexport 3671 o report lines that start with '.' and should have ':' 3672 (catch typo's of .el*if). 3673 36742009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3675 3676 * configure.in: Ensure that srcdir and mksrc are absolute paths. 3677 36782009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3679 3680 * Makefile.in (MAKE_VERSION): fix version to 20091007 3681 36822009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 3683 3684 * Makefile.in (MAKE_VERSION): bump version to 200910007 3685 * Merge with NetBSD make, pick up: 3686 o fix for parsing of :S;...;...; applied to .for loop iterator 3687 appearing in a dependency line. 3688 36892009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3690 3691 * Makefile.in (MAKE_VERSION): bump version to 20090909 3692 * Merge with NetBSD make, pick up: 3693 o fix for -C, .CURDIR and .OBJDIR 3694 * boot-strap: 3695 o allow share_dir to be set independent of prefix. 3696 o select default share_dir better when prefix ends in $HOST_TARGET 3697 o if FORCE_BSD_MK etc were set, include them in the suggested 3698 install-mk command. 3699 37002009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 3701 3702 * Makefile.in (MAKE_VERSION): bump version to 20090908 3703 * Merge with NetBSD make, pick up: 3704 o .MAKE.LEVEL for recursion tracking 3705 o fix for :M scanning \: 3706 37072009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3708 3709 * configure.in: Don't -D__EXTENSIONS__ if 3710 AC_USE_SYSTEM_EXTENSIONS says "no". 3711 37122009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 3713 3714 * Makefile.in (MAKE_VERSION): bump version to 20090826 3715 Simplify MAKE_VERSION to just the bare date. 3716 * Merge with NetBSD make, pick up: 3717 o -C directory support. 3718 o support for SIGINFO 3719 o use $TMPDIR for temp files. 3720 o child of vfork should be careful about modifying parent's state. 3721 3722 37232009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 3724 3725 * Appy some patches for MiNT from David Brownlee 3726 37272009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 3728 3729 * Makefile.in (BMAKE_VERSION): bump version to 20090222 3730 * Merge with NetBSD make, pick up: 3731 o Possible null pointer de-ref in Var_Set. 3732 37332009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 3734 3735 * Makefile.in (BMAKE_VERSION): bump version to 20090204 3736 * Merge with NetBSD make, pick up: 3737 o bmake_malloc et al moved to their own .c 3738 o Count both () and {} when looking for the end of a :M pattern 3739 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 3740 o strlist.c - functions for processing extendable arrays of pointers to strings. 3741 o ClientData replaced with void *, so const void * can be used. 3742 o New debug flag C for DEBUG_CWD 3743 37442008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 3745 3746 * Makefile.in (BMAKE_VERSION): bump version to 20081111 3747 Apply patch from Joerg Sonnenberge to 3748 configure.in: 3749 o remove some redundant checks 3750 o check for emlloc etc only in libutil and require the whole family. 3751 util.c: 3752 o remove [v]asprintf which is no longer used. 3753 37542008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3755 3756 * Makefile.in (BMAKE_VERSION): bump version to 20081101 3757 * Merge with NetBSD make, pick up: 3758 o util.c: avoid use of putenv() - christos 3759 37602008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3761 3762 * Makefile.in (BMAKE_VERSION): bump version to 20081030 3763 pick up man page tweaks. 3764 37652008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 3766 3767 * Makefile.in: move processing of LIBOBJS to after is definition! 3768 thus we'll have getenv.c in SRCS only if needed. 3769 3770 * make.1: add examples of how to use :? 3771 3772 * Makefile.in (BMAKE_VERSION): bump version to 20081029 3773 * Merge with NetBSD make, pick up: 3774 o fix for .END processing with -j 3775 o segfault from Parse_Error when no makefile is open 3776 o handle numeric expressions in any variable expansion 3777 o debug output now defaults to stderr, -dF to change it - apb 3778 o make now uses bmake_malloc etc so that it can build natively 3779 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 3780 37812008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 3782 3783 * Makefile.in (BMAKE_VERSION): bump version to 20080808 3784 * Merge with NetBSD make, pick up: 3785 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 3786 long lines in Makefiles 3787 o optimizations for VarQuote by joerg 3788 o fix for PR/38756: dominik: make dumps core on invalid makefile 3789 37902008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 3791 3792 * Makefile.in (BMAKE_VERSION): bump version to 20080515 3793 * Merge with NetBSD make, pick up: 3794 o fix skip setting vars in VAR_GLOBAL context, to handle 3795 cases where VAR_CMD is used for other than command line vars. 3796 37972008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 3798 3799 * boot-strap (make_version): we may need to look in 3800 $prefix/share/mk for sys.mk 3801 3802 * Makefile.in (BMAKE_VERSION): bump version to 20080514 3803 * Merge with NetBSD make, pick up: 3804 o skip setting vars in VAR_GLOBAL context, when already set in 3805 VAR_CMD which takes precedence. 3806 38072008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 3808 3809 * Makefile.in (BMAKE_VERSION): bump version to 20080330 3810 * Merge with NetBSD make, pick up: 3811 o fix for ?= when LHS contains variable reference. 3812 38132008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3814 3815 * merge some patches from NetBSD pkgsrc. 3816 3817 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 3818 the MAKSYSPATH used during bootstrap. 3819 3820 * Makefile.in (BMAKE_VERSION): bump version to 20080215 3821 * Merge with NetBSD make, pick up: 3822 o warn if non-space chars follow 'empty' in a conditional. 3823 38242008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3825 3826 * Makefile.in (BMAKE_VERSION): bump version to 20080118 3827 * Merge with NetBSD make, pick up: 3828 o consider dependencies read from .depend as optional - dsl 3829 o remember when buffer for reading makefile grows - dsl 3830 o add -dl (aka LOUD) - David O'Brien 3831 38322007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 3833 3834 * Makefile.in (BMAKE_VERSION): bump version to 20071022 3835 * Merge with NetBSD make, pick up: 3836 o Allow .PATH<suffix> to be used for .include "" 3837 3838 * boot-strap: source default settings from .bmake-boot-strap.rc 3839 38402007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 3841 3842 * Makefile.in: fix maninstall on various systems 3843 provided that our man.mk is used. 3844 For non-BSD systems we install the preformatted page 3845 into $MANDIR/cat1 3846 38472007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 3848 3849 * boot-strap: make bmake.1 too, so maninstall works. 3850 38512007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 3852 3853 * Makefile.in (BMAKE_VERSION): bump version to 20071014 3854 * Merge with NetBSD make, pick up: 3855 o revamped handling of defshell - configure no longer needs to 3856 know the content of the shells array - apb 3857 o stop Var_Subst modifying its input - apb 3858 o avoid calling ParseTrackInput too often - dsl 3859 38602007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 3861 3862 * Makefile.in (BMAKE_VERSION): bump version to 20071011 3863 * Merge with NetBSD make, pick up: 3864 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 3865 3866 * sigcompat.c: some tweaks for HP-UX 11.x based on 3867 patch from Tobias Nygren 3868 3869 * configure.in: update handling of --with-defshell to match 3870 new make behavior. --with-defshell=/usr/xpg4/bin/sh 3871 will now do what one might hope - provided the chosen shell 3872 behaves enough like sh. 3873 38742007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 3875 3876 * Makefile.in (BMAKE_VERSION): bump to 20071008 3877 * Merge with NetBSD make, pick up: 3878 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 3879 o .export/.MAKE.EXPORTED - export of variables - sjg 3880 o .MAKE.MAKEFILES - track all makefiles read - sjg 3881 o performance improvements - dsl 3882 o revamp parallel job scheduling - dsl 3883 38842006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3885 3886 * Makefile.in (BMAKE_VERSION): bump to 20060728 3887 * Merge with NetBSD make, pick up: 3888 o extra debug info during variable and cond processing - sjg 3889 o shell definition now covers newline - rillig 3890 o minor mem leak in PrintOnError - sjg 3891 38922006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3893 3894 * Makefile.in (BMAKE_VERSION): bump to 20060511 3895 * Merge with NetBSD make, pick up: 3896 o more memory leaks - coverity 3897 o possible overflow in ArchFindMember - coverity 3898 o extract variable modifier code out of Var_Parse() 3899 so it can be called recursively - sjg 3900 o unit-tests/moderrs - sjg 3901 39022006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 3903 3904 * Makefile.in (BMAKE_VERSION): bump to 20060412 3905 * Merge with NetBSD make, pick up: 3906 o fixes for some memory leaks - coverity 3907 o only read first sys.mk etc when searching sysIncPath - sjg 3908 3909 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 3910 setting ${MAKEFILE} - OBATA Akio 3911 39122006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 3913 3914 * Makefile.in (BMAKE_VERSION): bump to 20060318 3915 * Merge with NetBSD make, pick up: 3916 o cleanup of job.c to remove remote handling, distcc is more 3917 useful and this code was likely bit-rotting - dsl 3918 o fix for :P modifier - sjg 3919 * boot-strap: set default prefix to something reasonable 3920 (for me anyway). 3921 39222006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 3923 3924 * Makefile.in (BMAKE_VERSION): bump to 20060301 3925 * Merge with NetBSD make, pick up: 3926 o make .WAIT apply recursively, document and test case - apb 3927 o allow variable modifiers in a variable appear anywhere in 3928 modifier list, document and test case - sjg 3929 39302006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 3931 3932 * Makefile.in (BMAKE_VERSION): bump to 20060222 3933 * Merge with NetBSD make, pick up: 3934 o improved job token handling - dsl 3935 o SIG_DFL the correct signal before exec - dsl 3936 o more debug info during parsing - dsl 3937 o allow variable modifiers to be specified via variable - sjg 3938 * boot-strap: explain why we died if no mksrc 3939 39402005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 3941 3942 * Makefile.in (BMAKE_VERSION): bump to 20051105 3943 * configure.in: always set default_sys_path 3944 default is ${prefix}/share/mk 3945 - remove prefix_sys_path, anyone wanting more than above 3946 needs to set it manually. 3947 39482005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3949 3950 * boot-strap: make this a bit easier for pkgsrc folk. 3951 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 3952 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 3953 39542005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 3955 3956 * Makefile.in (BMAKE_VERSION): bump to 20051102 3957 * job.c (JobFinish): fix likely ancient merge lossage 3958 fix from Todd Vierling. 3959 * boot-strap (srcdir): allow setting mksrc=none 3960 39612005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 3962 3963 * Makefile.in (BMAKE_VERSION): bump to 20051031 3964 * ranlib.h: skip on OSF too. 3965 (NetBSD PR 31864) 3966 39672005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 3968 3969 * Makefile.in (BMAKE_VERSION): bump to 20051002 3970 fix a silly typo 3971 39722005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3973 3974 * Makefile.in (BMAKE_VERSION): bump to 20051001 3975 support for UnixWare and some other systems, 3976 based on patches from pkgsrc/bootstrap 3977 39782005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3979 3980 * Makefile.in (BMAKE_VERSION): bump to 20050901 3981 * Merge with NetBSD make, pick up: 3982 o possible parse error causing us to wander off. 3983 39842005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 3985 3986 * Makefile.in (BMAKE_VERSION): bump to 20050606 3987 * Merge with NetBSD make, pick up: 3988 o :0x modifier for randomizing a list 3989 o fixes for a number of -Wuninitialized issues. 3990 39912005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 3992 3993 * Makefile.in (BMAKE_VERSION): bump to 20050530 3994 * Merge with NetBSD make, pick up: 3995 o Handle dependencies for .BEGIN, .END and .INTERRUPT 3996 3997 * README: was seriously out of date. 3998 39992005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4000 4001 * Important to use .MAKE rather than MAKE. 4002 40032005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4004 4005 * Makefile.in (BMAKE_VERSION): bump to 20050315 4006 * Merge with NetBSD make, pick up: 4007 o don't mistake .elsefoo for .else 4008 o use suffix-specific search path correctly 4009 o bunch of style nits 4010 40112004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4012 4013 * boot-strap: 4014 o ensure that args to --src and --with-mksrc 4015 are resolved before giving them to configure. 4016 o add -o "objdir" so that builder can control it, 4017 default is $OS as determined by os.sh 4018 o add -q to suppress all the install instructions. 4019 40202004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4021 4022 * Remove __IDSTRING() 4023 4024 * Makefile.in (BMAKE_VERSION): bump to 20040508 4025 * Merge with NetBSD make, pick up: 4026 o posix fixes 4027 - remove '-e' from compat mode 4028 - add support for '+' command-line prefix. 4029 o fix for handling '--' on command-line. 4030 o fix include in lst.lib/lstInt.h to simplify '-I's 4031 o we also picked up replacement of MAKE_BOOTSTRAP 4032 with !MAKE_NATIVE which is a noop, but possibly confusing. 4033 40342004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4035 4036 * Makefile.in (BMAKE_VERSION): bump to 20040414 4037 * Merge with NetBSD make, pick up: 4038 o allow quoted strings on lhs of conditionals 4039 o issue warning when extra .else is seen 4040 o print line numer when errors encountered during parsing from 4041 string. 4042 40432004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4044 4045 * Makefile.in (BMAKE_VERSION): bump to 20040220 4046 * Merge with NetBSD make, pick up: 4047 o fix for old :M parsing bug. 4048 o re-jigged unit-tests 4049 40502004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4051 4052 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4053 so that './bmake -f Makefile test' works. 4054 40552004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4056 4057 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4058 * Merge with NetBSD make, pick up: 4059 o search upwards for *.mk 4060 o fix for double free of var substitution buffers 4061 o use of getopt replaced with custom code, since the usage 4062 (re-scanning) isn't posix compatible. 4063 40642004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4065 4066 * arch.c: don't include ranlib.h on ELF systems 4067 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4068 40692004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4070 4071 * Makefile.in (BMAKE_VERSION): bump to 20040118 4072 4073 * boot-strap (while): export vars we assign to on cmdline 4074 * unit-test/Makefile.in: ternary is .PHONY 4075 40762004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4077 4078 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4079 * Merge with NetBSD make, pick up: 4080 o fix for ternary modifier 4081 40822004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4083 4084 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4085 * Merge with NetBSD make, pick up: 4086 o fix for cond.c to handle compound expressions better 4087 o variable expansion within sysV style replacements 4088 40892003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4090 4091 * Make portable snprintf safer - output to /dev/null first to 4092 check space needed. 4093 4094 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4095 * Merge with NetBSD make, pick up: 4096 o -dg3 to show input graph when things go wrong. 4097 o explicitly look for makefiles in objdir if not found in curdir so 4098 that errors in .depend etc will be reported accurarely. 4099 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4100 instead as it more accurately reflects the expected behavior and 4101 is more consistently implemented. 4102 o avoid use of asprintf. 4103 41042003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4105 4106 * util.c: Add asprintf and vasprintf. 4107 4108 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4109 * Merge with NetBSD make, pick up: 4110 :[] modifier - allows picking words from a variable. 4111 :tW modifier - allows treating value as one big word. 4112 W flag for :C and :S - allows treating value as one big word. 4113 41142003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4115 4116 * Merge with NetBSD make 4117 pick up -de flag to enable printing failed command. 4118 don't skip 1st two dir entries (normally . and ..) since 4119 coda does not have them. 4120 41212003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4122 4123 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4124 * Merge with NetBSD make, pick up: 4125 - changes for -V '${VAR}' to print fully expanded value 4126 cf. -V VAR 4127 - CompatRunCommand now prints the command that failed. 4128 - several files got updated 3 clause Berkeley license. 4129 41302003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4131 4132 * boot-strap: Allow setting configure args on command line. 4133 41342003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4135 4136 * configure.in: add --with-defshell to allow sh or ksh 4137 to be selected as default shell. 4138 4139 * Makefile.in: bump version to 20030731 4140 4141 * Merge with NetBSD make 4142 Pick up .SHELL spec for ksh and associate man page changes. 4143 Also compat mode now uses the same shell specs. 4144 41452003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4146 4147 * var.c (Var_Parse): ensure delim is initialized. 4148 4149 * unit-tests/Makefile.in: use single quotes to avoid problems from 4150 some shells. 4151 4152 * makefile.boot.in: 4153 Run the unit-tests as part of the bootstrap procedure. 4154 41552003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4156 4157 * unit-tests/Makefile.in: always force complaints from 4158 ${TEST_MAKE} to be from 'make'. 4159 4160 * configure.in: add check for 'diff -u' 4161 also fix some old autoconf'isms 4162 4163 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4164 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4165 4166 * Merge with NetBSD make 4167 Pick up fix for :ts parsing error in some cases. 4168 Pick unit-tests. 4169 41702003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4171 4172 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4173 4174 * var.c (Var_Parse): fix bug in :ts modifier, after const 4175 correctness fixes, must pass nstr to VarModify. 4176 41772003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4178 4179 * Makefile.in: BMAKE_VERSION switch to a date based version. 4180 We'll generally use the date of last import from NetBSD. 4181 4182 * Merge with NetBSD make 4183 Pick up fixes for const-correctness, now passes WARNS=3 on 4184 NetBSD. 4185 Pick up :ts modifier, allows controlling the separator used 4186 between words in variable expansion. 4187 41882003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4189 4190 * FILES: include boot-strap and os.sh 4191 4192 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4193 FreeBSD is known to be bad. 4194 4195 * makefile.boot.in (bootstrap): make this the default target. 4196 4197 * Makefile.in: bump version to 3.1.19 4198 4199 * machine.sh: avoid A-Z with tr as it is bound to lose. 4200 42012003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4202 4203 * Merge with NetBSD make 4204 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4205 Plus some doc fixes. 4206 42072003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4208 4209 * Merge with NetBSD make 4210 Pick up fix for PR/1523 - don't count a library as built, if there 4211 is no way to build it 4212 4213 * Bump version to 3.1.18 4214 42152003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4216 4217 * Merge with NetBSD make 4218 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4219 appears in src list. 4220 42212003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4222 4223 * Merge with NetBSD make (mmm 10th anniversary!) 4224 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4225 pick up -X which tells us to not export VAR=val via setenv if 4226 we are already doing so via MAKEFLAGS. This saves valuable env 4227 space on systems like Darwin. 4228 set MAKE_VERSION to 3.1.17 4229 4230 * parse.c: pix up fix for suffix rules 4231 42322003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4233 4234 * Merge with NetBSD make. 4235 pick up fix for propagating -B via MAKEFLAGS. 4236 set MAKE_VERSION to 3.1.16 4237 4238 * Apply some patches from pkgsrc-bootstrap/bmake 4239 Originally by Grant Beattie <grant@netbsd.org> 4240 I may have missed some - since they are based on bmake-3.1.12 4241 42422002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4243 4244 * makefile.boot.in (bmake): update install targets for those that 4245 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4246 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4247 4248 * bmake.cat1: update the pre-formatted man page! 4249 42502002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4251 4252 * Merge with NetBSD make. 4253 pick up fix for premature free of pointer used in call 4254 to Dir_InitCur(). 4255 set MAKE_VERSION to 3.1.15 4256 42572002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4258 4259 * configure.in: determine suitable value for MKSRC. 4260 override using --with-mksrc=PATH. 4261 4262 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4263 configs(8) will use 'sun4' as an alias for 'sparc'. 4264 42652002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4266 4267 * Merge with NetBSD make. 4268 pick up ${.PATH} 4269 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4270 set MAKE_VERSION to 3.1.14 4271 add configure checks for killpg and sys/socket.h 4272 42732002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4274 4275 * tag bmake-3-1-13 4276 4277 * makefile.boot.in (bmake): use install-mk 4278 Also setup ./mk before trying to invoke bmake.boot incase we 4279 needed install-mk to create a sys.mk for us. 4280 4281 * configure.in: If we need to add -I${srcdir}/missing, make it an 4282 absolute path so that it works for lst.lib too. 4283 4284 * make.h: always include sys/cdefs.h since we provide one if the 4285 host does not. 4286 4287 * Makefile.in (install-mk): 4288 use MKSRC/install-mk which will do the right thing. 4289 use uname -p for ARCH if possible. 4290 since install-mk will setup links bsd.prog.mk -> prog.mk if 4291 needed, just .include bsd.prog.mk 4292 4293 * Merge with NetBSD make (NetBSD-1.6) 4294 Code is ansi-C only now. 4295 Bug in handling of dotLast is fixed. 4296 Can now assign .OBJDIR and make will reset its notions of life. 4297 New modifiers :tu :tl for toUpper and toLower. 4298 4299Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4300 4301 * Merge with NetBSD make 4302 pick up fix for .END failure in compat mode. 4303 pick up fix for extra va_end() in ParseVErrorInternal. 4304 4305Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4306 4307 * configure.in: for systems that have sys/cdefs.h check if it is 4308 compatible. If not, include the one under missing, but tell it to 4309 include the native one too - necessary on Linux. 4310 4311 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4312 include_next (for gcc) to get the native sys/cdefs.h 4313 4314Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4315 4316 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4317 leaking descriptors when using -jN. 4318 4319 * job.c (JobPrintCommand): See if "curdir" exists before 4320 attempting to chdir(). Doing the chdir directly in make (when in 4321 compat mode) fails silently, so let the -jN version do the same. 4322 This can happen when building kernels in an object tree and 4323 playing clever games to reset .CURDIR. 4324 4325 * Merged with NetBSD make 4326 pick up .USEBEFORE 4327 4328Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4329 4330 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4331 4332Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4333 4334 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4335 us not to export the iterator variable when using VAR_CMD context. 4336 4337Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4338 4339 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4340 its the wrong "fix". 4341 4342Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4343 4344 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4345 We now simply append the variable names to .MAKEOVERRIDES, and 4346 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4347 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4348 Apart from fixing quoting bugs in previous version, this allows us 4349 to export vars to the environment by simply doing: 4350 .MAKEOVERRIDES+= PATH 4351 Merged again with NetBSD make, but the above is the only change. 4352 4353 * configure.in: added 4354 --disable-pwd-override disable $PWD overriding getcwd() 4355 --disable-check-make-chdir disable make trying to guess 4356 when it should automatically cd ${.CURDIR} 4357 4358 * Merge with NetBSD make, changes include: 4359 parse.c (ParseDoDependency): Spot that the syntax error is 4360 caused by an unresolved cvs/rcs conflict and say so. 4361 var.c: most of Var* functions now take a ctxt as 1st arg. 4362 now does variable substituion on rhs of sysv style modifiers. 4363 4364 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4365 is now done here. We append the name='value' to .MAKEOVERRIDES 4366 rather than directly into MAKEFLAGS as this allows a Makefile to 4367 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4368 very similar mechanism. Note that in adding name='value' to 4369 .MAKEOVERRIDES we do the moral equivalent of: 4370 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4371 4372Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4373 4374 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4375 4376 * Merged with NetBSD make 4377 make -dx can now be used to run commands via sh -x 4378 better error messages on exec failures. 4379 4380Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4381 4382 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4383 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4384 MACHINE etc otherwise they propagate from the previous bmake. 4385 4386 * configure.in (machine): allow --with-machine=generic to make 4387 configure use machine.sh to set MACHINE. 4388 4389 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4390 4391 * Makefile.in: mention in bmake.1 that we use autoconf. 4392 4393 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4394 4395Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4396 4397 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4398 as that rather defeats the usefulness of ${MAKEFILE}. 4399 4400 * main.c (MainParseArgs): append command line variable assignments 4401 to MAKEFLAGS so that they get propagated to child make's. 4402 Apparently this is required POSIX behaviour? Its useful anyway. 4403 4404Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4405 4406 * compat.c (CompatRunCommand): don't use perror() since stdio may 4407 cause problems in child of vfork(). 4408 4409 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4410 This routine prints out the .curdir where we stopped and will also 4411 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4412 4413 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4414 :@ expansion. 4415 4416 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4417 4418 * Added RCSid's for the files we've touched. 4419 4420Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4421 4422 * configure.in: Thanks to some clues from mdb@juniper.net, 4423 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4424 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4425 4426 --with-machine=MACHINE explicitly set MACHINE 4427 --with-force-machine=MACHINE set FORCE_MACHINE 4428 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4429 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4430 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4431 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4432 4433 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4434 4435 * makefile: added a pathetically simple makefile to drive 4436 bootstrapping. Running configure by hand is more useful. 4437 4438 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4439 dependent on NetBSD bsd.*.mk 4440 4441 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4442 _PATH_OBJDIRPREFIX for those that don't want a default. 4443 construct _PATH_DEFSYSPATH from the info we get from configure. 4444 4445 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4446 if MAKE_VERSION is defined. 4447 4448 * compat.c: when we bail, print out the .CURDIR we were in. 4449 4450Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4451 4452 * Merged with NetBSD make 4453 4454 * var.c: fixed a bug in the handling of the modifier :P 4455 if the node as found but the path was null, we segfault trying to 4456 duplicate it. 4457 4458Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4459 4460 * Merged with NetBSD make 4461 4462 * make.c: Make_OODate's test for a library out of date was using 4463 cmtime where it should have used mtime (my bug). 4464 4465 * compat.c: Use perror() to tell us what really went wrong when we 4466 cannot exec a command. 4467 4468Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4469 4470 * Merged with NetBSD make 4471 4472Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4473 4474 * Merged with NetBSD make 4475 4476Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4477 4478 * Merged with NetBSD make 4479 4480Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4481 4482 * Merged with NetBSD make 4483 4484Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4485 4486 * util.c: don't provide signal() since we use sigcompat.c 4487 4488 * Makefile.in: added a build target. 4489 4490 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4491 These allow some quite clever magic. 4492 4493 * main.c (main): added support for getenv(MAKESYSPATH). 4494 4495Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4496 4497 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4498 This avoids objdir having a different value depending on how a 4499 directory was reached (via command line, or subdir.mk). 4500 4501 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4502 4503Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4504 4505 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4506 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4507 I've been testing this in NetBSD's make for some weeks. 4508 4509 * Turn Makefile into Makefile.in and make it useful. 4510 4511Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4512 4513 * Imported NetBSD's -current make(1) and resolve conflicts. 4514 4515 * Applied autoconf patches from bmake v2 4516 4517 * Imported clean code base from NetBSD-1.0 4518