12025-04-14 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20250414 4 Merge with NetBSD make, pick up 5 o job.c: clean up job and output handling 6 o parse.c: after entering POSIX mode, don't leave it again 7 82025-04-11 Simon J Gerraty <sjg@beast.crufty.net> 9 10 * VERSION (_MAKE_VERSION): 20250411 11 Merge with NetBSD make, pick up 12 o convert more messages to file:line: format 13 o for.c: condense code for parsing variable names in .for loops 14 152025-04-10 Simon J Gerraty <sjg@beast.crufty.net> 16 17 * VERSION (_MAKE_VERSION): 20250410 18 Merge with NetBSD make, pick up 19 o cond.c: remove redundant error counter when parsing a condition 20 212025-04-04 Simon J Gerraty <sjg@beast.crufty.net> 22 23 * VERSION (_MAKE_VERSION): 20250404 24 Merge with NetBSD make, pick up 25 o make.1: better document meta mode. 26 o var.c: fix error message for undefined variable in conditional. 27 282025-03-30 Simon J Gerraty <sjg@beast.crufty.net> 29 30 * VERSION (_MAKE_VERSION): 20250330 31 Merge with NetBSD make, pick up 32 o in POSIX compatability mode, give preference to sysV style modifiers. 33 o in stack trace with details and includes, list the current file 34 o parse.c: report file location in more common file:line: format. 35 o var.c: simplify error handling for unknown modifiers 36 let the ":O" and ":t" modifiers fall back to the ":from=to" modifier 37 stop parsing after seeing an unknown modifier in an expression 38 fix error message for unclosed expression and invalid :[...] 39 add details to errors about ::= modifier 40 add details about indirect modifiers to the stack traces 41 in stack traces from target commands, add the command level 42 432025-03-23 Simon J Gerraty <sjg@beast.crufty.net> 44 45 * VERSION (_MAKE_VERSION): 20250323 46 Merge with NetBSD make, pick up 47 o var.c: just ignore attempts to override a read-only global with 48 the same value. 49 502025-03-08 Simon J Gerraty <sjg@beast.crufty.net> 51 52 * bsd.after-import.mk: by default generate makefiles 53 closer to BSD style. 54 55 * VERSION (_MAKE_VERSION): 20250308 56 Merge with NetBSD make, pick up 57 o clean up comments and code for parallel mode 58 o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. 59 602025-02-27 Simon J Gerraty <sjg@beast.crufty.net> 61 62 * VERSION (_MAKE_VERSION): 20250225 63 Merge with NetBSD make, pick up 64 o job.c: reliably remove targets on interrupt, 65 by passing signal to children first. 66 672025-01-25 Simon J Gerraty <sjg@beast.crufty.net> 68 69 * VERSION (_MAKE_VERSION): 20250125 70 Merge with NetBSD make, sync up below change. 71 72 * unit-tests/Makefile: remove $TMPDIR via .END 73 to avoid failure in test on NFS - since the temp file for the 74 target script is open and thus gets renamed by the server rather 75 than removed. 76 772025-01-20 Simon J Gerraty <sjg@beast.crufty.net> 78 79 * VERSION (_MAKE_VERSION): 20250120 80 Merge with NetBSD make, pick up 81 o use FORK_FUNCTION so it can be forced to fork when doing coverage. 82 o main.c: avoid memory allocation in error path after exec failure. 83 842025-01-16 Simon J Gerraty <sjg@beast.crufty.net> 85 86 * VERSION (_MAKE_VERSION): 20250116 87 Merge with NetBSD make, pick up 88 o clarify that undefined expressions are allowed in dependencies 89 o simplify code for evaluating the '!=' variable assignment 90 912025-01-11 Simon J Gerraty <sjg@beast.crufty.net> 92 93 * VERSION (_MAKE_VERSION): 20250111 94 Merge with NetBSD make, pick up 95 o replace "Malformed conditional" with "Variable is undefined" 96 when appropriate 97 982025-01-10 Simon J Gerraty <sjg@beast.crufty.net> 99 100 * VERSION (_MAKE_VERSION): 20250110 101 Merge with NetBSD make, pick up 102 o job.c: remove some unnecessary layers in job handling 103 o unit-tests: test expressions based on undefined variables 104 1052025-01-01 Simon J Gerraty <sjg@beast.crufty.net> 106 107 * VERSION (_MAKE_VERSION): 20250101 108 Merge with NetBSD make, pick up 109 o var.c: reduce pointer indirections when unexporting a variable 110 1112024-12-12 Simon J Gerraty <sjg@beast.crufty.net> 112 113 * VERSION (_MAKE_VERSION): 20241212 114 * mk/ updates 115 1162024-11-24 Simon J Gerraty <sjg@beast.crufty.net> 117 118 * VERSION (_MAKE_VERSION): 20241124 119 Merge with NetBSD make, pick up 120 o var.c: fix confusing error message when overriding a read-only 121 variable 122 1232024-11-22 Simon J Gerraty <sjg@beast.crufty.net> 124 125 * VERSION (_MAKE_VERSION): 20241122 126 Merge with NetBSD make, pick up 127 o unit-tests/Makefile: optimize running of tests skip extra cat 128 in 99% of cases. 129 1302024-11-15 Simon J Gerraty <sjg@beast.crufty.net> 131 132 * VERSION (_MAKE_VERSION): 20241114 133 Merge with NetBSD make, pick up 134 o make.1: note that MAKEOBJPREFIX should be absolute path 135 also that it can be set via makefile if suitable care taken. 136 1372024-11-10 Simon J Gerraty <sjg@beast.crufty.net> 138 139 * VERSION (_MAKE_VERSION): 20241110 140 Merge with NetBSD make, pick up 141 o make: allow .../ (search here and above) in 142 .MAKE.MAKEFILE_PREFERENCE and -f argument. 143 1442024-11-03 Simon J Gerraty <sjg@beast.crufty.net> 145 146 * VERSION (_MAKE_VERSION): 20241101 147 Merge with NetBSD make, pick up 148 o parse.c: report filename:linenumber in parse debug output 149 1502024-09-21 Simon J Gerraty <sjg@beast.crufty.net> 151 152 * VERSION (_MAKE_VERSION): 20240921 153 Merge with NetBSD make, pick up 154 o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. 155 156 * Makefile: use genfiles.mk to generate ${MAN} 157 so that it can be tuned for local site. 158 Ensure MAN is defined before including Makefile.inc 159 160 * Makefile: use MK_GEN_MAN to make it easier to control whether we 161 generate ${MAN} 162 1632024-09-16 Simon J Gerraty <sjg@beast.crufty.net> 164 165 * VERSION (_MAKE_VERSION): 20240909 166 167 * arch.c: fix NetBSD PR 58597 168 1692024-09-01 Simon J Gerraty <sjg@beast.crufty.net> 170 171 * Makefile: use SUBDIR.${MK_TESTS} so that we skip 172 unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS 173 174 * VERSION (_MAKE_VERSION): 20240901 175 Merge with NetBSD make, pick up 176 o reduce line length in error messages 177 o var.c: simplify printing of an evaluation stack element 178 1792024-08-29 Simon J Gerraty <sjg@beast.crufty.net> 180 181 * VERSION (_MAKE_VERSION): 20240828 182 Merge with NetBSD make, pick up 183 o add more context to error message about recursive variables 184 o treat recursive variables non-fatally - continue parsing to end 185 of makefile 186 1872024-08-12 Simon J Gerraty <sjg@beast.crufty.net> 188 189 * VERSION (_MAKE_VERSION): 20240808 190 Merge with NetBSD make, pick up 191 o improve some error messages for better clarify and readability 192 1932024-07-22 Simon J Gerraty <sjg@beast.crufty.net> 194 195 * VERSION (_MAKE_VERSION): 20240722 196 Merge with NetBSD make, pick up 197 o job.c: remove dead code 198 1992024-07-21 Simon J Gerraty <sjg@beast.crufty.net> 200 201 * VERSION (_MAKE_VERSION): 20240720 202 Merge with NetBSD make, pick up 203 o compat.c: do not run commands that have parse or evaluation errors. 204 o var.c: remove wrong error message about an undefined variable 205 2062024-07-13 Simon J Gerraty <sjg@beast.crufty.net> 207 208 * cleanup redundant differences from NetBSD make 209 o parse.c: no longer uses mmap 210 o var.c: check __STDC_VERSION__ not __STDC__ 211 2122024-07-12 Simon J Gerraty <sjg@beast.crufty.net> 213 214 * Apply some patches from NetBSD pkgsrc to reduce divergence 215 o meta.c: requires sys/select.h if available 216 o var.c: ensure SIZE_MAX has a value 217 o util.c: ensure SA_RESTART is defined 218 219 * configure.in: use *ksh* rather than just *ksh to match 220 ksh shell specification. 221 222 * unit-tests/Makefile: expand BROKEN_TESTS for ksh and 223 mksh in particular 224 2252024-07-11 Simon J Gerraty <sjg@beast.crufty.net> 226 227 * VERSION (_MAKE_VERSION): 20240711 228 Merge with NetBSD make, pick up 229 o compat.c: allow Compat_RunCommand to also handle very long 230 commands by writing to a temp file when needed. 231 o main.c: extract the temp file logic recently added to Cmd_Exec 232 to Cmd_Argv so it can be leveraged by Compat_RunCommand. 233 2342024-07-09 Simon J Gerraty <sjg@beast.crufty.net> 235 236 * VERSION (_MAKE_VERSION): 20240709 237 Merge with NetBSD make, pick up 238 o error out on parse/evaluation errors in shell commands 239 o var.c: error out on syntax errors in ':M' and ':N' modifiers 240 2412024-07-07 Simon J Gerraty <sjg@beast.crufty.net> 242 243 * VERSION (_MAKE_VERSION): 20240707 244 Merge with NetBSD make, pick up 245 o only generate code for cleanup functions in CLEANUP mode 246 o hash.c: don't track hash table chain lengths during lookup 247 unless debugging 248 o main.c: move initialization of variable scopes to targ.c 249 o var.c: remove Var_End as it is now unnecessary 250 2512024-07-06 Simon J Gerraty <sjg@beast.crufty.net> 252 253 * VERSION (_MAKE_VERSION): 20240706 254 Merge with NetBSD make, pick up 255 o reduce lint comments about ARGSUSED 256 o cond.c: error out on conditions containing the operators '&' and '|' 257 o str.c: error out on a matching malformed matching pattern '[[' 258 o var.c: in error messages, distinguish parsing from evaluating 259 in error messages for anonymous variables, log the value 260 error out on unclosed expressions during parse time 261 2622024-07-04 Simon J Gerraty <sjg@beast.crufty.net> 263 264 * VERSION (_MAKE_VERSION): 20240704 265 Merge with NetBSD make, pick up 266 o add more context information to error messages 267 o main.c: on error, print the targets to be made 268 add detailed exit status to message for failed sub-commands 269 o var.c: error out on the "Bad modifier" error message 270 2712024-07-01 Simon J Gerraty <sjg@beast.crufty.net> 272 273 * VERSION (_MAKE_VERSION): 20240701 274 Merge with NetBSD make, pick up 275 o var.c: add :tt for Title case 276 2772024-06-30 Simon J Gerraty <sjg@beast.crufty.net> 278 279 * configure.in: 20240630 further refine check for whether 280 TZ=Europe/Berlin works 281 282 * VERSION (_MAKE_VERSION): 20240630 283 Merge with NetBSD make, pick up 284 o job.c: reduce use of UNCONST 285 o main.c: add detailed exit status to message for failed sub-commands 286 o var.c: error out on some more syntax errors 287 add more context to "returned non-zero status" message 288 2892024-06-25 Simon J Gerraty <sjg@beast.crufty.net> 290 291 * VERSION (_MAKE_VERSION): 20240625 292 Merge with NetBSD make, pick up 293 o job.c: ensure shellPath is always duped, avoid upsetting free() 294 2952024-06-16 Simon J Gerraty <sjg@beast.crufty.net> 296 297 * VERSION (_MAKE_VERSION): 20240616 298 Merge with NetBSD make, pick up 299 o clean up collection of context information for error messages 300 o in warnings, move the word "warning" to the front 301 o var.c: throw an error on attempt to override an internal 302 read-only variable 303 3042024-06-10 Simon J Gerraty <sjg@beast.crufty.net> 305 306 * VERSION (_MAKE_VERSION): 20240610 307 Merge with NetBSD make, pick up 308 o for.c: remove redundant shortcut for building the .for loop body 309 3102024-06-02 Simon J Gerraty <sjg@beast.crufty.net> 311 312 * VERSION (_MAKE_VERSION): 20240602 313 Merge with NetBSD make, pick up 314 o rename some VarEvalMode constants to better match debug names. 315 o var.c: avoid out-of-bounds read when parsing indirect modifiers. 316 3172024-06-01 Simon J Gerraty <sjg@beast.crufty.net> 318 319 * VERSION (_MAKE_VERSION): 20240601 320 Merge with NetBSD make, pick up 321 o add .export-all rather than allow .export with no argument 322 which can happen accidentally. 323 o if lua is available, run check-expect.lua after unit-tests 324 o main.c: use snprintf rather than strncpy 325 fix memory leak when purging realpath cache. 326 3272024-05-28 Simon J Gerraty <sjg@beast.crufty.net> 328 329 * VERSION (_MAKE_VERSION): 20240528 330 Merge with NetBSD make, pick up 331 o fix a number of memory leaks 332 o replace magic numbers with POSIX FILENO constants 333 o hash.c: remove dead code from HashTable_DeleteEntry 334 o main.c: when complaining about unusable .OBJDIR 335 call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. 336 o parse.c: use fewer technical terms in debug message for dependency 337 3382024-05-20 Simon J Gerraty <sjg@beast.crufty.net> 339 340 * VERSION (_MAKE_VERSION): 341 Merge with NetBSD make, pick up 342 o dir.c: in FindFile restore last search of .CURDIR even for 343 includes, as a number of existing makefiles are broken otherwise. 344 3452024-05-19 Simon J Gerraty <sjg@beast.crufty.net> 346 347 * VERSION (_MAKE_VERSION): 20240519 348 Merge with NetBSD make, pick up 349 o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. 350 Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. 351 o main.c: no need to set .DOTLAST in sysIncPath 352 3532024-05-07 Simon J Gerraty <sjg@beast.crufty.net> 354 355 * VERSION (_MAKE_VERSION): 20240508 356 Merge with NetBSD make, pick up 357 o make: ensure variables set on command line get added to 358 .MAKEOVERRIDES (even if they start with '.') so they are passed to 359 sub-makes. 360 3612024-04-30 Simon J Gerraty <sjg@beast.crufty.net> 362 363 * VERSION (_MAKE_VERSION): 20240430 364 Merge with NetBSD make, pick up 365 o main.c: ensure '.include <makefile>' respects MAKESYSPATH. 366 Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 367 3682024-04-28 Simon J Gerraty <sjg@beast.crufty.net> 369 370 * VERSION (_MAKE_VERSION): 20240428 371 Merge with NetBSD make, pick up 372 o simplify freeing of lists 373 o arch.c: trim pointless comments 374 o var.c: delay variable assignments until actually needed 375 don't reallocate memory after evaluating an expression, result is 376 almost always short-lived. 377 3782024-04-26 Simon J Gerraty <sjg@beast.crufty.net> 379 380 * VERSION (_MAKE_VERSION): 20240426 381 Merge with NetBSD make, pick up 382 o job.c: in debug output, print the directory in which a job 383 failed at same time as failed target so it is more easily found in 384 build log. 385 3862024-04-24 Simon J Gerraty <sjg@beast.crufty.net> 387 388 * VERSION (_MAKE_VERSION): 20240424 389 Merge with NetBSD make, pick up 390 o clean up comments, code and tests 391 3922024-04-23 Simon J Gerraty <sjg@beast.crufty.net> 393 394 * VERSION (_MAKE_VERSION): 20240422 395 Merge with NetBSD make, pick up 396 o var.c: avoid LazyBuf for :*time modifiers. 397 LazyBuf's are not nul terminated so not suitable for passing to 398 functions that expect that. These modifiers are used sparingly so 399 an extra allocation is not a problem. 400 4012024-04-20 Simon J Gerraty <sjg@beast.crufty.net> 402 403 * VERSION (_MAKE_VERSION): 20240420 404 Merge with NetBSD make, pick up 405 o provide more context information for parse/evaluate errors 406 4072024-04-14 Simon J Gerraty <sjg@beast.crufty.net> 408 409 * VERSION (_MAKE_VERSION): 20240414 410 Merge with NetBSD make, pick up 411 o parse.c: print -dp debug info earlier so we see which 412 .if or .for line is being parsed. 413 4142024-04-04 Simon J Gerraty <sjg@beast.crufty.net> 415 416 * VERSION (_MAKE_VERSION): 20240404 417 Merge with NetBSD make, pick up 418 o fix some unit tests for Cygwin 419 o parse.c: exit immediately after reading a null byte from a makefile 420 421 * fix generation of bmake.cat1 422 4232024-03-19 Simon J Gerraty <sjg@beast.crufty.net> 424 425 * VERSION (_MAKE_VERSION): 20240314 426 Add/Improve support for Cygwin 427 o uname -s output isn't useful so allow configure to 428 set FORCE_MAKE_OS - to force the value of .MAKE.OS 429 and use Cygwin which matches uname -o 430 o fix some unit-tests for Cygwin 431 4322024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 433 434 * boot-strap: tests can take a long time; use a cookie to 435 skip them if bmake has not been updated since tests last 436 ran successfully. 437 438 * Makefile: Cygwin handles MANTARGET man 439 440 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 441 4422024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 443 444 * VERSION (_MAKE_VERSION): 20240309 445 Merge with NetBSD make, pick up 446 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 447 this allows a .ERROR target to ignore the case of 448 .ERROR_EXIT==6 which just means that the build actually 449 failed somewhere else. 450 4512024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 452 453 * VERSION (_MAKE_VERSION): 20240303 454 455 * var.c: on IRIX we need both inttypes.h and stdint.h 456 4572024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 458 459 * VERSION (_MAKE_VERSION): 20240301 460 Merge with NetBSD make, pick up 461 o export variables with value from target scope 462 when appropriate. 463 4642024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 465 466 * VERSION (_MAKE_VERSION): 20240212 467 Merge with NetBSD make, pick up 468 o remove unneeded conditional-compilation toggles 469 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 470 GMAKEEXPORT NO_REGEX and SUNSHCMD 471 472 * configure.in: add check for regex.h 473 474 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 475 4762024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 477 478 * VERSION (_MAKE_VERSION): 20240204 479 Merge with NetBSD make, pick up 480 o var.c: fix some lint (-dL) mode parsing issues 481 4822024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 483 484 * VERSION: (_MAKE_VERSION): 20240202 485 Merge with NetBSD make, pick up 486 o make.1: note that arg to :D and :U can be empty 487 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 488 4892024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 490 491 * VERSION (_MAKE_VERSION): 20240108 492 Merge with NetBSD make, pick up 493 o miscellaneous cleanups 494 4952024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 496 497 * VERSION (_MAKE_VERSION): 20240106 498 Merge with NetBSD make, pick up 499 o fix duplicate progname when reporting an unknown target 500 o unit tests for Cmd_Exec using temp file 501 5022024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 503 504 * VERSION (_MAKE_VERSION): 20240105 505 Merge with NetBSD make, pick up 506 o main.c: Cmd_Exec write cmd to a file if too big 507 avoid blowing commandline/env limits 508 5092024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 510 511 * VERSION (_MAKE_VERSION): 20240101 512 o util.c: flesh out more of strftime 513 * configure.in: add --with-bmake-strftime 514 it is not a full implementation but enough to pass all 515 the unit-tests. 516 * parse.c: LoadFile do not append \n to empty buffer. 517 5182023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 519 520 * VERSION (_MAKE_VERSION): 20231230 521 Merge with NetBSD make, pick up 522 o simplify memory allocation for string buffers 523 o fix declared types of list nodes 524 o suff.c: clean up freeing of suffixes 525 o var.c: simplify debug message for the ':@var@...@' modifier 526 clean up variable handling 527 5282023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 529 530 * VERSION (_MAKE_VERSION): 20231226 531 Merge with NetBSD make, pick up 532 o compat.c: ensure make's output is correctly ordered with that of 533 the target when not going to a tty 534 o main.c: check for shellPath whether to call Shell_Init() 535 5362023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 537 538 * VERSION (_MAKE_VERSION): 20231224 539 Merge with NetBSD make, pick up 540 o compat.c: check for shellPath whether to call Shell_Init() 541 tweak the unit test to detect the bug thus fixed. 542 o make.1: do not claim .SHELL is only used by jobs mode. 543 5442023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 545 546 * VERSION (_MAKE_VERSION): 20231220 547 Merge with NetBSD make, pick up 548 o str.c: speed up pattern matching in the ':M' modifier 549 o var.c: fix confusing debug logging when deleting a variable 550 use consistent debug messages style when ignoring variables 551 5522023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 553 554 * VERSION (_MAKE_VERSION): 20231210 555 Merge with NetBSD make, pick up 556 o var.c: avoid segfault on empty :C match expression 557 explain in debug log why variable assignment is ignored. 558 5592023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 560 561 * VERSION (_MAKE_VERSION): 20231208 562 Merge with NetBSD make, pick up 563 o var.c: ensure fromCmd is set correctly for variables set on 564 command line. 565 5662023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 567 568 * configure.in: disable generation of 'makefile' for 569 Darwin by default. 570 571 * boot-strap: docuement --without-makefile 572 5732023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 574 575 * VERSION (_MAKE_VERSION): 20231124 576 Merge with NetBSD make, pick up 577 o main.c: cleanup processing of -j 578 fix lint warning about strchr 579 o var.c: more accurate error message for invalid ':mtime' argument 580 cleanup :[...] modifier 581 avoid reading beyond substring when comparing 582 o unit-tests cover all cases of :mtime, test and explain exporting 583 of variables 584 o cleanup comments 585 5862023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 587 588 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 589 $FreeBSD$ tag, so avoid adding it. 590 5912023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 592 593 * VERSION (_MAKE_VERSION): 20230909 594 Merge with NetBSD make, pick up 595 o main.c: allow -j to compute a multiple of ncpu 596 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 597 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 598 _SC_NPROCESSORS_ONLN 599 .MAKE.JOBS.C will be "yes" if -jC is supported 600 6012023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 602 603 * VERSION (_MAKE_VERSION): 20230820 604 Merge with NetBSD make, pick up 605 o make.1: note that :localtime is better for %s 606 o parse.c: improve error messages for invalid input. 607 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 608 correct result, it is still better to use %s:L:localtime. 609 6102023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 611 612 * VERSION (_MAKE_VERSION): 20230818 613 Merge with NetBSD make, pick up 614 o meta.c: meta_ignore - check raw path against metaIgnorePaths 615 to potentially skip call to realpath. 616 o var.c: be strict when parsing the argument of the ':mtime' modifier 617 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 618 should be used to get an equivalent value to time(3). 619 6202023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 621 622 * VERSION (_MAKE_VERSION): 20230816 623 Merge with NetBSD make, pick up 624 o cond.c: clean up multiple-inclusion guards 625 6262023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 627 628 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 629 if configure cannot work out how to control TZ. 630 Remove varmod-localtime from BROKEN_TESTS for IRIX* 631 6322023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 633 634 * VERSION (_MAKE_VERSION): 20230723 635 636 * configure.in: fix the test for wether TZ=Europe/Berlin works. 637 Depending on the time of year, if run between 22:00 and 00:00 UTC 638 the check in configure would fail incorrectly. 639 Take the day into account as well. 640 6412023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 642 643 * VERSION (_MAKE_VERSION): 20230711 644 Merge with NetBSD make, pick up 645 o make.1: clean up wording, clarify scope of '!' in conditions 646 6472023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 648 649 * make-bootstrap.sh.in: set prefix 650 If configure is run using ksh we get unexpanded ${prefix} in 651 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 652 correct result. 653 6542023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 655 656 * VERSION (_MAKE_VERSION): 20230711 657 bump version for IRIX tweaks 658 659 * make.h: undef OP_NONE if defined 660 661 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 662 663 * configure.in: override INSTALL on IRIX 664 6652023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 666 667 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 668 6692023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 670 671 * VERSION (_MAKE_VERSION): 20230622 672 Merge with NetBSD make, pick up 673 o optimize string matching for ':M' and ':N' 674 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 675 6762023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 677 678 * VERSION (_MAKE_VERSION): 20230621 679 Merge with NetBSD make, pick up 680 o more extensive tests for include guards 681 o parse.c: if a guard is already defined a file that uses the same 682 guard is still guarded by it. 683 6842023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 685 686 * VERSION (_MAKE_VERSION): 20230620 687 Merge with NetBSD make, pick up 688 o allow guards to be targets as well as variables 689 The guard targets may include variable references like 690 __${.PARSEDIR:tA}/${.PARSEFILE}__ 691 6922023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 693 694 * VERSION (_MAKE_VERSION): 20230619 695 Merge with NetBSD make, pick up 696 o unit test for .undef of readOnly vars 697 o optimization for makefiles protected from multiple-inclusion 698 skip even opening the file after first include. 699 Initially this only handles makefiles guarded by a variable 700 target guards are next. 701 7022023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 703 704 * VERSION (_MAKE_VERSION): 20230616 705 Merge with NetBSD make, pick up 706 o var.c: do not allow delete of readOnly variable 707 7082023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 709 710 * VERSION (_MAKE_VERSION): 20230601 711 Merge with NetBSD make, pick up 712 o parse.c: .break takes no args 713 o lots of unit test updates 714 7152023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 716 717 * unit-tests/Makefile: skip tests that require /dev/filemon 718 if it does not exists - issue a warning. 719 7202023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 721 722 * VERSION (_MAKE_VERSION): 20230522 723 Fix building on darwin ppc 724 725 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 726 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 727 7282023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 729 730 * VERSION (_MAKE_VERSION): 20230515 731 732 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 733 compile filemon_ktrace.c 734 7352023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 736 737 * VERSION (_MAKE_VERSION): 20230512 738 o sys.dirdeps.mk - broke after-import target 739 7402023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 741 742 * VERSION (_MAKE_VERSION): 20230510 743 Merge with NetBSD make, pick up 744 o parse.c: don't print null filename in stack traces 745 o var.c: :mtime operate on each word in variable value 746 7472023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 748 749 * VERSION (_MAKE_VERSION): 20230509 750 Merge with NetBSD make, pick up 751 o for.c: skip syntactically wrong .for loops 752 o var.c: allow for :gmtime=${mtime} 753 add :mtime[=timestamp] where timestamp is used if stat(2) 754 fails, if :mtime=error stat(2) failure causes error. 755 7562023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 757 758 * VERSION (_MAKE_VERSION): 20230504 759 Merge with NetBSD make, pick up 760 o compat.c: fix compile on NetBSD 7.2 761 o make.1: fix documentation of .PREFIX to match reality and POSIX 762 o unit-tests: improved var-scope-local 763 7642023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 765 766 * VERSION (_MAKE_VERSION): 20230414 767 Merge with NetBSD make, pick up 768 o minor cleanup 769 7702023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 771 772 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 773 unlimited results in an insane number (0x7fffffffffffffff). 774 If BMAKE_NOFILE_MAX is defined, use that instead. 775 7762023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 777 778 * VERSION (_MAKE_VERSION): 20230321 779 Merge with NetBSD make, pick up 780 * make.1: document seemingly unexplained Error code 6. 781 7822023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 783 784 * VERSION (_MAKE_VERSION): 20230317 785 Merge with NetBSD make, pick up 786 o compat.c: CompatDeleteTarget skip .PHONY targets to be 787 consistent with JobDeleteTarget. 788 o job.c: fix memory leak in handling sysv :from=to modifiers 789 7902023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 791 792 * VERSION (_MAKE_VERSION): 20230303 793 Merge with NetBSD make, pick up 794 o several updated unit-tests 795 7962023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 797 798 * VERSION (_MAKE_VERSION): 20230222 799 Merge with NetBSD make, pick up 800 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 801 8022023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 803 804 * VERSION (_MAKE_VERSION): 20230218 805 Merge with NetBSD make, pick up 806 o var.c: fix parsing of unevaluated subexpressions with 807 unbalanced '{}' 808 8092023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 810 811 * VERSION (_MAKE_VERSION): 20230215 812 Merge with NetBSD make, pick up 813 o inline macros for some variable names 814 o cond.c: reduce complexity of evaluating expressions 815 8162023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 817 818 * VERSION (_MAKE_VERSION): 20230208 819 Merge with NetBSD make, pick up 820 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 821 when it has been used within conditional expressions 822 8232023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 824 825 * VERSION (_MAKE_VERSION): 20230127 826 827 * install-sh: if making directories ensure umask is set 828 to match mode. 829 830 * Makefile: use DIRMODE for directories and 831 NONBINMODE for man pages and mk files 832 8332023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 834 835 * VERSION (_MAKE_VERSION): 20230126 836 Merge with NetBSD make, pick up 837 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 838 should be read-only. 839 8402023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 841 842 * VERSION (_MAKE_VERSION): 20230123 843 Merge with NetBSD make, pick up 844 o .[NO]READONLY: for control of read-only variables 845 o .SYSPATH: for controlling the path searched for makefiles 846 8472023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 848 849 * VERSION (_MAKE_VERSION): 20230120 850 Merge with NetBSD make, pick up 851 o allow for white-space between command specifiers @+- 852 o add more details to warning 'Extra targets ignored' 853 8542023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 855 856 * machine.sh: leverage os.sh rather than duplicate 857 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 858 for that purpose for the past decade or so. 859 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 860 8612023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 862 863 * VERSION (_MAKE_VERSION): 20230101 864 Merge with NetBSD make, pick up 865 o cleanup comments, inline some LazyBuf_ methods 866 o unit-tests/ add/improve comments in tests 867 o make.1: sync list of built-in variables with reality 868 sort list of built-in variables 869 reduce indentation of the long list of variable names 870 use consistent markup for boolean flags 871 move description of .MAKE.MODE below the .MAKE.META block 872 clarify in which case an expression may omit braces 873 8742022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 875 876 * VERSION (_MAKE_VERSION): 20221024 877 Merge with NetBSD make, pick up 878 o change return type of unlink_file back to int 879 8802022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 881 882 * Makefile: Darwin and Linux can handle MANTARGET=man 883 8842022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 885 886 * VERSION (_MAKE_VERSION): 20220928 887 Merge with NetBSD make, pick up 888 o fix more ignored returns from snprintf 889 o compile with higher warnings 890 8912022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 892 893 * main.c meta.c: do not ignore return from snprintf 894 895 * meta.c strlcpy.c: we need prototype for strlcpy 896 897 * sigcompat.c: fix unused function warnings 898 8992022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 900 901 * VERSION (_MAKE_VERSION): 20220924 902 Merge with NetBSD make, pick up 903 o fix bug in .break reset of conditional depth 904 o overhaul and simplify tracking of conditional depth 905 9062022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 907 908 * VERSION (_MAKE_VERSION): 20220912 909 Merge with NetBSD make, pick up 910 o man page updates 911 9122022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 913 914 * VERSION (_MAKE_VERSION): 20220909 915 Merge with NetBSD make, pick up 916 o update unit-tests to handle deprecation of egrep 917 o cond.c: add more details to error message for numeric comparison 918 919 * configure.in: allow for deprecation of egrep 920 921 * Makefile: Linux can handle MANTARGET=man 922 9232022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 924 925 * VERSION (_MAKE_VERSION): 20220903 926 Merge with NetBSD make, pick up 927 o job.c: fix handling of null bytes in output 928 9292022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 930 931 * VERSION (_MAKE_VERSION): 20220902 932 Merge with NetBSD make, pick up 933 o Allow .break to terminate a .for loop early 934 9352022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 936 937 * VERSION (_MAKE_VERSION): 20220901 938 Merge with NetBSD make, pick up 939 o var.c: fix out-of-bounds errors when parsing 940 9412022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 942 943 * VERSION (_MAKE_VERSION): 20220824 944 Merge with NetBSD make, pick up 945 o var.c: revert change to modifier parsing that breaks 946 shell variable references within ':@var@body@' 947 o adjust unit-tests 948 9492022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 950 951 * VERSION (_MAKE_VERSION): 20220818 952 Merge with NetBSD make, pick up 953 o fix exit status for '-q' (since 1994) 954 9552022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 956 957 * VERSION (_MAKE_VERSION): 20220808 958 Merge with NetBSD make, pick up 959 o var.c: fix parsing of modifiers containing unbalanced subexpressions 960 extract parsing of ':D' and ':U' modifiers into separate function 961 9622022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 963 964 * VERSION (_MAKE_VERSION): 20220726 965 966 * Auto-create objdir for bmake/unit-tests if appropriate 967 9682022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 969 970 * VERSION (_MAKE_VERSION): 20220724 971 Merge with NetBSD make, pick up 972 o make.1: describe variable assignment and evaluation more precisely 973 o parse.c: fix out-of-bounds read when parsing an invalid line 974 o var.c: simplify return type of IsShortVarnameValid 975 9762022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 977 978 * VERSION (_MAKE_VERSION): 20220612 979 Merge with NetBSD make, pick up 980 o allow to randomize build order of targets 981 .MAKE.MODE += randomize-targets can help uncover dependency bugs 982 within a makefile. 983 o compat.c: rename Compat_Run to Compat_MakeAll 984 o make.c: inline MakeBuildParent 985 inline make_abort, improve error details 986 o parse.c: reorganize Parse_Error 987 fix memory leak in wildcard targets and sources 988 separate cases in HandleDependencyTargetMundane 989 extract HandleSingleDependencyTargetMundane 990 rename loadfile to LoadFile 991 split IncludeFile into separate functions 992 condense code for searching a file in the paths 993 fix off-by-one error in buffer for .WAIT nodes 994 o str.c: condense Str_Match 995 make code for string matching syntactically more consistent 996 9972022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 998 999 * VERSION (_MAKE_VERSION): 20220418 1000 Merge with NetBSD make, pick up 1001 o ignore '.POSIX:' if not in first non-comment line 1002 of Makefile as specified by POSIX. 1003 add unit-tests for above. 1004 o meta.c: make it easier to find usage of identifiers 1005 o targ.c: add .USEBEFORE to Targ_PrintType 1006 10072022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 1008 1009 * VERSION (_MAKE_VERSION): 20220414 1010 1011 * unit-tests/Makefile: simplify checks for shells with 1012 BROKEN_TESTS, this helps with other Linux distros that 1013 use dash. 1014 10152022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1016 1017 * VERSION (_MAKE_VERSION): 20220330 1018 Merge with NetBSD make, pick up 1019 o var.c: fix spacing, and a typo in a test 1020 10212022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 1022 1023 * VERSION (_MAKE_VERSION): 20220326 1024 Merge with NetBSD make, pick up 1025 o parse.c: try to include 'posix.mk' the first time 1026 .POSIX: is encountered, to allow for beter POSIX compliance. 1027 o var.c: make debug logs more readable 1028 prefer 'long long' over 'long' on 32-bit C99 platforms 1029 fix crash on .undef of an environment variable 1030 10312022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 1032 1033 * VERSION (_MAKE_VERSION): 20220303 1034 Merge with NetBSD make, pick up 1035 o tell meta mode unit tests not to expect filemon 1036 o cond.c: make debug logging for comparisons less technical 1037 o lst.c: fix mem leak in Lst_Remove 1038 o str.c: make code for string matching syntactically more consistent 1039 o var.c: simplify ParseModifier_Match 1040 10412022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 1042 1043 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 1044 1045 * VERSION (_MAKE_VERSION): 20220214 1046 Merge with NetBSD make, pick up 1047 o cond.c: simplify control flow in CondParser_Comparison 1048 o job.c: fix echoing of command with '-' in silent target in jobs mode 1049 o main.c: prefix the warning about read-only .OBJDIR with a colon 1050 o parse.c: remove redundant conditions 1051 o var.c: simplify control flow in ModifyWord_SysVSubst 1052 10532022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1054 1055 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 1056 is any chance we have dash as .SHELL 1057 1058 * VERSION (_MAKE_VERSION): 20220208 1059 Merge with NetBSD make, pick up 1060 o more unit tests 1061 o meta.c: use a variable to hold command line to be filtered 1062 to avoid any side effects from content of command line. 1063 10642022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 1065 1066 * VERSION (_MAKE_VERSION): 20220204 1067 Merge with NetBSD make, pick up 1068 o use unsigned consistently for line numbers, avoid the need for %z 1069 o parse.c: do not step off end of input in Parse_IsVar 1070 when checking for target local variable assignments 1071 10722022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 1073 1074 * VERSION (_MAKE_VERSION): 20220202 1075 Merge with NetBSD make, pick up 1076 o remove redundant declaration of HashIter_Init 1077 o make DEBUG0 simpler 1078 10792022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1080 1081 * cast gn->lineno to avoid %z 1082 1083 * VERSION (_MAKE_VERSION): 20220130 1084 Merge with NetBSD make, pick up 1085 o more unit tests 1086 o make GNode lineno unsigned to please lint 1087 o print location of recursive variable references in commands 1088 o print "stack trace" (makefile includes) on fatal errors 1089 o make.1: refine documentation for target local assignments 1090 10912022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 1092 1093 * VERSION (_MAKE_VERSION): 20220128 1094 Merge with NetBSD make, pick up 1095 o inline functions called only once 1096 o for.c: clean up AddEscape for building the body of a .for loop 1097 o hash.c: merge duplicate code for finding an entry in a hash table 1098 replace HashEntry_KeyEquals with strncmp 1099 o make.1: document quirks of target local variable assignments. 1100 o parse.c: cleanup white-space 1101 11022022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1103 1104 * VERSION (_MAKE_VERSION): 20220126 1105 Merge with NetBSD make, pick up 1106 o allow setting target local variables 1107 o more unit tests 1108 o add missing newline after "cannot continue" message 1109 o meta.c: clean up eat_dots 1110 o parse.c: fix filename in warning about duplicate script 1111 o var.c: when expanding nested variables, check simple things first 1112 11132022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 1114 1115 * VERSION (_MAKE_VERSION): 20220116 1116 Merge with NetBSD make, pick up 1117 o fix for unit-tests/varname-makeflags on non-BSD systems 1118 o use Var_Exists rather than Var_Value where appropriate 1119 o remove unnecessary functions for expanding variable names 1120 o cond.c: inline EvalBare 1121 o main.c: lint cleanup 1122 o parse.c: condense code in Parse_IsVar 1123 use islower for parsing directives (none have upper case) 1124 11252022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1126 1127 * VERSION (_MAKE_VERSION): 20220112 1128 Merge with NetBSD make, pick up 1129 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 1130 comparion, rarely needed but useful when it is. 1131 11322022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1133 1134 * VERSION (_MAKE_VERSION): 20220110 1135 Merge with NetBSD make, pick up 1136 o inline Buf_Clear 1137 o remove redundant braces 1138 o rename and inline Targ_Precious 1139 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 1140 o for.c: clean up handling of .for loops 1141 fix reported line numbers of continuation lines 1142 add details about .for loop variables to stack traces 1143 o job.c: reduce code for initializing error handling in shell 1144 o main.c: in Cmd_Exec, return error message instead of format string 1145 have as few statements as possible between va_start and va_end 1146 add debug logging for capturing the output of external commands 1147 o make.c: use consistent variable names for varargs 1148 o make_malloc.c: remove duplicate code from bmake_strdup 1149 o parse.c: add missing printflike annotations 1150 remove redundant lines from stack traces 1151 fix stack traces in -dp mode 1152 reduce confusing code in ParseForLoop 1153 fix line number in debug log after returning from a file 1154 rename IFile and its fields to match their actual content 1155 clean up ParseDependencySources 1156 o var.c: shorten ApplyModifier_Assign 1157 rename is_shell_metachar, fix character conversion warning 1158 merge calls to ApplyModifier_Time 1159 merge duplicate code for modifiers 'gmtime' and 'localtime' 1160 11612022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 1162 1163 * parse.c: loadfile restore extra byte in buffer. 1164 11652022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1166 1167 * VERSION (_MAKE_VERSION): 20220101 1168 Merge with NetBSD make, pick up 1169 o more unit-tests 1170 o remove unnecessary words from command line options in CmdOpts 1171 o rename eunlink to unlink_file 1172 o cond.c: make ParseWord in condition parser simpler 1173 internally return false for irrelevant leaves in conditions 1174 replace table for function lookup in conditions with simple code 1175 merge duplicate types CondEvalResult and CondResult 1176 o for.c: clean up handling of .for loops and .include directives 1177 o main.c: constify cached_realpath 1178 clean up Cmd_Exec 1179 o parse.c: sync API documentation 1180 fix error message when reading more than 1 GB from stdin 1181 clean up parsing of makefiles 1182 fix line number in error message about open conditionals 1183 unexport types VarAssignOp and VarAssign 1184 clean up function names 1185 remove redundant parameters in dependency parsing functions 1186 reduce scope of the list of wildcard target names 1187 extract OP_NOTARGET into separate function 1188 clean up variable names for parsing dependency lines 1189 make debug logging a bit more human-friendly 1190 o var.c: condense code in ApplyModifier_Assign 1191 11922021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1193 1194 * VERSION (_MAKE_VERSION): 20211221 1195 Merge with NetBSD make, pick up 1196 o more unit-tests 1197 o style cleanup 1198 o in CLEANUP mode, free interned strings at the very end 1199 o fix memory leak for filenames in .for loops 1200 o buf.c: avoid memory leak 1201 o cond.c: condense CondParser_ComparisonOp 1202 o hash.c: change return type of HashTable_Set to void 1203 o job.c: change return type of Compat_RunCommand from int to bool 1204 o main.c: remove bmake_free 1205 o parse.c: condense repetetive code in ParseDirective 1206 remove dead code for handling traditional include directives 1207 clean up parsing of variable assignments 1208 remove unreachable code for parsing the dependency operator 1209 clean up loading of files 1210 fix memory leak in IncludeFile 1211 o var.c: fix memory leak when parsing a variable name 1212 fix memory leak from ${.SUFFIXES} 1213 reduce memory allocation in modifier ':?' and ':C' 1214 condense RegexReplace for the modifier ':C' and avoid strlen 1215 merge duplicate code for memory handling in Var_Parse 1216 distinguish between short-lived and environment variables 1217 rename VarFreeEnv to VarFreeShortLived 1218 12192021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 1220 1221 * cond.c: fix mem leak in CondParser_Leaf 1222 12232021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1224 1225 * VERSION (_MAKE_VERSION): 20211212 1226 Merge with NetBSD make, pick up 1227 o rename Parse_SetInput to Parse_PushInput 1228 o remove remove period from end of error messages and warnings 1229 to be more consistent 1230 o arch.c: use simpler memory management for parsing archive members 1231 o cond.c: rework and reduce recursion 1232 o for.c: rename some functions to better reflect purpose 1233 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 1234 o var.c: in parse errors, mark whitespace more clearly 1235 inline ParseEmptyArg into CondParser_FuncCallEmpty 1236 minimize calls to LazyBuf_Get in ParseVarnameLong 1237 treat .SUFFIXES as a read-only variable 1238 12392021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 1240 1241 * VERSION (_MAKE_VERSION): 20211207 1242 Merge with NetBSD make, pick up 1243 o inline HashIter_Init 1244 o parse.c: inline common subexpression in ParseRawLine 1245 o var.c: merge branches for modifiers ':D' and ':U' 1246 extract common code into Expr_Words 1247 extract common code into Expr_Str 1248 move low-level implementation details out of Var_Parse 1249 12502021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1251 1252 * VERSION (_MAKE_VERSION): 20211206 1253 Merge with NetBSD make, pick up 1254 o add unit-tests/varmod-loop-delete 1255 o for.c: inline Str_Words - reduce memory allocation 1256 o parse.c: do not try to expand fixed variable names 1257 only allocate the name of an included file if necessary 1258 clean up ParseInclude 1259 o var.c: fix use-after-free in modifier ':@' 1260 save a memory allocation in each modifier ':O' and ':u' 1261 save a memory allocation in the modifier ':[...]' 1262 in UnexportVars, replace Str_Words with Substring_Words to 1263 reduce allocations and copying. 1264 12652021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 1266 1267 * VERSION (_MAKE_VERSION): 20211204 1268 Merge with NetBSD make, pick up 1269 o flesh out a number of tests 1270 o replace enums with bitfields, this simplifies a lot of code. 1271 o var.c: refactor ParseModifierPartSubst 1272 12732021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 1274 1275 * VERSION (_MAKE_VERSION): 20211024 1276 Merge with NetBSD make, pick up 1277 o Punt on write errors - ENOSPC etc. 1278 12792021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1280 1281 * configure.in: use_defshell, set both DEFSHELL_INDEX 1282 and defshell_path if appropriate. 1283 This makes it easier to use say the KSH specification with 1284 and alternate path for the shell. 1285 1286 * configure.in compat.c: for SCO we need to force UseShell 1287 1288 * configure.in: SCO /bin/sh is not usable, provide a list of 1289 alternatives for use as .SHELL. 1290 We still have to mark some tests as broken, plus more if we end up 1291 with ksh as .SHELL. 1292 Issue a warning about skipped tests. 1293 1294 * boot-strap: leave TOOL_DIFF to configure 1295 1296 * configure.in: on SCO native cc is not usable, 1297 gcc is to be found in /usr/gnu/bin 1298 and while ancient is at least able to compile bmake. 1299 Thus we add /usr/gnu/bin to PATH if it exists, and later 1300 check if $CC would have been found via $PATH. 1301 If not we set CC to the full path of $CC. 1302 Also gnu diff is known to support -u, so if it exists use it. 1303 1304 * configure.in: move getopt to AC_REPLACE_FUNCS 1305 also add AC_C_INLINE - in an attempt to compile using 1306 native cc on SCO. 1307 1308 * configure.in: check for stresep as well as strsep, since we 1309 define the later to the former if necessary, and if we have to 1310 provide stresep we also need to provide a prototype. 1311 1312 * configure.in: we no longer need to worry about 1313 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 1314 1315 * make.h: make sure we have __RCSID 1316 1317 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 1318 can control it. 1319 13202021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 1321 1322 * VERSION: 20211020 1323 Merge with NetBSD make, pick up 1324 o confirm sync of unit-tests 1325 13262021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1327 1328 * configure.in: check if timezone Europe/Berlin is supported 1329 if not try UTC-1 1330 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 1331 symlink unit-tests -> ../unit-tests/obj so that 1332 unit-tests/Makefile.config is put in the right place. 1333 * refine filtering of .OBJDIR in unit-tests 1334 13352021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 1336 1337 * Fix unit-tests on Minix 3.2.0 1338 o job.c: do not punt if read of token pipe fails for EAGAIN. 1339 On Minix at least, we are not ready to read the childExitJob pipe 1340 when poll says we are. 1341 There should actually be no reason for this pipe to be 1342 non-blocking, but while that works fine on {Net,Free}BSD it 1343 breaks another test case on Minix. 1344 o unit-tests/Makefile: deal with variants of error messages 1345 and use of obj as .OBJDIR 1346 13472021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 1348 1349 * configure.in: add sigaction to AC_REPLACE_FUNCS 1350 we also need to check for sigaddset etc just for the benefit of 1351 sigact.c 1352 1353 * Add sigact.c as sigaction.c so this "just works". 1354 This should have been done back when bmake_signal started using 1355 sigaction (I only just noticed that sigact.c wasn't here ;-) 1356 Note: I no longer have access to any system where this would matter. 1357 13582021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 1359 1360 * VERSION (_MAKE_VERSION): 20211011 1361 1362 * Makefile: cleanup a little 1363 1364 * configure.in: check for sigsetmask 1365 13662021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1367 1368 * VERSION (_MAKE_VERSION): 20211001 1369 Merge with NetBSD make, pick up 1370 o reduce locations reducing text size 1371 o remove unnecessary const 1372 o cond.c: fix lint warning on i386 1373 do not allow unquoted 'left == right' after modifier ':?' 1374 o hash.c: fix build for DEBUG_HASH_LOOKUP 1375 o var.c: fix memory leak in error case of the ':?' modifier 1376 13772021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1378 1379 * VERSION (_MAKE_VERSION): 20210911 1380 Merge with NetBSD make, pick up 1381 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 1382 13832021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 1384 1385 * VERSION (_MAKE_VERSION): 20210906 1386 Merge with NetBSD make, pick up 1387 o more unit tests 1388 o lint cleanup 1389 o rename some functions to better fit purpose 1390 o for.c: cleanup - remove unnecessary optimization 1391 fix embedded newlines 1392 o parse.c: correct case for CVS/RCS 1393 13942021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 1395 1396 * VERSION (_MAKE_VERSION): 20210808 1397 Merge with NetBSD make, pick up 1398 o var.c: remove redundant initialization in ApplyModifier_Order 1399 1400 * mk/options.mk: issue warning for incorrect usage 1401 14022021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1403 1404 * var.c: use long for :On if we don't have a 64bit int type 1405 1406 * VERSION (_MAKE_VERSION): 20210803 1407 Merge with NetBSD make, pick up 1408 o rework varmod-order tests to avoid qsort instability 1409 o make.1: clarify :On entry 1410 14112021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1412 1413 * VERSION (_MAKE_VERSION): 20210731 1414 Merge with NetBSD make, pick up 1415 o fix some lint issues 1416 o more unit tests 1417 o var.c: rework of ApplyModifier_Order 1418 14192021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1420 1421 * util.c: add strto*l if HAVE_STRTO*L not defined 1422 1423 * VERSION (_MAKE_VERSION): 20210730 1424 Merge with NetBSD make, pick up 1425 o var.c: add :On and :Orn for numeric sort 1426 disabled if no 64bit type available. 1427 o _strtol.h: to implement strto*l functions 1428 14292021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1430 1431 * VERSION (_MAKE_VERSION): 20210704 1432 Merge with NetBSD make, pick up 1433 o unit-tests: fix some tests to be more portable 1434 - job-output-null not all shells do the same number of write calls 1435 - objdir-writable if TMPDIR is set; /tmp may not be usable 1436 14372021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1438 1439 * VERSION (_MAKE_VERSION): 20210701 1440 Merge with NetBSD make, pick up 1441 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1442 some tests just cannot work in some environments. 1443 o buf.c: simpler upper bound for length in Buf_AddInt 1444 o cond.c: fix grammar in error message for malformed conditional 1445 o for.c: prevent newline injection (from ${.newline}) in .for loops 1446 o var.c: use more practical data type in RegexReplace 1447 (avoid need for %zu) 1448 extract RegexReplace from ModifyWord_SubstRegex 1449 14502021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1451 1452 * VERSION (_MAKE_VERSION): 20210621 1453 Merge with NetBSD make, pick up 1454 o var.c: only report error for unmatched regex subexpression 1455 when linting (-dL) since we cannot tell when an unmatched 1456 subexpression is an expected result. 1457 o move unmatched regex subexpression tests to 1458 varmod-subst-regex.mk and enable strict (lint) mode 1459 14602021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1461 1462 * VERSION (_MAKE_VERSION): 20210616 1463 Merge with NetBSD make, pick up 1464 o more unit tests 1465 o cond.c: rename If_Eval to EvalBare 1466 improve function names for parsing conditions 1467 o job.c: fix error handling of targets that cannot be made 1468 o var.c: uncompress code in ApplyModifier_Unique 1469 14702021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1471 1472 * VERSION (_MAKE_VERSION): 20210518 1473 Merge with NetBSD make, pick up 1474 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1475 o job.c: Print -de error information when running multiple jobs 1476 14772021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1478 1479 * VERSION (_MAKE_VERSION): 20210420 1480 Merge with NetBSD make, pick up 1481 o use C99 bool type 1482 o convert VarEvalFlags back into an enum 1483 o cond.c: do not complain when skipping the condition 'no >= 10' 1484 o hash.c: avoid allocating memory for simple variable names 1485 o job.c: use distinct wording for writing to the shell commands file 1486 remove type name for the abort status in job handling 1487 rename PrintOutput to PrintFilteredOutput to avoid confusion 1488 o main.c: avoid double slash in name of temporary directory 1489 o var.c: use straight quotes for error 'Bad conditional expression' 1490 reduce memory allocations in the modifiers ':D' and ':U' 1491 rename members of ModifyWord_LoopArgs 1492 clean up pattern flags for the modifiers ':S' and ':C' 1493 reduce memory allocation and strlen calls in modifier ':from=to' 1494 in the ':Q' modifier, only allocate memory if necessary 1495 improve performance for LazyBuf 1496 remove redundant parameter from ParseVarnameLong 1497 migrate ParseModifierPart to use Substring 1498 avoid unnecessary calls to strlen when evaluating modifiers 1499 migrate ModifyWord functions to use Substring 1500 migrate handling of the modifier ':S,from,to,' to Substring 1501 reduce debug logging and memory allocation for ${:U...} 1502 reduce verbosity of the -dv debug logging for standard cases 1503 clean up debug logging for ':M' and ':N' 1504 disallow '$' in the variable name of the modifier ':@' 1505 simplify access to the name of an expression during evaluation 1506 15072021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1508 1509 * VERSION (_MAKE_VERSION): 20210330 1510 Merge with NetBSD make, pick up 1511 o replace enum bit-field with struct bit-field for VarEvalFlags 1512 o rename VARE_NONE to VARE_PARSE_ONLY 1513 o var.c: rename ApplyModifiersState to ModChain 1514 fix double varname expansion in the variable modifier '::=' 1515 change debug log for variable evaluation flags to lowercase 1516 15172021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1518 1519 * VERSION (_MAKE_VERSION): 20210314 1520 Merge with NetBSD make, pick up 1521 o var.c: avoid evaluating many modifiers in parse only mode 1522 in strict mode (-dL) many variable references are parsed twice, 1523 the first time just to report parse errors early, so we want to 1524 avoid side effects and wasted effort to the extent possible. 1525 15262021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1527 1528 * VERSION (_MAKE_VERSION): 20210226 1529 Merge with NetBSD make, pick up 1530 o remove freestanding freeIt variables 1531 link via FStr 1532 o var.c: restructure code in ParseVarname to target human readers 1533 improve error message for; 1534 bad modifier in variable expression 1535 unclosed modifier 1536 unknown modifier 1537 remove redundant parameter of ApplySingleModifier 1538 explain non-obvious code around indirect variable modifiers 1539 quote ':S' in error message about missing delimiter 1540 extract ParseModifier_Match into separate function 1541 add context information to error message about ':range' modifier 1542 add quotes around variable name in an error message 1543 reorder code in ModifyWords 1544 use more common parameter order for VarSelectWords 1545 make ModifyWord_Subst a little easier to understand 1546 do not expand variable name from the command line twice 1547 extract ExistsInCmdline from Var_SetWithFlags 1548 save a hash map lookup when defining a cmdline variable 1549 clean up VarAdd, Var_Delete, Var_ReexportVars 1550 use bit-shift expressions for VarFlags constants 1551 rename constants for VarFlags 1552 rename ExprDefined constants for debug logging 1553 rename ExprStatus to ExprDefined 1554 split parameters for evaluating variable expressions 1555 reduce redundant code around ModifyWords 1556 print error about failed shell command before overwriting variable 1557 clean up ValidShortVarname, ParseVarnameShort 1558 rename VarExprStatus to ExprStatus 1559 add functions for assigning the value of an expression 1560 rename ApplyModifiersState_Define to Expr_Define 1561 condense the code for parsing :S and :C modifiers 1562 15632021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1564 1565 * VERSION (_MAKE_VERSION): 20210206 1566 Merge with NetBSD make, pick up 1567 o unit-tests: use private TMPDIR to avoid errors from other users 1568 15692021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1570 1571 * VERSION (_MAKE_VERSION): 20210205 1572 Merge with NetBSD make, pick up 1573 o avoid strdup in mkTempFile 1574 o always use vfork 1575 o rename context and ctxt to scope 1576 o rename some VAR constants to SCOPE 1577 o Var_ functions, move the scope to the front 1578 o use shortcut functions Global_Set and Global_Append 1579 o add shortcut Global_Delete for deleting a global variable 1580 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1581 o compat.c: when exiting due to an error, print graph information 1582 o enum.c: remove overengineered Enum_ValueToString 1583 o make.c: remove unused INTERNAL flag 1584 remove unused return type of MakeBuildParent 1585 o parse.c: replace parse error "Need an operator" with better message 1586 o var.c: improve documentation about variable scopes 1587 rename Var_ValueDirect to GNode_ValueDirect 1588 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1589 merge SetVar into Var_SetWithFlags 1590 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1591 split Var_Append into Var_Append and Var_AppendExpand 1592 replace enum bit-set with bit-field 1593 o unit-tests/var-op-shell: use kill rather than kill -14 1594 which broke on darwin with recent update. 1595 15962021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1597 1598 * configure.in: check for sig_atomic_t and define it as 'int' 1599 if missing. 1600 1601 * VERSION (_MAKE_VERSION): 20210201 1602 Merge with NetBSD make, pick up 1603 o use sig_atomic_t for caught_sigchld 1604 16052021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1606 1607 * VERSION (_MAKE_VERSION): 20210130 1608 Merge with NetBSD make, pick up 1609 o more unit tests 1610 o convert SearchPath to struct 1611 o split Buf_Destroy into Buf_Done and Buf_DoneData 1612 o for.c: split For_Eval into separate functions 1613 rename struct For to struct ForLoop 1614 o job.c: do not create empty shell files in jobs mode 1615 rename JobOpenTmpFile to JobWriteShellCommands 1616 reduce unnecessary calls to waitpid 1617 o parse.c: in -dp mode, print stack trace with each diagnostic 1618 16192021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1620 1621 * VERSION (_MAKE_VERSION): 20210123 1622 Merge with NetBSD make, pick up 1623 o rename Dir_Expand to SearchPath_Expand 1624 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1625 o cond.c: fix debug output for comparison operators in conditionals 1626 o dir.c: split Dir_FindFile into separate functions 1627 16282021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1629 1630 * VERSION (_MAKE_VERSION): 20210120 1631 Merge with NetBSD make, pick up 1632 o fix some more lint nits 1633 o refine some unit tests for portability 1634 o cond.c: rework parsing 1635 16362021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1637 1638 * VERSION (_MAKE_VERSION): 20210110 1639 Merge with NetBSD make, pick up 1640 o fix lint warnings 1641 o consistently use boolean expressions in conditions 1642 16432021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1644 1645 * VERSION (_MAKE_VERSION): 20210108 1646 Merge with NetBSD make, pick up 1647 o job.c: back to polling token pipe if we want a token 1648 o main.c: always print 'stopped in' on first call 1649 The execption is if we bail because of an abort token 1650 in which case just exit 6. 1651 16522021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1653 1654 * VERSION (_MAKE_VERSION): 20210101 1655 Merge with NetBSD make, pick up 1656 o Happy New Year! 1657 o rename CmdOpts.lint to strict 1658 o exit 2 on technical errors 1659 o replace pointers in controlling conditions with booleans 1660 o replace global preserveUndefined with VARE_KEEP_UNDEF 1661 o compat.c: re-export variables from the actual make process 1662 if using vfork this is the effect anyway 1663 o cond.c: clean up VarParseResult constants 1664 o for.c: fix undefined behavior in SubstVarLong 1665 make control flow in SubstVarLong of .for loops more obvious 1666 clean up SubstVarShort in .for loops 1667 extract ForSubstBody from ForReadMore 1668 clean up ForReadMore 1669 simplify termination condition for .for loop 1670 add error handling for .for loop items 1671 job.c: re-export variables from the actual make process 1672 parse.c: remove mmap for loading files, only allow files < 1 GiB 1673 fix edge case in := with undefined in variable name 1674 skip variable expansion in ParseDependencyTargetWord 1675 var.c: split ExportVar into separate functions 1676 clean up code in extracted ExportVar functions 1677 remove dead code from ApplyModifiersIndirect 1678 split Var_Subst into easily understandable functions 1679 clean up VarParseResult constants 1680 16812020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1682 1683 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1684 16852020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1686 1687 * VERSION (_MAKE_VERSION): 20201222 1688 Merge with NetBSD make, pick up 1689 o make DEBUG macro return boolean 1690 o parse.c: fix assertion failure for files without trailing newline 1691 o var.c: allow .undef to undefine multiple variables at once 1692 remove excess newline from parse errors 1693 16942020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1695 1696 * VERSION (_MAKE_VERSION): 20201221 1697 Merge with NetBSD make, pick up 1698 o some unit-test updates 1699 17002020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1701 1702 * VERSION (_MAKE_VERSION): 20201220 1703 Merge with NetBSD make, pick up 1704 o more unit tests 1705 o return FStr from Var_Parse and Var_Value 1706 o spell nonexistent consistently 1707 o add str_basename to reduce duplicate code 1708 o compat.c: fix .ERROR_TARGET in compat -k mode 1709 extract InitSignals from Compat_Run 1710 extract UseShell from Compat_RunCommand 1711 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1712 o for.c: rename ForIterate to ForReadMore 1713 o hash.c: clean up hash function for HashTable 1714 o lst.c: rename Vector.priv_cap to cap 1715 o main.c: remove constant parameter from MakeMode 1716 o make.c: use symbolic time for 0 in Make_Recheck 1717 extract MakeChildren from MakeStartJobs 1718 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1719 fix error message for .info/.warning/.error without argument 1720 extract Var_Undef from ParseDirective 1721 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1722 rename mode constants for ParseGetLine to be more expressive 1723 reduce debugging details in Parse_SetInput 1724 fix line numbers in .for loops 1725 split ParseGetLine into separate functions 1726 fix garbled output for failed shell command 1727 var.c: remove redundant assignment in ApplyModifier_SysV 1728 error out on unknown variable modifiers at parse time 1729 remove wrong error message for indirect modifier in lint mode 1730 extract ApplySingleModifier from ApplyModifiers 1731 use FStr for memory management in Var_SetWithFlags 1732 extract SetVar from Var_SetWithFlags 1733 use FStr in VarNew 1734 extract string functions from ApplyModifier_To 1735 error out if .undef has not exactly 1 argument 1736 extract Var_DeleteVar from Var_Delete 1737 extract Var_Undef from ParseDirective 1738 clean up memory management for expanding variable expressions 1739 17402020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1741 1742 * avoid %zu 1743 1744 * lst.c: avoid anonymous union 1745 1746 * VERSION (_MAKE_VERSION): 20201212 1747 Merge with NetBSD make, pick up 1748 o more unit tests 1749 o inline Targ_Ignore and Targ_Silent 1750 o split JobFlags into separate fields 1751 o remove const from function parameters (left overs from refactoring) 1752 o eliminate boolean argument of Var_Export 1753 o make API of Buf_Init simpler 1754 o rename ParseRunOptions to ParseCommandFlags 1755 o replace *line with line[0] 1756 o compat.c: fix wrong exit status for multiple failed main targets 1757 refactor Compat_Run to show the error condition more clearly 1758 don't make .END if the main targets already failed (-k mode) 1759 fix exit status in -k mode if a dependency fails 1760 o for.c: clean up Buf_AddEscaped in .for loops 1761 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1762 make Job_Touch simpler 1763 refactor JobFinish 1764 rename Shell.exitFlag to errFlag 1765 move Job.xtraced to ShellWriter 1766 make printing of shell commands independent from the job 1767 rename shell flags in struct Shell 1768 extract JobOpenTmpFile from JobStart 1769 rename RunFlags to CommandFlags 1770 split various Job.* into separate fields 1771 rename commandShell to shell 1772 extract InitShellNameAndPath from Shell_Init 1773 replace signal handling macros with local functions 1774 replace macro MESSAGE with local function 1775 parse.c: error out on null bytes in makefiles 1776 error out on misspelled directives 1777 rename IFile.nextbuf to readMore 1778 fix undefined behavior in ParseEOF 1779 str.c: remove redundant call to strlen in Str_Words 1780 var.c: error out on misspelled .unexport-env 1781 error out on misspelled .export directives 1782 extract ExportVars from Var_Export 1783 extract ExportVarsExpand from Var_Export 1784 eliminate boolean argument of Var_Export 1785 fix undefined behavior when exporting ${:U } 1786 rename Var_ExportVars to Var_ReexportVars 1787 rename Var_Export1 to ExportVar 1788 17892020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1790 1791 * VERSION (_MAKE_VERSION): 20201206 1792 Merge with NetBSD make, pick up 1793 o more unit tests 1794 o inline macros for debug logging 1795 o use consistent variable names for list nodes 1796 o define constants for enum zero-values 1797 o dir.c: use fixed format for debug output of the directory cache 1798 remove Dir_InitDir 1799 o lst.c: inline Lst_Enqueue, Vector_Done 1800 o meta.c: remove unused parameter from meta_needed 1801 o parse.c: rename parse functions 1802 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1803 o targ.c: don't concatenate identifiers in Targ_PrintType 1804 o var.c: remove comment decoration 1805 extract UnexportVars from Var_UnExport 1806 extract GetVarnamesToUnexport from Var_UnExport 1807 extract UnexportEnv from Var_UnExport 1808 extract UnexportVar from Var_UnExport 1809 move CleanEnv to UnexportVars 1810 replace pointer comparisons with enum 1811 add FStr to var.c to make memory handling simpler 1812 use FStr in Var_UnExport 1813 move type definitions in var.c to the top 1814 extract FreeEnvVar from Var_Parse 1815 extract ShuffleStrings from ApplyModifier_Order 1816 18172020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1818 1819 * VERSION (_MAKE_VERSION): 20201130 1820 Merge with NetBSD make, pick up 1821 o add unit tests for META MODE 1822 o reduce memory allocation for dirSearchPath, GNode.parents, 1823 GNode.children, OpenDirs 1824 o reduce pointer indirection for GNode.cohorts and 1825 GNode.implicitParents 1826 o remove pointer indirection from GNode.commands 1827 o inline Lst_ForEachUntil in meta mode 1828 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1829 clean up memory management for CachedDirs 1830 fix the reference count of dotLast going negative 1831 add debug logging for OpenDirs_Done 1832 extract CacheNewDir from Dir_AddDir 1833 add debug logging for reference counting of CachedDir 1834 rename some Dir functions to SearchPath 1835 o job.c: rename some global variables 1836 o main.c: reduce memory allocation in ReadBuiltinRules 1837 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1838 CmdOpts.makefiles 1839 Add .MAKE.UID and .MAKE.GID 1840 o make.c: reduce memory allocation for/in toBeMade, 1841 Make_ProcessWait, Make_ExpandUse 1842 o meta.c: reduce memory allocation in meta_oodate 1843 o parse.c: reduce memory allocations for parsing dependencies and 1844 targets 1845 o suff.c: reduce memory allocation in suffix handling 1846 18472020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1848 1849 * VERSION (_MAKE_VERSION): 20201124 1850 Merge with NetBSD make, pick up 1851 o .MAKE.{UID,GID} represent uid and gid running make. 1852 o fix error handling for .BEGIN and .END dependency in -k mode 1853 o fix missing "Stop." after failed .END node in -k mode 1854 o use properly typed comparisons in boolean contexts 1855 o replace a few HashTable_CreateEntry with HashTable_Set 1856 o add HashSet type 1857 o compat.c: split Compat_Make into smaller functions 1858 extract DebugFailedTarget from Compat_RunCommand 1859 o dir.c: refactor Dir_UpdateMTime 1860 migrate CachedDir.files from HashTable to HashSet 1861 o make.c: add high-level API for GNode.made 1862 18632020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1864 1865 * VERSION (_MAKE_VERSION): 20201122 1866 Merge with NetBSD make, pick up 1867 o rename GNode.context to vars 1868 o suff.c: cleanup and refactor 1869 rename some functions and vars to better reflect usage 1870 add high-level API for CandidateSearcher 1871 o targ.c: add more debug logging for suffix handling 1872 o more unit tests 1873 o add debug logging for setting and resetting the main target 1874 18752020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1876 1877 * VERSION (_MAKE_VERSION): 20201117 1878 Merge with NetBSD make, pick up 1879 o fix some unit-tests when .SHELL is dash 1880 o rename Targ_NewGN to GNode_New 1881 o make some GNode functions const 1882 o main.c: call Targ_Init before Var_Init 1883 cleanup PrintOnError, getTmpdir and ParseBoolean 1884 o var.c: fix error message of failed :!cmd! modifier 1885 18862020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1887 1888 * VERSION (_MAKE_VERSION): 20201114 1889 Merge with NetBSD make, pick up 1890 o replace a few HashTable_CreateEntry with HashTable_Set 1891 o clean up cached_stats 1892 o rename DEFAULT to defaultNode 1893 o remove redundant struct make_stat 1894 o cond.c: in lint mode, check for ".else <cond>" 1895 use bitset for IfState 1896 replace large switch with if-else in Cond_EvalLine 1897 o job.c: clean up JobExec, JobStart, JobDoOutput 1898 use stderr for error message about failed touch 1899 clean up Job_Touch 1900 replace macro DBPRINTF with JobPrintln 1901 rename JobState to JobStatus 1902 main.c: switch cache for realpath from GNode to HashTable 1903 clean up Fatal 1904 clean up InitDefSysIncPath 1905 use progname instead of hard-coded 'make' in warning 1906 rename Main_SetVarObjdir to SetVarObjdir 1907 make.1: document the -S option 1908 make.c: fix debug output for GNode details 1909 use symbolic names in debug output of GNodes 1910 19112020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1912 1913 * configure.in: fix --with-force-machine-arch 1914 1915 * VERSION (_MAKE_VERSION): 20201112 1916 Merge with NetBSD make, pick up 1917 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1918 checks in InitObjdir. Explicit .OBJDIR target always allows 1919 read-only directory. 1920 o cond.c: clean up Cond_EvalLine 1921 19222020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1923 1924 * VERSION (_MAKE_VERSION): 20201111 1925 Merge with NetBSD make, pick up 1926 o more unit-tests 1927 o style cleanup 1928 remove redundant parentheses from sizeof operator 1929 replace character literal 0 with '\0'. 1930 replace pointer literal 0 with NULL. 1931 remove redundant parentheses. 1932 replace (expr & mask) == 0 with !(expr & mask). 1933 use strict typing in conditions of the form !var 1934 o rename Make_OODate to GNode_IsOODate 1935 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1936 o rename Var_Set_with_flags to Var_SetWithFlags 1937 o rename dieQuietly to shouldDieQuietly 1938 o buf.c: make API of Buf_Init simpler 1939 o compat.c: clean up Compat_Make, Compat_RunCommand, 1940 CompatDeleteTarget and CompatInterrupt 1941 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1942 clean up CondParser_Comparison 1943 o main.c: rename getBoolean and s2Boolean 1944 rename MAKEFILE_PREFERENCE for consistency 1945 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1946 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1947 replace emptyString with allocated empty string 1948 error out on unclosed expressions after the colon 1949 19502020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1951 1952 * VERSION (_MAKE_VERSION): 20201101 1953 Merge with NetBSD make, pick up 1954 o negate NoExecute to GNode_ShouldExecute 1955 o job.c: rename JobMatchShell to FindShellByName 1956 extract EscapeShellDblQuot from JobPrintCommand 1957 extract ParseRunOptions from JobPrintCommand 1958 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1959 treat malformed :range, :ts and :[...] as errors 1960 add tests for the variable modifiers :[words] and :range 1961 19622020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1963 1964 * VERSION (_MAKE_VERSION): 20201031 1965 Merge with NetBSD make, pick up 1966 o format #include directives consistently 1967 o do not look up local variables like .TARGET anywhere else 1968 o main.c: Main_SetObjdir is first called for curdir which may be 1969 readonly 1970 reduce the scope where recursive expressions are detected 1971 remove redundant :tl from getBoolean 1972 clean up mkTempFile 1973 o meta.c: simplify memory allocation in meta_create and meta_oodate 1974 o parse.c: extract loadedfile_mmap from loadfile 1975 o trace.c: document possible undefined behavior with .CURDIR 1976 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1977 rename ismeta to is_shell_metachar 1978 remove debug logging for the :Q variable modifier 1979 rename VarIsDynamic to VarnameIsDynamic 1980 use consistent parameter order in varname parsing functions 1981 extract ParseVarnameLong from Var_Parse 1982 extract ParseVarnameShort from Var_Parse 1983 fix type of ParseModifierPart parameter delim 1984 extract IsEscapedModifierPart from ParseModifierPart 1985 clean up ModifyWords 1986 add test for combining the :@ and :? variable modifiers 1987 19882020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1989 1990 * VERSION (_MAKE_VERSION): 20201030 1991 Merge with NetBSD make, pick up 1992 o change char * to void * in Var_Value 1993 o make iterating over HashTable simpler 1994 o rename VAR_CMD to VAR_CMDLINE 1995 o cond.c: clean up is_separator 1996 fix parse error in string literal in conditional 1997 o main.c: do not use objdir that is not writable 1998 in lint mode, exit with error status on errors 1999 o parse.c: clean up StrContainsWord 2000 fix out-of-bounds pointer in ParseTrackInput 2001 o var.c: rename Str_SYSVMatch and its parameters 2002 remove unsatisfiable conditions in Var_Set_with_flags 2003 document where the variable name is expanded 2004 fix documentation for VARP_SUB_ONE 2005 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 2006 document VAR_READONLY 2007 prevent appending to read-only variables 2008 extract MayExport from Var_Export1 2009 remove redundant evaluations in VarFind 2010 replace VarFindFlags with a simple Boolean 2011 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 2012 20132020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 2014 2015 * VERSION (_MAKE_VERSION): 20201028 2016 Merge with NetBSD make, pick up 2017 o rename defIncPath to defSysIncPath 2018 o initialize all CmdOpts fields 2019 o lst.c: inline Vector_Get 2020 o main.c: refactor main extract 2021 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 2022 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 2023 InitDefIncPath,CmdOpts_Init,UnlimitFiles 2024 o parse.c: merge curFile into includes 2025 rename predecessor to order_pred 2026 sort ParseSpecial alphabetically 2027 remove unused, undocumented .NOEXPORT 2028 rename ParseSpecial enum values consistently 2029 rename some fields of struct IFile 2030 20312020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 2032 2033 * VERSION (_MAKE_VERSION): 20201026 2034 Merge with NetBSD make, pick up 2035 o group the command line options and arguments into a struct 2036 o rename GNode.cmgn to youngestChild 2037 o rename hash functions to identify the type name 2038 o negate OP_NOP and rename it to GNode_IsTarget 2039 o add GNode_Path to access the path of a GNode 2040 o remove macros MIN and MAX 2041 o remove unused Lst_Find and Lst_FindFrom 2042 o arch.c: and make Arch_FindLib simpler 2043 clean up code layout 2044 make Arch_ParseArchive simpler 2045 o cond.c: inline CondFindStrMatch into FuncMake 2046 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 2047 omit trailing space in debug output for expanding file patterns 2048 refactor DirMatchFiles 2049 document that the SearchPath of Dir_FindFile may be NULL 2050 remove UNCONST from Dir_Expand 2051 inline DirFindName 2052 o for.c: clean up code for handling .for loops 2053 o hash.c: print hash in debug log with fixed width 2054 clean up hash table functions 2055 reduce amount of string hashing 2056 o job.c: refactor JobDeleteTarget 2057 use proper enum constants for aborting 2058 convert result of JobStart from macros to enum 2059 convert abort reason macros to enum 2060 rework Job_CheckCommands to reduce indentation 2061 rename Shell fields 2062 add field names in declaration of DEFSHELL_CUSTOM 2063 convert JobState and JobFlags to enum types 2064 move handling of the "..." command to JobPrintCommands 2065 o lst.c: clean up 2066 refactor LstNodeNew 2067 remove Lst_Open, Lst_Next, Lst_Close 2068 remove code for circular lists from Lst_Next 2069 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 2070 /dev/null or anything starting with "no" 2071 convert macros for debug flags into enum 2072 o make.c: inline Lst_Copy in Make_ExpandUse 2073 o meta.c: inline Lst_Find in meta_oodate 2074 make Lst_RemoveIf simpler in meta_oodate 2075 o parse.c: convert error level for Parse_Error to an enum 2076 o suff.c: properly terminate debug output with newline 2077 add more details to DEBUG_SRC log 2078 replace Dir_CopyDir with Dir_CopyDirSearchPath 2079 don't modify GNode name while rebuilding the suffix graph 2080 o var.c: reduce duplicate code in VarFind 2081 20822020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 2083 2084 * VERSION (_MAKE_VERSION): 20201022 2085 Merge with NetBSD make, pick up 2086 o more refactoring and simplification to reduce code size 2087 o var.c: extract CanonicalVarname from VarFind 2088 o make.c: extract UpdateImplicitParentsVars from Make_Update 2089 o main.c: extract PrintVar from doPrintVars 2090 extract HandlePWD from main 2091 o lst.c: inline simple Lst getters 2092 remove unused Lst_ForEach 2093 o job.c: move struct Shell from job.h to job.c 2094 o more unit tests 2095 20962020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 2097 2098 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 2099 21002020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 2101 2102 * VERSION (_MAKE_VERSION): 20201018 2103 Merge with NetBSD make, pick up 2104 o remove USE_IOVEC 2105 o rename some Hash_* apis to Hash* 2106 o replace execError with execDie 2107 o rename Lst_Init to Lst_New 2108 o add tags to enum types 2109 o rename Stack to Vector 2110 o parse.c: more refactoring 2111 o unit-tests: make some tests use line buffered stdout 2112 o unit-tests/Makefile: in meta mode do not make all tests depend on 2113 Makefile, it isn't necessary. 2114 21152020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 2116 2117 * main.c: check for CTL_HW being defined. 2118 * unit-tests/Makefile: ensure export tests output are POSIX compliant 2119 disable opt-debug-jobs test until it works on ubuntu 2120 2121 * VERSION (_MAKE_VERSION): 20201010 2122 Merge with NetBSD make, pick up 2123 o dir.c: remove pathname limit for Dir_FindHereOrAbove 2124 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 2125 o main.c: extract init_machine and init_machine_arch from main 2126 allow to disable debug logging options 2127 o parse.c: enable format string truncation warnings 2128 extract parsing of sources from ParseDoDependency 2129 split ParseDoSrc into smaller functions 2130 hide implementation details from Parse_DoVar 2131 clean up parsing of variable assignments 2132 split Parse_DoVar into manageable pieces 2133 don't modify the given line during Parse_DoVar 2134 fix out-of-bounds memory access in Parse_DoVar 2135 fix parsing of the :sh assignment modifier 2136 o var.c: rework memory allocation for the name of variables 2137 extract ApplyModifier_Literal into separate function 2138 in lint mode, reject modifiers without delimiter 2139 do not export variable names starting with '-' 2140 o fix double-free bug in -DCLEANUP mode 2141 o more cleanup to enable higher warnings level 2142 o more unit tests 2143 21442020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 2145 2146 * VERSION (_MAKE_VERSION): 20201002 2147 Merge with NetBSD make, pick up 2148 o dir.c: use hash table for looking up open directories by name 2149 o main.c: clean up option handling 2150 o parse.c: add missing const for Parse_AddIncludeDir 2151 o var.c: ApplyModifier_To, update pp in each branch 2152 o remove redundant function prototypes 2153 o more unit tests 2154 21552020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 2156 2157 * VERSION (_MAKE_VERSION): 20201001 2158 Merge with NetBSD make, pick up 2159 o compat.c: comment about "..." 2160 21612020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 2162 2163 * VERSION (_MAKE_VERSION): 20200930 2164 Merge with NetBSD make, pick up 2165 o job.c: split Job.jobPipe into 2 separate fields 2166 replace Lst_Open with direct iteration 2167 o lst.c: remove redundant assertions 2168 o targ.c: replace Lst_Open with direct iteration 2169 o var.c: fix bug in evaluation of indirect variable modifiers 2170 extract ApplyModifier_Quote into separate function 2171 o make debug logging simpler 2172 21732020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 2174 2175 * VERSION (_MAKE_VERSION): 20200927 2176 Merge with NetBSD make, pick up 2177 o parse.c: ensure parse errors result in 'stopped in' message. 2178 o compat.c: make parameter of Compat_RunCommand const 2179 o main.c: extract InitVarTarget from main 2180 o parse.c: rename ParseFinishLine to FinishDependencyGroup 2181 refactor ParseDoDependency 2182 o var.c: Var_Subst no longer returns string result 2183 rename Var_ParsePP back to Var_Parse 2184 in lint mode, improve error handling for undefined variables 2185 extract ParseVarname from Var_Parse 2186 o rename Lst_ForEach to Lst_ForEachUntil 2187 o inline Lst_ForEachUntil in several cases 2188 o clean up API for finding and creating GNodes 2189 o fix assertion failure in -j mode with .END node 2190 o inline and remove LstNode_Prev and LstNode_Next 2191 o use fine-grained type names for lists and their nodes 2192 o more unit tests 2193 21942020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 2195 2196 * VERSION (_MAKE_VERSION): 20200911 2197 Merge with NetBSD make, pick up 2198 o cond.c: split EvalComparison into smaller functions 2199 reorder parameters of condition parsing functions 2200 reduce code size in CondParser_Eval 2201 rename CondGetString to CondParser_String 2202 add CondLexer_SkipWhitespace 2203 group the condition parsing state into a struct 2204 in CondGetString, replace repeated Buf_Add with Buf_AddStr 2205 o migrate Var_Parse to Var_ParsePP 2206 o add wrappers around ctype.h functions 2207 o lst.c: use a stack instead of a list for the nested include path 2208 o more unit tests 2209 22102020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 2211 2212 * make-bootstrap.sh.in: adjust object list 2213 22142020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 2215 2216 * VERSION (_MAKE_VERSION): 20200902 2217 Merge with NetBSD make, pick up 2218 o use make_stat to ensure no confusion over valid fields 2219 returned by cached_stat 2220 o var.c: make VarQuote const-correct 2221 o add unit tests for .for 2222 22232020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 2224 2225 * VERSION (_MAKE_VERSION): 20200901 2226 Merge with NetBSD make, pick up 2227 o rename Hash_Table fields 2228 o make data types in Dir_HasWildcards more precise 2229 22302020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 2231 2232 * VERSION (_MAKE_VERSION): 20200831 2233 Merge with NetBSD make, pick up 2234 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 2235 o lst.c: Lst_Open renable assert that list isn't open 2236 o unit test for .TARGET dependent flags 2237 o var.c: fix aliasing bug in VarUniq 2238 o more unit tests for :u 2239 22402020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 2241 2242 * VERSION (_MAKE_VERSION): 20200830 2243 Merge with NetBSD make, pick up 2244 o allow for strict type checking for Boolean 2245 o Var_Parse never returns NULL 2246 o Var_Subst never returns NULL 2247 o Lst_Find now takes boolean match function 2248 o rename Lst_Memeber to Lst_FindDatum 2249 o rename LstNode functions to match their type 2250 o rename GNode.iParents to implicitParents 2251 o fix assertion failure for .SUFFIXES in archives 2252 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 2253 remove unreachable code from CompatRunCommand 2254 o main.c: simplify getBoolean 2255 o stc.c: replace brk_string with simpler Str_Words 2256 o suff.c: add debug macros 2257 22582020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 2259 2260 * VERSION (_MAKE_VERSION): 20200828 2261 Merge with NetBSD make, pick up 2262 o lst.c: inline LstIsValid and LstNodeIsValid 2263 o remove trailing S from Lst function names after migration complete 2264 o more comment cleanup/clarification 2265 o suff.c: clean up suffix handling 2266 o more unit tests 2267 22682020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 2269 2270 * VERSION (_MAKE_VERSION): 20200826 2271 Merge with NetBSD make, pick up 2272 o enum.c: distinguish between bitsets containing flags and 2273 ordinary enums 2274 o var.c: fix error message for ::!= modifier with shell error 2275 o fix bugs in -DCLEANUP mode 2276 22772020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 2278 2279 * VERSION (_MAKE_VERSION): 20200824 2280 Merge with NetBSD make, pick up 2281 o in debug mode, print GNode details in symbols 2282 22832020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 2284 2285 * VERSION (_MAKE_VERSION): 20200823 2286 Merge with NetBSD make, pick up 2287 o lst.c: more asserts, 2288 make args to Lst_Find match others. 2289 o var.c: pass flags to VarAdd 2290 o arch.c: use Buffer 2291 o str.c: brk_string return size_t for nwords 2292 o more unit tests 2293 22942020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 2295 2296 * VERSION (_MAKE_VERSION): 2297 Merge with NetBSD make, pick up 2298 o var.c: support for read-only variables eg .SHELL 2299 being the shell used to run scripts. 2300 o lst.c: more simplification 2301 o more documentation and style cleanup 2302 o more unit tests 2303 o ensure unit-test/Makefile is run by TEST_MAKE 2304 o reduce duplication of header inclusion 2305 23062020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 2307 2308 * VERSION (_MAKE_VERSION): 20200821 2309 Merge with NetBSD make, pick up 2310 o lst.c: revert invalid assertion - but document it 2311 o dir.c: split Dir_Init into two functions 2312 23132020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 2314 2315 * lst.c: needs inttypes.h on Linux 2316 2317 * VERSION (_MAKE_VERSION): 20200820 2318 Merge with NetBSD make, pick up 2319 o make.1: clarify some passages 2320 o var.c: more cleanup, clarify comments 2321 o make_malloc.c: remove unreachable code 2322 o cond.c: make CondGetString easier to debug 2323 o simplify list usage 2324 o unit-tests: more 2325 23262020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 2327 2328 * VERSION (_MAKE_VERSION): 20200816 2329 Merge with NetBSD make, pick up 2330 o refactor unit-tests to be more fine grained 2331 not all tests moved yet 2332 23332020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 2334 2335 * VERSION (_MAKE_VERSION): 20200814 2336 Merge with NetBSD make, pick up 2337 o more str_concat variants 2338 o more enums for flags 2339 o var.c: cleanup for higher warnings level 2340 23412020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 2342 2343 * VERSION (_MAKE_VERSION): 20200810 2344 Merge with NetBSD make, pick up 2345 o more unit tests 2346 o general comment and style cleanup 2347 23482020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 2349 2350 * VERSION (_MAKE_VERSION): 20200808 2351 Merge with NetBSD make, pick up 2352 o enum.[ch]: streamline, enums for use in flags and debug output 2353 o cond.c: cleanup 2354 o var.c: reduce duplicate code for modifiers 2355 debug logging for Var_Parse 2356 more detailed debug output 2357 o more unit tests 2358 23592020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 2360 2361 * unit-tests/Makefile: -r for recursive and include Makefile.inc 2362 so I can run tests in meta mode 2363 supress extra noise if in meta mode 2364 2365 * VERSION (_MAKE_VERSION): 20200806 2366 Merge with NetBSD make, pick up 2367 o parse.c: remove VARE_WANTRES for LINT 2368 we just want to check parsing (for now). 2369 23702020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 2371 2372 * VERSION (_MAKE_VERSION): 20200805 2373 Merge with NetBSD make, pick up 2374 o make.1: Rework the description of dependence operators 2375 23762020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 2377 2378 * VERSION (_MAKE_VERSION): 20200803 2379 Merge with NetBSD make, pick up 2380 o revert some C99 usage, for max portability 2381 o unit-tests/lint 2382 23832020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 2384 2385 * VERSION (_MAKE_VERSION): 20200802 2386 Merge with NetBSD make, pick up 2387 o more unit tests 2388 23892020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 2390 2391 * Remove NetBSD specific plumbing from unit-tests/Makefile 2392 2393 * VERSION (_MAKE_VERSION): 20200801 2394 Merge with NetBSD make, pick up 2395 o make Var_Value return const 2396 o size_t for buf sizes 2397 o optimize some buffer operations - avoid strlen 2398 23992020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 2400 2401 * VERSION (_MAKE_VERSION): 20200731 2402 Merge with NetBSD make, pick up 2403 o var.c: fix undefinded behavior for incomplete :t modifier 2404 fixes unit-test/moderrs on Ubuntu 2405 o parse.c: When parsing variable assignments other than := 2406 if DEBUG(LINT) test substition of value, so we get a file and 2407 line number in the resulting error. 2408 o dir.c: fix parsing of nested braces in dependency lines 2409 add unit-tests 2410 24112020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 2412 2413 * VERSION (_MAKE_VERSION): 20200730 2414 Merge with NetBSD make, pick up 2415 o var.c: minor cleanup 2416 o unit-tests: more tests to improve code coverage 2417 24182020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 2419 2420 * VERSION (_MAKE_VERSION): 20200728 2421 Merge with NetBSD make, pick up 2422 o var.c: more optimizations 2423 24242020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 2425 2426 * VERSION (_MAKE_VERSION): 20200726 2427 Merge with NetBSD make, pick up 2428 o collapse lsd.lib into lst.c - reduce code size and allow inlining 2429 o lots of function comment updates 2430 o var.c: more optimizations 2431 o make return of Var_Parse const 2432 24332020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2434 2435 * VERSION (_MAKE_VERSION): 20200720 2436 Merge with NetBSD make, pick up 2437 o DEBUG_HASH report stats at end and tone down the noise 2438 o var.c: each flag type gets its own prefix. 2439 move SysV string matching to var.c 2440 make ampersand in ${VAR:from=to&} an ordinary character 2441 cleanup and simplify implementation of modifiers 2442 o make.1: move documentation for assignment modifiers 2443 24442020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2445 2446 * VERSION (_MAKE_VERSION): 20200718 2447 Merge with NetBSD make, pick up 2448 o DEBUG_HASH to see how well the hash tables are working 2449 24502020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2451 2452 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2453 24542020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2455 2456 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2457 2458 * VERSION (_MAKE_VERSION): 20200710 2459 Merge with NetBSD make, pick up 2460 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2461 o meta.c: target flagged .META is out-of-date if meta file missing 2462 24632020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2464 2465 * VERSION (_MAKE_VERSION): 20200709 2466 Merge with NetBSD make, pick up 2467 o cond.c: fix for compare_expression when doEval=0 2468 o unit-tests/Makefile: rework 2469 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2470 24712020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2472 2473 * VERSION (_MAKE_VERSION): 20200704 2474 Merge with NetBSD make, pick up 2475 (most of this by rillig@) 2476 o lots of style and white-space cleanup 2477 o lots more unit tests for variable modifiers 2478 o simplified description of some functions 2479 o str.c: refactor Str_Match 2480 o var.c: debugging output for :@ 2481 constify VarModify parameter 2482 fix :hash modifier on 16-bit platforms 2483 remove unnecessary forward declarations 2484 refactor ApplyModifier_SysV to have less indentation 2485 simplify code for :E and :R 2486 clean up code for :H and :T 2487 refactor ApplyModifiers 2488 2489 * var.c: we need stdint.h on some platforms to get uint32_t 2490 * unit-test/Makefile: we need to supress the specific error 2491 for RE substitution error in modmisc, since it varies accross 2492 different OS. 2493 24942020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2495 2496 * VERSION (_MAKE_VERSION): 20200702 2497 Merge with NetBSD make, pick up 2498 o var.c: more improvements to avoiding unnecessary evaluation 2499 use enums for flags 2500 o remove flags arg to Var_Set which outside of var.c is always 0 2501 25022020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2503 2504 * VERSION (_MAKE_VERSION): 20200701 2505 Merge with NetBSD make, pick up 2506 o var.c: with change to cond.c; ensure that nested variables 2507 within a variable name are expanded. 2508 o unit-tests/varmisc.mk: test for nested varname 2509 25102020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2511 2512 * VERSION (_MAKE_VERSION): 20200629 2513 Merge with NetBSD make, pick up 2514 o cond.c: do not eval unnecessary terms of conditionals. 2515 25162020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2517 2518 * VERSION (_MAKE_VERSION): 20200625 2519 Merge with NetBSD make, pick up 2520 o meta.c: report error if lseek in filemon_read fails 2521 25222020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2523 2524 * VERSION (_MAKE_VERSION): 20200622 2525 Merge with NetBSD make, pick up 2526 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2527 25282020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2529 2530 * VERSION (_MAKE_VERSION): 20200619 2531 Merge with NetBSD make, pick up 2532 o str.c: performance improvement for Str_Match for multiple '*' 2533 o dieQuietly: supress the failure output from make 2534 when failing node is a sub-make or a sibling failed. 2535 This cuts down greatly on unhelpful noise at the end of 2536 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2537 25382020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2539 2540 * FILES: add LICENSE to appease some packagers. 2541 This is an attempt to fairly represent the license on almost 2542 200 files, which are almost all BSD-3-Clause 2543 The few exceptions being more liberal. 2544 2545 * VERSION (_MAKE_VERSION): 20200610 2546 Merge with NetBSD make, pick up 2547 o unit test for :Or 2548 25492020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2550 2551 * VERSION (_MAKE_VERSION): 20200606 2552 Merge with NetBSD make, pick up 2553 o make.1: cleanup 2554 2555 * Makefile: fix depends for main.o which broke MAKE_VERSION 2556 25572020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2558 2559 * VERSION (_MAKE_VERSION): 20200605 2560 Merge with NetBSD make, pick up 2561 o dir.c: cached_stats - don't confuse stat and lstat results. 2562 o var.c: add :Or for reverse sort. 2563 25642020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2565 2566 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2567 also if --with-filemon= specifies path to filemon.h 2568 set use_filemon=dev 2569 * dirname.c: remove include of namespace.h 2570 25712020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2572 2573 * VERSION (_MAKE_VERSION): 20200517 2574 Merge with NetBSD make, pick up 2575 o modified dollar tests to avoid shell dependencies 2576 o new tests for .INCLUDEFROM 2577 25782020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2579 2580 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2581 to not depend so much on shell behavior 2582 25832020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2584 2585 * VERSION (_MAKE_VERSION): 20200510 2586 Merge with NetBSD make, pick up 2587 o unit test for dollar handling 2588 25892020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2590 2591 * VERSION (_MAKE_VERSION): 20200506 2592 Merge with NetBSD make, pick up 2593 o str.c: empty string does not match % pattern 2594 plus unit-test changes 2595 25962020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2597 2598 * VERSION (_MAKE_VERSION): 20200504 2599 May the 4th be with you 2600 Merge with NetBSD make, pick up 2601 o var.c: import handling of old sysV style modifier using '%' 2602 o str.c: refactor brk_string 2603 o unit-tests: add test case for lazy conditions 2604 26052020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2606 2607 * VERSION (_MAKE_VERSION): 20200418 2608 2609 * configure.in: use_makefile=no for Cygwin et al. 2610 case insensitive filesystems just don't work if both 2611 makefile and Makefile exist. 2612 NOTE: bmake does not support Cygwin and likely never will, 2613 but if brave souls want to try it - help them out. 2614 26152020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2616 2617 * VERSION (_MAKE_VERSION): 20200402 2618 Merge with NetBSD make, pick up 2619 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2620 a blank command is perfectly valid. 2621 26222020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2623 2624 * VERSION (_MAKE_VERSION): 20200330 2625 Merge with NetBSD make, pick up 2626 o make.h: extern debug_file 2627 26282020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2629 2630 * VERSION (_MAKE_VERSION): 20200318 2631 Merge with NetBSD make, pick up 2632 o meta.c: meta_oodate, check for corrupted meta file 2633 earlier and more often. 2634 26352020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2636 2637 * VERSION (_MAKE_VERSION): 20200220 2638 26392020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2640 2641 * boot-strap: unset MAKEFLAGS 2642 26432020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2644 2645 * VERSION (_MAKE_VERSION): 20200212 2646 * meta.c: meta_compat_parent check for USE_FILEMON 2647 patch from Soeren Tempel 2648 26492020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2650 2651 * VERSION: 20200205 2652 Merge with NetBSD make, pick up 2653 o meta.c: fix compat mode, need to call meta_job_output() 2654 o job.c: extra fds for meta mode not needed if using filemon_dev 2655 26562020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2657 2658 * VERSION: 20200122 2659 Merge with NetBSD make, pick up 2660 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2661 returns FALSE. 2662 26632020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2664 2665 * VERSION: 20200121 2666 Merge with NetBSD make, pick up 2667 o filemon/filemon_{dev,ktrace}.c: allow selection of 2668 filemon implementation. filemon_dev.c uses the kernel module 2669 while filemon_ktrace.c leverages the fktrace api available in 2670 NetBSD. filemon_ktrace.c can hopefully form the basis for 2671 adding support for other tracing mechanisms such as strace on 2672 Linux. 2673 o meta.c: when target is out-of-date per normal make rules 2674 record value of .OODATE in meta file. 2675 26762019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2677 2678 * VERSION: 20190926 2679 Merge with NetBSD make, pick up 2680 o parse.c: don't pass NULL to realpath(3) 2681 some versions cannot handle it. 2682 26832019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2684 2685 * VERSION: 20190409 2686 Merge with NetBSD make, pick up 2687 o parse.c: ParseDoDependency: free paths rather than assert 2688 26892018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2690 2691 * VERSION: 20181222 2692 2693 * configure.in: add --without-makefile to avoid generating 2694 makefile and make-bootstrap.sh 2695 2696 * include Makefile.inc if it exists 2697 2698 * Use Makefile and Makefile.config.in in unit-tests 2699 so we can use just: make obj && make && make test 2700 when bmake is already available. 2701 We add --without-makefile to CONFIGURE_ARGS in this case. 2702 2703 * tweak bsd.after-import.mk (captures Makefile.config etc 2704 after import to FreeBSD for example) to cope with all the above. 2705 27062018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2707 2708 * VERSION: 20181221 2709 Merge with NetBSD make, pick up 2710 o parse.c: ParseVErrorInternal use .PARSEDIR 2711 and apply if relative, and then use .PARSEFILE 2712 for consistent result. 2713 27142018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2715 2716 * VERSION: 20181220 2717 Merge with NetBSD make, pick up 2718 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2719 is relative 2720 o var.c: avoid SEGFAULT in .unexport-env 2721 when MAKELEVEL is not set 2722 27232018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2724 2725 * VERSION: 20181216 2726 Merge with NetBSD make, pick up 2727 o fix for unit-tests/varquote.mk on Debian 2728 27292018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2730 2731 * VERSION: 20180919 2732 Merge with NetBSD make, pick up 2733 o var.c: add :q 2734 o dir.c: cleanup caching of stats 2735 27362018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2737 2738 * Makefile.config.in: use += where it makes sense. 2739 27402018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2741 2742 * VERSION: 20180512 2743 Merge with NetBSD make, pick up 2744 o job.c: skip polling job token pipe 2745 27462018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2747 2748 * VERSION: 20180405 2749 Merge with NetBSD make, pick up 2750 o parse.c: be more cautious about detecting depenency line 2751 rather than sysV style include. 2752 27532018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2754 2755 * VERSION: 20180222 2756 Merge with NetBSD make, pick up 2757 o parse.c: avoid calling sysconf for every call to loadfile 2758 27592018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2760 2761 * VERSION: 20180218 2762 Merge with NetBSD make, pick up 2763 o var.c: Var_Set handle NULL value anytime. 2764 27652018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2766 2767 * VERSION: 20180212 2768 Merge with NetBSD make, pick up 2769 o parse.c: do not treat .info as warning with -W 2770 27712017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2772 2773 * VERSION: 20171207 2774 Merge with NetBSD make, pick up 2775 o var.c: Var_Append use Var_Set if var not previously set 2776 so that VAR_CMD is handled correctly. 2777 Add a suitable unit-test. 2778 27792017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2780 2781 * VERSION (_MAKE_VERSION): 20171126 2782 2783 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2784 since AC_TRY_COMPILE puts input inside main() 2785 which upsets modern compilers. 2786 27872017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2788 2789 * VERSION: 20171118 2790 Merge with NetBSD make, pick up 2791 o var.c: do not append to variable set on command line 2792 add unit-test to catch this. 2793 27942017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2795 2796 * VERSION: 20171028 2797 Merge with NetBSD make, pick up 2798 o main.c: ignore empty MAKEOBJDIR 2799 2800 * Makefile.config.in: 2801 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2802 28032017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2804 2805 * VERSION: 20171005 2806 2807 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2808 consistent result on some platforms. 2809 28102017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2811 2812 * machine.sh: entry for AIX 2813 28142017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2815 2816 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2817 to a file that can be included by configure as well as make. 2818 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2819 28202017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2821 2822 * Makefile (_MAKE_VERSION): 20170810 2823 Merge with NetBSD make, pick up 2824 o meta.c: if target is in subdir we only need subdir name in 2825 meta_name. 2826 28272017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2828 2829 * Makefile (_MAKE_VERSION): 20170720 2830 Merge with NetBSD make, pick up 2831 o compat.c: pass SIGINT etc onto child and wait for it to exit 2832 before we self-terminate. 2833 28342017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2835 2836 * Makefile (_MAKE_VERSION): 20170711 2837 forgot to update after merge on 20170708 ;-) 2838 o main.c: refactor to reduce size of main function. 2839 add -v option to always fully expand values. 2840 o meta.c: ensure command output in meta file has ending newline 2841 even when filemon not being used. 2842 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2843 pathname via ':L' since any ':' in pathname breaks that. 2844 Instead set a '${.p.}' to pathname in the target context and 2845 use that. 2846 28472017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2848 2849 * Makefile (_MAKE_VERSION): 20170510 2850 Merge with NetBSD make, pick up 2851 o main.c: Main_SetObjdir: ensure buf2 is in scope 2852 28532017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2854 2855 * Makefile (_MAKE_VERSION): 20170505 2856 see mk/ChangeLog 2857 28582017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2859 2860 * parse.c: not everyone has stdint.h 2861 28622017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2863 2864 * Makefile (_MAKE_VERSION): 20170501 2865 see mk/ChangeLog 2866 28672017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2868 2869 * Makefile (_MAKE_VERSION): 20170421 2870 Merge with NetBSD make, pick up 2871 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2872 28732017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2874 2875 * Makefile (_MAKE_VERSION): 20170420 2876 Merge with NetBSD make, pick up 2877 o main.c: only use -C arg "as is" if it contains no 2878 relative component. 2879 28802017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2881 2882 * Makefile (_MAKE_VERSION): 20170418 2883 Merge with NetBSD make, pick up 2884 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2885 28862017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2887 2888 * Makefile (_MAKE_VERSION): 20170417 2889 Merge with NetBSD make, pick up 2890 o fixes a number of coverity complaints 2891 - check return value of fseek, fcntl 2892 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2893 JobPrintCommand, ParseTraditionalInclude 2894 - use bmake_malloc() where NULL is not tollerated 2895 - use MAKE_ATTR_UNUSED rather that kludges like 2896 return(unused ? 0 : 0) 2897 - use purge_cached_realpaths() rather than abuse cached_realpath() 2898 28992017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2900 2901 * Makefile (_MAKE_VERSION): 20170413 2902 Merge with NetBSD make, pick up 2903 o main.c: when setting .OBJDIR ignore '$' in paths. 2904 2905 * job.c: use MALLOC_OPTIONS to set malloc_options. 2906 29072017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2908 2909 * Makefile (_MAKE_VERSION): 20170411 2910 Merge with NetBSD make, pick up 2911 o str.c: Str_Match: allow [^a-z] to behave as expected. 2912 29132017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2914 2915 * Makefile (_MAKE_VERSION): 20170326 2916 Merge with NetBSD make, pick up 2917 o main.c: purge relative paths from realpath cache when .OBJDIR 2918 is changed. 2919 29202017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2921 2922 * Makefile (_MAKE_VERSION): 20170311 2923 Merge with NetBSD make, pick up 2924 o main.c: only use -C arg "as is" if it starts with '/'. 2925 29262017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2927 2928 * Makefile (_MAKE_VERSION): 20170301 2929 Merge with NetBSD make, pick up 2930 o main.c: use -C arg "as is" rather than getcwd() 2931 if they identify the same directory. 2932 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2933 29342017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2935 2936 * Makefile (_MAKE_VERSION): 20170201 2937 Merge with NetBSD make, pick up 2938 o var.c: allow :_=var and avoid use of special context. 2939 29402017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2941 2942 * Makefile (_MAKE_VERSION): 20170130 2943 Merge with NetBSD make, pick up 2944 o var.c: add :range and :_ 2945 o main.c: partially initialize Dir_* before MainParseArgs() 2946 can be called. 2947 If -V, skip Main_ExportMAKEFLAGS() 2948 29492017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2950 2951 * Makefile (_MAKE_VERSION): 20170114 2952 Merge with NetBSD make, pick up 2953 o var.c: allow specifying the utc value used by :{gm,local}time 2954 29552016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2956 2957 * Makefile (_MAKE_VERSION): 20161212 2958 Merge with NetBSD make, pick up 2959 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2960 29612016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2962 2963 * Makefile (_MAKE_VERSION): 20161209 2964 Merge with NetBSD make, pick up 2965 o main.c: cleanup setting of .OBJDIR 2966 o parse.c: avoid coredump from (var)=val 2967 29682016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2969 2970 * Makefile (_MAKE_VERSION): 20161126 2971 Merge with NetBSD make, pick up 2972 o make.c: Make_OODate: report src node name if path not set 2973 29742016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2975 2976 * Makefile (_MAKE_VERSION): 20160926 2977 Merge with NetBSD make, pick up 2978 o support for .DELETE_ON_ERROR: (remove targets that fail) 2979 29802016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2981 2982 * Makefile MAN: tweak .Dt to match ${PROG} 2983 29842016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2985 2986 * Makefile (_MAKE_VERSION): 20160818 2987 its a neater number; pick up whitespace fixes to man page. 2988 29892016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2990 2991 * Makefile (_MAKE_VERSION): 20160817 2992 Merge with NetBSD make, pick up 2993 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2994 so we can call it before adding entries to missingFiles. 2995 Thus we do not track files we have been told to ignore. 2996 29972016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2998 2999 * Makefile (_MAKE_VERSION): 20160815 3000 Merge with NetBSD make, pick up 3001 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 3002 pathnames, and skip if the expansion is empty. 3003 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 3004 30052016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 3006 3007 * Makefile (_MAKE_VERSION): 20160812 3008 Merge with NetBSD make, pick up 3009 o meta.c: remove all missingFiles entries that match a deleted 3010 dir. 3011 o main.c: set .ERROR_CMD if possible. 3012 30132016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3014 3015 * Makefile (_MAKE_VERSION): 20160606 3016 Merge with NetBSD make, pick up 3017 o dir.c: extend mtimes cache to others via cached_stat() 3018 30192016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3020 3021 * Makefile (_MAKE_VERSION): 20160604 3022 Merge with NetBSD make, pick up 3023 o meta.c: missing filemon data is only relevant if we read a 3024 meta file. 3025 Also do not return oodate for a missing metafile if gn->path 3026 points to .CURDIR 3027 30282016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3029 3030 * Makefile (_MAKE_VERSION): 20160602 3031 Merge with NetBSD make, pick up 3032 o cached_realpath(): avoid hitting filesystem more than necessary. 3033 o meta.c: refactor need_meta decision, add knobs for 3034 missing meta file and filemon data wrt out-of-datedness. 3035 30362016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3037 3038 * Makefile (_MAKE_VERSION): 20160528 3039 3040 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 3041 30422016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 3043 3044 * Makefile (_MAKE_VERSION): 20160512 3045 Merge with NetBSD make, pick up 3046 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 3047 this is useful for gcov builds. 3048 o propagate errors from filemon(4). 3049 30502016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 3051 3052 * Makefile (_MAKE_VERSION): 20160509 3053 Merge with NetBSD make, pick up 3054 o remove use of non-standard types u_int etc. 3055 o meta.c: apply realpath() before matching against metaIgnorePaths 3056 30572016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 3058 3059 * Makefile (_MAKE_VERSION): 20160404 3060 Merge with NetBSD make, pick up 3061 o allow makefile to set .MAKE.JOBS 3062 3063 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 3064 30652016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 3066 3067 * Makefile (_MAKE_VERSION): 20160315 3068 Merge with NetBSD make, pick up 3069 o fix handling of archive members 3070 30712016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3072 3073 * Makefile (_MAKE_VERSION): rename variable to avoid interference 3074 with checks for ${MAKE_VERSION} 3075 30762016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 3077 3078 * Makefile (MAKE_VERSION): 20160310 3079 Merge with NetBSD make, pick up 3080 o meta.c: treat missing Read file same as Write, incase we Delete it. 3081 30822016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 3083 3084 * Makefile (MAKE_VERSION): 20160307 3085 Merge with NetBSD make, pick up 3086 o var.c: fix :ts\nnn to be octal by default. 3087 o meta.c: meta_finish() to cleanup memory. 3088 30892016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 3090 3091 * Makefile (MAKE_VERSION): 20160226 3092 Merge with NetBSD make, pick up 3093 o meta.c: allow meta file for makeDepend if makefiles want it. 3094 30952016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 3096 3097 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 3098 for backwards compatability. 3099 3100 * Makefile (MAKE_VERSION): 20160220 3101 Merge with NetBSD make, pick up 3102 o var.c: add knob to control handling of '$$' in := 3103 31042016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3105 3106 * Makefile (MAKE_VERSION): 20160218 3107 Merge with NetBSD make, pick up 3108 o var.c: add .export-literal allows us to fix sys.clean-env.mk 3109 post the changes to Var_Subst. 3110 Var_Subst now takes flags, and does not consume '$$' in := 3111 31122016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 3113 3114 * Makefile (MAKE_VERSION): 20160217 3115 Merge with NetBSD make, pick up 3116 o var.c: preserve '$$' in := 3117 o parse.c: add .dinclude for handling included 3118 makefile like .depend 3119 31202015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 3121 3122 * Makefile (MAKE_VERSION): 20151220 3123 Merge with NetBSD make, pick up 3124 o suff.c: re-initialize suffNull when clearing suffixes. 3125 31262015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 3127 3128 * Makefile (MAKE_VERSION): 20151201 3129 Merge with NetBSD make, pick up 3130 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 3131 o meta.c: meta_oodate: use lstat(2) for checking link target 3132 in case it is a symlink. 3133 o var.c: avoid calling brk_string and Var_Export1 with empty 3134 strings. 3135 31362015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3137 3138 * Makefile (MAKE_VERSION): 20151126 3139 Merge with NetBSD make, pick up 3140 o parse.c: ParseTrackInput don't access beyond 3141 end of old value. 3142 31432015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 3144 3145 * Makefile (MAKE_VERSION): 20151022 3146 3147 * Add support for BSD/OS which lacks inttypes.h 3148 and really needs sys/param.h for sys/sysctl.h 3149 also 'type' is not a shell builtin. 3150 3151 * var.c: eliminate uint32_t and need for inttypes.h 3152 3153 * main.c: PrintOnError flush stdout before run .ERROR 3154 3155 * parse.c: cope with _SC_PAGESIZE not being defined. 3156 3157 31582015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 3159 3160 * Makefile (MAKE_VERSION): 20151020 3161 Merge with NetBSD make, pick up 3162 o var.c: fix uninitialized var 3163 31642015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 3165 3166 * var.c: the conditional expressions used with ':?' can be 3167 expensive, if already discarding do not evaluate or expand 3168 anything. 3169 31702015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3171 3172 * Makefile (MAKE_VERSION): 20151010 3173 Merge with NetBSD make, pick up 3174 o Add Boolean wantit flag to Var_Subst and Var_Parse 3175 when FALSE we know we are discarding the result and can 3176 skip operations like Cmd_Exec. 3177 31782015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3179 3180 * Makefile (MAKE_VERSION): 20151009 3181 Merge with NetBSD make, pick up 3182 o var.c: don't check for NULL before free() 3183 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 3184 31852015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3186 3187 * Makefile (MAKE_VERSION): 20150910 3188 Merge with NetBSD make, pick up 3189 o main.c: with -w print Enter/Leaving messages for objdir too 3190 if necessary. 3191 o centralize shell metachar handling 3192 3193 * FILES: add metachar.[ch] 3194 31952015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3196 3197 * Makefile (MAKE_VERSION): 20150606 3198 Merge with NetBSD make, pick up 3199 o make.1: document .OBJDIR target 3200 32012015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3202 3203 * Makefile (MAKE_VERSION): 20150505 3204 Merge with NetBSD make, pick up 3205 o cond.c: be strict about lhs of comparison when evaluating .if 3206 but less so when called from variable expansion. 3207 o unit-tests/cond2.mk: test various error conditions 3208 32092015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 3210 3211 * machine.sh (MACHINE): Add Bitrig 3212 patch from joerg@netbsd.org 3213 32142015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3215 3216 * Makefile (MAKE_VERSION): 20150418 3217 Merge with NetBSD make, pick up 3218 o job.c: use memmove() rather than memcpy() 3219 3220 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 3221 case, so skip it. 3222 32232015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3224 3225 * Makefile (MAKE_VERSION): 20150411 3226 bump version - only mk/ changes. 3227 32282015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3229 3230 * Makefile (MAKE_VERSION): 20150410 3231 Merge with NetBSD make, pick up 3232 o document different handling of '-' in jobs mode vs compat 3233 o fix jobs mode so that '-' only applies to whole job 3234 when shell lacks hasErrCtl 3235 o meta.c: use separate vars to track lcwd and latestdir (read) 3236 per process 3237 32382015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 3239 3240 * Makefile (MAKE_VERSION): 20150401 3241 Merge with NetBSD make, pick up 3242 o meta.c: close meta file in child 3243 3244 * Makefile: use BINDIR.bmake if set. 3245 Same for MANDIR and SHAREDIR 3246 Handy for testing release candidates 3247 in various environments. 3248 32492015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3250 3251 * move initialization of savederr to block where it is used 3252 to avoid spurious warning from gcc5 3253 32542014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3255 3256 * Makefile (MAKE_VERSION): 20141111 3257 just a cooler number 3258 32592014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 3260 3261 * Makefile (MAKE_VERSION): 20141105 3262 Merge with NetBSD make, pick up 3263 o revert major overhaul of suffix handling 3264 and POSIX compliance - too much breakage 3265 and impossible to make backwards compatible. 3266 o we still have the new unit test structure which is ok. 3267 o meta.c ensure "-- filemon" is at start of line. 3268 32692014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 3270 3271 * configure.in: test that result of getconf PATH_MAX is numeric 3272 and discard if not. Apparently needed for Hurd. 3273 32742014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3275 3276 * Makefile (MAKE_VERSION): 20140830 3277 Merge with NetBSD make, pick up 3278 o major overhaul of suffix handling 3279 o improved POSIX compliance 3280 o overhauled unit-tests 3281 32822014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3283 3284 * Makefile (MAKE_VERSION): 20140620 3285 Merge with NetBSD make, pick up 3286 o var.c return varNoError rather than var_Error for ::= modifiers. 3287 32882014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 3289 3290 * Makefile (MAKE_VERSION): 20140522 3291 Merge with NetBSD make, pick up 3292 o var.c detect some parse errors. 3293 32942014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3295 3296 * Fix spelling errors - patch from Pedro Giffuni 3297 32982014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 3299 3300 * Makefile (MAKE_VERSION): 20140214 3301 Merge with NetBSD make, pick up 3302 o .INCLUDEFROM* 3303 o use Var_Value to get MAKEOBJDIR[PREFIX] 3304 o reduced realloc'ign in brk_string. 3305 * configure.in: add a check for compiler supporting __func__ 3306 33072014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3308 3309 * boot-strap: ignore mksrc=none 3310 33112014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 3312 3313 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 3314 33152014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3316 3317 * Makefile (MAKE_VERSION): 20140101 3318 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 3319 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 3320 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 3321 Hurd) 3322 * configure.in: Add AC_PREREQ and check for 3323 sysctl; patch from Andrew Shadura andrewsh at debian.org 3324 33252013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3326 3327 * Makefile (MAKE_VERSION): 20131010 3328 * lose the const from arg to systcl to avoid problems on older BSDs. 3329 33302013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3331 3332 * Makefile (MAKE_VERSION): 20131001 3333 Merge with NetBSD make, pick up 3334 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 3335 hw.machine_arch if necessary. 3336 o meta.c: meta_oodate - need to look at src of Link and target 3337 of Move as well. 3338 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 3339 provide __arraycount() if needed. 3340 33412013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 3342 3343 * Makefile (MAKE_VERSION): 20130904 3344 Merge with NetBSD make, pick up 3345 o Add VAR_INTERNAL context, so that internal setting of 3346 MAKEFILE does not override value set by makefiles. 3347 33482013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 3349 3350 * Makefile (MAKE_VERSION): 20130902 3351 Merge with NetBSD make, pick up 3352 o CompatRunCommand: only apply shellErrFlag when errCheck is true 3353 33542013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3355 3356 * Makefile (MAKE_VERSION): 20130828 3357 Merge with NetBSD make, pick up 3358 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 3359 o Call Job_SetPrefix() from Job_Init() so makefiles have 3360 opportunity to set .MAKE.JOB.PREFIX 3361 33622013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 3363 3364 * Makefile (MAKE_VERSION): 20130730 3365 Merge with NetBSD make, pick up 3366 o Allow suppression of --- job -- tokens by setting 3367 .MAKE.JOB.PREFIX empty. 3368 33692013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 3370 3371 * Makefile (MAKE_VERSION): 20130716 3372 Merge with NetBSD make, pick up 3373 o number of gmake compatibility tweaks 3374 -w for gmake style entering/leaving messages 3375 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 3376 handle MAKEFLAGS containing only letters. 3377 o when overriding a GLOBAL variable on the command line, 3378 delete it from GLOBAL context so -V doesn't show the wrong 3379 value. 3380 33812013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 3382 3383 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 3384 3385 * Makefile (MAKE_VERSION): 20130706 3386 Merge with NetBSD make, pick up 3387 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 3388 true so that CompatRunCommand() can use it, to ensure 3389 consistent behavior with jobs mode. 3390 o use MAKE_LEVEL_ENV to define the variable to propagate 3391 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 3392 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 3393 paths to ignore. 3394 33952013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3396 3397 * Makefile (MAKE_VERSION): 20130604 3398 Merge with NetBSD make, pick up 3399 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 3400 to avoid leaking descriptors. 3401 34022013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3403 3404 * Makefile (MAKE_VERSION): 20130528 3405 Merge with NetBSD make, pick up 3406 o var.c: cleanup some left-overs in VarHash() 3407 34082013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3409 3410 * Makefile (MAKE_VERSION): 20130520 3411 generate manifest from component FILES rather than have to 3412 update FILES when mk/FILES changes. 3413 34142013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3415 3416 * Makefile (MAKE_VERSION): 20130518 3417 Merge with NetBSD make, pick up 3418 o suff.c: don't skip all processsing for .PHONY targets 3419 else wildcard srcs do not get expanded. 3420 o var.c: expand name of variable to delete if necessary. 3421 34222013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3423 3424 * Makefile (MAKE_VERSION): 20130330 3425 Merge with NetBSD make, pick up 3426 o meta.c: refine the handling of .OODATE in commands. 3427 Rather than suppress command comparison for the entire script 3428 as though .NOMETA_CMP had been used, only suppress it for the 3429 one command line. 3430 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3431 suppress comparison of a command without otherwise affecting it. 3432 o make.1: document that 3433 34342013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3435 3436 * Makefile (MAKE_VERSION): 20130321 3437 yes, not quite right but its a cooler number. 3438 Merge with NetBSD make, pick up 3439 o parse.c: fix ParseGmakeExport to be portable 3440 and add a unit-test. 3441 * meta.c: call meta_init() before makefiles are read and if built 3442 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3443 this let's makefiles test for support. 3444 Call meta_mode_init() to process .MAKE.MODE. 3445 34462013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3447 3448 * Makefile (MAKE_VERSION): 20130305 3449 Merge with NetBSD make, pick up 3450 o run .STALE: target when a dependency from .depend is missing. 3451 o job.c: add Job_RunTarget() for the above and .BEGIN 3452 34532013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3454 3455 * Makefile (MAKE_VERSION): 20130303 3456 Merge with NetBSD make, pick up 3457 o main.c: set .MAKE.OS to utsname.sysname 3458 o job.c: more checks for read and poll errors 3459 o var.c: lose VarChangeCase() saves 4% time 3460 34612013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3462 3463 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3464 want to use MAKEOBJDIR 3465 34662013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3467 3468 * Merge with NetBSD make, pick up 3469 o make.1: more info on how shell commands are handled. 3470 o job.c,main.c: detect write errors to job pipes. 3471 34722013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3473 3474 * Makefile (MAKE_VERSION): 20130123 3475 Merge with NetBSD make, pick up 3476 o meta.c: if script uses .OODATE and meta_oodate() decides 3477 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3478 o var.c: in debug output indicate which variabale modifiers 3479 apply to. 3480 o remove Check_Cwd logic the makefiles have been fixed. 3481 34822012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3483 3484 * makefile.in: add a simple makefile for folk who insist on 3485 ./configure; make; make install 3486 it just runs boot-strap 3487 * include mk/* to accommodate the above 3488 * boot-strap: re-work to accommodate the above 3489 mksrc defaults to $Mydir/mk 3490 allow op={configure,build,install,clean,all} 3491 add options to facilitate install 3492 * Makefile.config.in: just the bits set by configure 3493 * Makefile: bump version to 20121212 3494 abandon Makefile.in (NetBSD Makefile) 3495 leverage mk/* instead 3496 * configure.in: ensure srcdir is absolute 3497 34982012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3499 3500 * Makefile.in (MAKE_VERSION): 20121111 3501 fix generation of bmake.cat1 3502 35032012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3504 3505 * Makefile.in (MAKE_VERSION): 20121109 3506 Merge with NetBSD make, pick up 3507 o make.c: MakeBuildChild: return 0 so search continues if a 3508 .ORDER dependency is detected. 3509 o unit-tests/order: test the above 3510 35112012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3512 3513 * Makefile.in (MAKE_VERSION): 20121102 3514 Merge with NetBSD make, pick up 3515 o cond.c: allow cond_state[] to grow. 3516 In meta mode with a very large tree, we can hit the limit 3517 while processing dirdeps. 3518 35192012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3520 3521 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3522 35232012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3524 3525 * Makefile.in (MAKE_VERSION): 20121010 3526 o protect syntax that only bmake parses correctly. 3527 o remove auto setting of FORCE_MACHINE, use configure's 3528 --with-force-machine=whatever if that is desired. 3529 35302012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3531 3532 * Makefile.in: do not lose history from make.1 when generating bmake.1 3533 35342012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3535 3536 * Makefile.in (MAKE_VERSION): 20121007 3537 Merge with NetBSD make, pick up 3538 o compat.c: ignore empty commands - same as jobs mode. 3539 o make.1: document meta chars that cause use of shell 3540 35412012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3542 3543 * Makefile.in (MAKE_VERSION): bump version to 20120911 3544 * bsd.after-import.mk: include Makefile.inc early and allow it to 3545 override PROG 3546 35472012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3548 3549 * Makefile.in (MAKE_VERSION): bump version to 20120831 3550 Merge with NetBSD make, pick up 3551 o cast sizeof() to int for comparison 3552 o minor make.1 tweak 3553 35542012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3555 3556 * Makefile.in (MAKE_VERSION): bump version to 20120830 3557 Merge with NetBSD make, pick up 3558 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3559 o debug flag -dV causes -V to show raw value regardless. 3560 35612012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3562 3563 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3564 gets SRCTOP set. 3565 35662012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3567 3568 * Makefile.in (MAKE_VERSION): bump version to 20120704 3569 Merge with NetBSD make, pick up 3570 o Job_ParseShell should call Shell_Init if it has been 3571 previously called. 3572 * Makefile.in: set USE_META based on configure result. 3573 also .PARSEDIR is safer indicator of bmake. 3574 35752012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3576 3577 * Makefile.in: bump version to 20120626 3578 ensure CPPFLAGS is in CFLAGS 3579 * meta.c: avoid nested externs 3580 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3581 35822012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3583 3584 * Makefile.in (MAKE_VERSION): bump version to 20120620 3585 Merge with NetBSD make, pick up 3586 o make_malloc.c: avoid including make_malloc.h again 3587 3588 * Makefile.in: avoid bmake only syntax or protect with 3589 .if defined(.MAKE.LEVEL) 3590 * bsd.after-import.mk: replace .-include with .sinclude 3591 ensure? SRCTOP gets a value 3592 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3593 35942012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3595 3596 * Makefile.in (MAKE_VERSION): bump version to 20120612 3597 Merge with NetBSD make, pick up 3598 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3599 for greater portability. 3600 o unit-tests/forloop: check that .for works as expected wrt 3601 number of times and with "quoted strings". 3602 36032012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3604 3605 * Makefile.in (MAKE_VERSION): bump version to 20120606 3606 Merge with NetBSD make, pick up 3607 o compat.c: use kill(2) rather than raise(3). 3608 * configure.in: look for sys/dev/filemon 3609 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3610 and pass BOOTSTRAP_XTRAS to boot-strap. 3611 36122012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3613 3614 * Makefile.in (MAKE_VERSION): bump version to 20120604 3615 Merge with NetBSD make, pick up 3616 o util.c and var.c share same var for tracking if environ 3617 has been reallocated. 3618 o util.c provide getenv with setenv. 3619 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3620 when the shell actively strips .MAKE.* from the environment. 3621 We still refer to the variable always as .MAKE.LEVEL 3622 * util.c fix bug in findenv() was finding prefix of name. 3623 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3624 results in more reliable termination of all activity on many 3625 platforms. 3626 36272012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3628 3629 * Makefile.in (MAKE_VERSION): bump version to 20120602 3630 Merge with NetBSD make, pick up 3631 o for.c: handle quoted items in .for list 3632 36332012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3634 3635 * Makefile.in (MAKE_VERSION): bump version to 20120530 3636 Merge with NetBSD make, pick up 3637 o compat.c: ignore empty command. 3638 36392012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3640 3641 * Makefile.in (MAKE_VERSION): bump version to 20120524 3642 * FILES: add bsd.after-import.mk: 3643 A simple means of integrating bmake into a BSD build system. 3644 36452012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3646 3647 * Makefile.in (MAKE_VERSION): bump version to 20120520 3648 Merge with NetBSD make, pick up 3649 o increased limit for nested conditionals. 3650 36512012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3652 3653 * Makefile.in (MAKE_VERSION): bump version to 20120518 3654 Merge with NetBSD make, pick up 3655 o use _exit(2) in signal hanlder 3656 o Don't use the [dir] cache when building nodes that might have 3657 changed since the last exec. 3658 o Avoid nested extern declaration warnings. 3659 36602012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3661 3662 * meta.c (fgetLine): avoid %z - not portable. 3663 * parse.c: Since we moved include of sys/mman.h 3664 and def's of MAP_COPY etc. we got dups from a merge. 3665 36662012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3667 3668 * Makefile.in (MAKE_VERSION): bump version to 20120420 3669 Merge with NetBSD make, pick up 3670 o restore duplicate supression in .MAKE.MAKEFILES 3671 runtime saving can be significant. 3672 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3673 consumption up to 20%. 3674 36752012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3676 3677 * Makefile.in (MAKE_VERSION): bump version to 20120420 3678 Merge with NetBSD make, pick up 3679 o remove duplicate supression in .MAKE.MAKEFILES 3680 o improved dir cache behavior 3681 o gmake'ish export command 3682 36832012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3684 3685 * Makefile.in (MAKE_VERSION): bump version to 20120325 3686 Merge with NetBSD make, pick up 3687 o fix parsing of :[#] in conditionals. 3688 36892012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3690 3691 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3692 since some systems cannot cope with .Nx <version> 3693 36942011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3695 3696 * Makefile.in (MAKE_VERSION): bump version to 20111111 3697 Merge with NetBSD make, pick up 3698 o debug output for .PARSEDIR and .PARSEFILE 3699 37002011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3701 3702 * Makefile.in (MAKE_VERSION): bump version to 20111010 3703 37042011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3705 3706 * boot-strap: check for an expected file in the dirs we look for. 3707 * make-bootstrap.sh: pass on LDSTATIC 3708 37092011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3710 3711 * Makefile.in (MAKE_VERSION): bump version to 20111001 3712 Merge with NetBSD make, pick up 3713 o ensure .PREFIX is set for .PHONY 3714 and .TARGET set for .PHONY run via .END 3715 o __dead used consistently 3716 37172011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3718 3719 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3720 37212011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3722 3723 * Makefile.in (MAKE_VERSION): bump version to 20110905 3724 Merge with NetBSD make, pick up 3725 o meta_oodate: ignore makeDependfile 3726 37272011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3728 3729 * Makefile.in (MAKE_VERSION): bump version to 20110828 3730 Merge with NetBSD make, pick up 3731 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3732 as SILENT if a .meta file is created 3733 37342011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3735 3736 * Makefile.in (MAKE_VERSION): bump version to 20110818 3737 Merge with NetBSD make, pick up 3738 o in meta mode, if target flagged .META a missing .meta file 3739 means target is out-of-date 3740 o fixes for gcc 4.5 warnings 3741 o simplify job printing code 3742 37432011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3744 3745 * Makefile.in (MAKE_VERSION): bump version to 20110808 3746 Merge with NetBSD make, pick up 3747 o do not touch OP_SPECIAL targets when doing make -t 3748 37492011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3750 3751 * Makefile.in (MAKE_VERSION): bump version to 20110622 3752 Merge with NetBSD make, pick up 3753 o meta_oodate detect corrupted .meta file and declare oodate. 3754 * configure.in: add check for setsid 3755 37562011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3757 3758 * Merge with NetBSD make, pick up 3759 o unit-tests/modts now works on MirBSD 3760 37612011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3762 3763 * Makefile.in (MAKE_VERSION): bump version to 20110606 3764 Merge with NetBSD make, pick up 3765 o ApplyModifiers: when we parse a variable which is not 3766 the entire modifier string, or not followed by ':', do not 3767 consider it as containing modifiers. 3768 o loadfile: ensure newline at end of mapped file. 3769 37702011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3771 3772 * Makefile.in (MAKE_VERSION): bump version to 20110505 3773 Merge with NetBSD make, pick up 3774 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3775 of make's control. In meta mode, any generated file within 3776 said bailiwick, which is found to be missing, causes current 3777 target to be out-of-date. 3778 37792011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3780 3781 * Makefile.in (MAKE_VERSION): bump version to 20110411 3782 Merge with NetBSD make, pick up 3783 o when long modifiers fail to match, check sysV style. 3784 - add a test case 3785 37862011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3787 3788 * Makefile.in (MAKE_VERSION): bump version to 20110410 3789 Merge with NetBSD make, pick up 3790 o :hash - cheap 32bit hash of value 3791 o :localtime, :gmtime - use value as format string for strftime. 3792 37932011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3794 3795 * Makefile.in (MAKE_VERSION): bump version to 20110330 3796 mostly because its a cooler version. 3797 Merge with NetBSD make, pick up 3798 o NetBSD tags for meta.[ch] 3799 o job.c call meta_job_finish() after meta_job_error(). 3800 o meta_job_error() should call meta_job_finish() to ensure 3801 .meta file is closed, and safe to copy - if .ERROR target wants. 3802 meta_job_finish() is safe to call repeatedly. 3803 38042011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3805 3806 * unit-tests/modts: use printf if it is a builtin, 3807 to save us from MirBSD 3808 3809 * Makefile.in (MAKE_VERSION): bump version to 20110329 3810 Merge with NetBSD make, pick up 3811 o fix for use after free() in CondDoExists(). 3812 o meta_oodate() report extra commands and return earlier. 3813 38142011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3815 3816 * Makefile.in (MAKE_VERSION): bump version to 20110327 3817 Merge with NetBSD make, pick up 3818 o meta.c, if .MAKE.MODE contains curdirOk=yes 3819 allow creating .meta files in .CURDIR 3820 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3821 formats the output of 'type' differently - so eat any "()" 3822 38232011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3824 3825 * Makefile.in (MAKE_VERSION): bump version to 20110306 3826 Merge with NetBSD make, pick up 3827 o meta.c, only do getcwd() once 3828 38292011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3830 3831 * Makefile.in (MAKE_VERSION): bump version to 20110305 3832 Merge with NetBSD make, pick up 3833 o correct sysV substitution handling of empty lhs and variable 3834 o correct exists() check for dir with trailing / 3835 o correct handling of modifiers for non-existant variables 3836 during evaluation of conditionals. 3837 o ensure MAP_FILE is defined. 3838 o meta.c use curdir[] now exported by main.c 3839 38402011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3841 3842 * Makefile.in (MAKE_VERSION): bump version to 20110225 3843 Merge with NetBSD make, pick up 3844 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3845 makefiles have been read. 3846 o fix example of :? modifier in man page. 3847 38482011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3849 3850 * Makefile.in (MAKE_VERSION): bump version to 20110214 3851 Merge with NetBSD make, pick up 3852 o meta.c handle realpath() failing when generating meta file 3853 name. 3854 3855 * sigcompat.c: convert to ansi so we can use higher warning levels. 3856 3857 38582011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3859 3860 * Makefile.in (MAKE_VERSION): bump version to 20110207 3861 Merge with NetBSD make, pick up 3862 o fix for bug in meta mode. 3863 38642011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3865 3866 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3867 38682011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3869 3870 * Makefile.in (MAKE_VERSION): bump version to 20110101 3871 Merge with NetBSD make, pick up 3872 o use mmap(2) if available, for reading makefiles 3873 38742010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3875 3876 * Makefile.in (MAKE_VERSION): bump version to 20101215 3877 Merge with NetBSD make, pick up 3878 o ensure meta_job_error() does not report a previous .meta file 3879 as being culprit. 3880 38812010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3882 3883 * Makefile.in (MAKE_VERSION): bump version to 20101210 3884 Merge with NetBSD make, pick up 3885 o meta_oodate: track cwd per process, and only consider target 3886 out-of-date if missing file is outside make's CWD. 3887 Ignore files in /tmp/ etc. 3888 o to ensure unit-tests results match, need to control LC_ALL 3889 as well as LANG. 3890 o fix for parsing bug in var.c 3891 38922010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3893 3894 * Makefile.in (MAKE_VERSION): bump version to 20101126 3895 Merge with NetBSD make, pick up 3896 o if stale dependency is an IMPSRC, search via .PATH 3897 o meta_oodate: if a referenced file is missing, target is 3898 out-of-date. 3899 o meta_oodate: if a target uses .OODATE in its commands, 3900 it (.OODATE) needs to be recomputed. 3901 o keep a pointer to youngest child node, rather than just its 3902 mtime. 3903 39042010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3905 3906 * Makefile.in (MAKE_VERSION): bump version to 20101101 3907 39082010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3909 3910 * machine.sh: like os.sh, 3911 allow for uname -p producing useless drivel 3912 39132010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3914 3915 * boot-strap: document configure knobs for meta and filemon. 3916 3917 * Makefile.in (MAKE_VERSION): bump version to 20100911 3918 Merge with NetBSD make, pick up 3919 o meta.c - meta mode 3920 3921 * make-bootstrap.sh.in: handle meta.c 3922 * configure.in: add knobs for use_meta and filemon_h 3923 also, look for dirname, str[e]sep and strlcpy 3924 * util.c: add simple err[x] and warn[x] 3925 39262010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3927 3928 * boot-strap (TOOL_DIFF): set this to ensure tests use 3929 the same version of diff that configure tested 3930 3931 * Makefile.in (MAKE_VERSION): bump version to 20100808 3932 Merge with NetBSD make, pick up 3933 o in jobs mode, when we discover we cannot make something, 3934 call PrintOnError before exit. 3935 39362010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3937 3938 * Makefile.in (MAKE_VERSION): bump version to 20100806 3939 Merge with NetBSD make, pick up 3940 o formatting fixes for ignored errors 3941 o ensure jobs are cleaned up regardless of where wait() was called. 3942 39432010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3944 3945 * Makefile.in (MAKE_VERSION): bump version to 20100618 3946 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3947 39482010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3949 3950 * Makefile.in (MAKE_VERSION): bump version to 20100616 3951 Merge with NetBSD make, pick up 3952 o man page update 3953 o call PrintOnError from JobFinish when we detect an error we 3954 are not ignoring. 3955 39562010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3957 3958 * Makefile.in (MAKE_VERSION): bump version to 20100606 3959 Merge with NetBSD make, pick up 3960 o man page update 3961 39622010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3963 3964 * Makefile.in (MAKE_VERSION): bump version to 20100605 3965 Merge with NetBSD make, pick up 3966 o use bmake_signal() which is a wrapper around sigaction() 3967 in place of signal() 3968 o add .export-env to allow exporting variables to environment 3969 without tracking (so no re-export when the internal value is 3970 changed). 3971 39722010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3973 3974 * Makefile.in (MAKE_VERSION): bump version to 20100524 3975 Merge with NetBSD make, pick up 3976 o fix for .info et al being greedy. 3977 39782010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3979 3980 * Makefile.in (MAKE_VERSION): bump version to 20100520 3981 Merge with NetBSD make, pick up 3982 o back to using realpath on argv[0] 3983 but only if contains '/' and does not start with '/'. 3984 39852010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3986 3987 * boot-strap: use absolute path for bmake when running tests. 3988 3989 * Makefile.in (MAKE_VERSION): bump version to 20100510 3990 Merge with NetBSD make, pick up 3991 o revert use of realpath on argv[0] 3992 too many corner cases. 3993 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3994 39952010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3996 3997 * Makefile.in (MAKE_VERSION): bump version to 20100505 3998 Merge with NetBSD make, pick up 3999 o fix for missed SIGCHLD when compiled with SunPRO 4000 actually for bmake, defining FORCE_POSIX_SIGNALS would have 4001 done the job. 4002 40032010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 4004 4005 * Makefile.in (MAKE_VERSION): bump version to 20100430 4006 Merge with NetBSD make, pick up 4007 o fflush stdout before writing to stdout 4008 40092010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 4010 4011 * Makefile.in (MAKE_VERSION): bump version to 20100423 4012 Merge with NetBSD make, pick up 4013 o updated unit tests for Haiku (this time for sure). 4014 * boot-strap: based on patch from joerg 4015 honor --with-default-sys-path better. 4016 * boot-strap: remove mention of --with-prefix-sys-path 4017 40182010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 4019 4020 * Makefile.in (MAKE_VERSION): bump version to 20100422 4021 * Merge with NetBSD make, pick up 4022 o fix for vfork() on Darwin. 4023 o fix for bogus $TMPDIR. 4024 o set .MAKE.MODE=compat for -B 4025 o set .MAKE.JOBS=max_jobs for -j max_jobs 4026 o allow unit-tests to run without any *.mk 4027 o unit-tests/modmisc be more conservative in dirs presumed to exist. 4028 * boot-strap: ignore /usr/share/mk except on NetBSD. 4029 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 4030 ensure sort(1) behaves as expected. 4031 40322010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 4033 4034 * boot-strap: add FindHereOrAbove so we can use -m .../mk 4035 40362010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 4037 4038 * Makefile.in (MAKE_VERSION): bump version to 20100420 4039 * Merge with NetBSD make, pick up 4040 o fix for variable realpath() behavior. 4041 we have to stat(2) the result to be sure. 4042 o fix for .export (all) when nested vars use :sh 4043 40442010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 4045 4046 * Makefile.in (MAKE_VERSION): bump version to 20100414 4047 * Merge with NetBSD make, pick up 4048 o use realpath to resolve argv[0] (for .MAKE) if needed. 4049 o add realpath from libc. 4050 o add :tA to resolve variable via realpath(3) if possible. 4051 40522010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 4053 4054 * Makefile.in (MAKE_VERSION): bump version to 20100408 4055 * Merge with NetBSD make, pick up 4056 o unit tests for .ERROR, .error 4057 o fix for .ERROR to ensure it cannot be default target. 4058 40592010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 4060 4061 * Makefile.in (MAKE_VERSION): bump version to 20100406 4062 * Merge with NetBSD make, pick up 4063 o fix for compat mode "Error code" going to debug_file. 4064 o fix for .ALLSRC being populated twice. 4065 o support for .info, .warning and .error directives 4066 o .MAKE.MODE to control make's operational mode 4067 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 4068 name(s). 4069 o .MAKE.DEPENDFILE to control the name of the depend file 4070 o .ERROR target - run on failure. 4071 40722010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 4073 4074 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 4075 4076 * os.sh,arch.c: patch for Haiku from joerg at netbsd 4077 40782010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 4079 4080 * Makefile.in (MAKE_VERSION): bump version to 20100222 4081 * Merge with NetBSD make, pick up 4082 o better error msg for .for with mutiple inter vars 4083 4084 * boot-strap: 4085 o use make-bootstrap.sh from joerg at netbsd 4086 to avoid the need for a native make when bootstrapping. 4087 o add "" everywhere ;-) 4088 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 4089 otherwise the pre-formated version. 4090 40912010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 4092 4093 * Makefile.in (MAKE_VERSION): bump version to 20100102 4094 * Merge with NetBSD make, pick up: 4095 o fix for -m .../ 4096 40972009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 4098 4099 * Makefile.in (MAKE_VERSION): bump version to 20091118 4100 * Merge with NetBSD make, pick up: 4101 o .unexport 4102 o report lines that start with '.' and should have ':' 4103 (catch typo's of .el*if). 4104 41052009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4106 4107 * configure.in: Ensure that srcdir and mksrc are absolute paths. 4108 41092009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4110 4111 * Makefile.in (MAKE_VERSION): fix version to 20091007 4112 41132009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 4114 4115 * Makefile.in (MAKE_VERSION): bump version to 200910007 4116 * Merge with NetBSD make, pick up: 4117 o fix for parsing of :S;...;...; applied to .for loop iterator 4118 appearing in a dependency line. 4119 41202009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4121 4122 * Makefile.in (MAKE_VERSION): bump version to 20090909 4123 * Merge with NetBSD make, pick up: 4124 o fix for -C, .CURDIR and .OBJDIR 4125 * boot-strap: 4126 o allow share_dir to be set independent of prefix. 4127 o select default share_dir better when prefix ends in $HOST_TARGET 4128 o if FORCE_BSD_MK etc were set, include them in the suggested 4129 install-mk command. 4130 41312009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 4132 4133 * Makefile.in (MAKE_VERSION): bump version to 20090908 4134 * Merge with NetBSD make, pick up: 4135 o .MAKE.LEVEL for recursion tracking 4136 o fix for :M scanning \: 4137 41382009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4139 4140 * configure.in: Don't -D__EXTENSIONS__ if 4141 AC_USE_SYSTEM_EXTENSIONS says "no". 4142 41432009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 4144 4145 * Makefile.in (MAKE_VERSION): bump version to 20090826 4146 Simplify MAKE_VERSION to just the bare date. 4147 * Merge with NetBSD make, pick up: 4148 o -C directory support. 4149 o support for SIGINFO 4150 o use $TMPDIR for temp files. 4151 o child of vfork should be careful about modifying parent's state. 4152 4153 41542009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 4155 4156 * Appy some patches for MiNT from David Brownlee 4157 41582009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 4159 4160 * Makefile.in (BMAKE_VERSION): bump version to 20090222 4161 * Merge with NetBSD make, pick up: 4162 o Possible null pointer de-ref in Var_Set. 4163 41642009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 4165 4166 * Makefile.in (BMAKE_VERSION): bump version to 20090204 4167 * Merge with NetBSD make, pick up: 4168 o bmake_malloc et al moved to their own .c 4169 o Count both () and {} when looking for the end of a :M pattern 4170 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 4171 o strlist.c - functions for processing extendable arrays of pointers to strings. 4172 o ClientData replaced with void *, so const void * can be used. 4173 o New debug flag C for DEBUG_CWD 4174 41752008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 4176 4177 * Makefile.in (BMAKE_VERSION): bump version to 20081111 4178 Apply patch from Joerg Sonnenberge to 4179 configure.in: 4180 o remove some redundant checks 4181 o check for emlloc etc only in libutil and require the whole family. 4182 util.c: 4183 o remove [v]asprintf which is no longer used. 4184 41852008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4186 4187 * Makefile.in (BMAKE_VERSION): bump version to 20081101 4188 * Merge with NetBSD make, pick up: 4189 o util.c: avoid use of putenv() - christos 4190 41912008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4192 4193 * Makefile.in (BMAKE_VERSION): bump version to 20081030 4194 pick up man page tweaks. 4195 41962008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 4197 4198 * Makefile.in: move processing of LIBOBJS to after is definition! 4199 thus we'll have getenv.c in SRCS only if needed. 4200 4201 * make.1: add examples of how to use :? 4202 4203 * Makefile.in (BMAKE_VERSION): bump version to 20081029 4204 * Merge with NetBSD make, pick up: 4205 o fix for .END processing with -j 4206 o segfault from Parse_Error when no makefile is open 4207 o handle numeric expressions in any variable expansion 4208 o debug output now defaults to stderr, -dF to change it - apb 4209 o make now uses bmake_malloc etc so that it can build natively 4210 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 4211 42122008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 4213 4214 * Makefile.in (BMAKE_VERSION): bump version to 20080808 4215 * Merge with NetBSD make, pick up: 4216 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 4217 long lines in Makefiles 4218 o optimizations for VarQuote by joerg 4219 o fix for PR/38756: dominik: make dumps core on invalid makefile 4220 42212008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 4222 4223 * Makefile.in (BMAKE_VERSION): bump version to 20080515 4224 * Merge with NetBSD make, pick up: 4225 o fix skip setting vars in VAR_GLOBAL context, to handle 4226 cases where VAR_CMD is used for other than command line vars. 4227 42282008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 4229 4230 * boot-strap (make_version): we may need to look in 4231 $prefix/share/mk for sys.mk 4232 4233 * Makefile.in (BMAKE_VERSION): bump version to 20080514 4234 * Merge with NetBSD make, pick up: 4235 o skip setting vars in VAR_GLOBAL context, when already set in 4236 VAR_CMD which takes precedence. 4237 42382008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 4239 4240 * Makefile.in (BMAKE_VERSION): bump version to 20080330 4241 * Merge with NetBSD make, pick up: 4242 o fix for ?= when LHS contains variable reference. 4243 42442008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4245 4246 * merge some patches from NetBSD pkgsrc. 4247 4248 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 4249 the MAKSYSPATH used during bootstrap. 4250 4251 * Makefile.in (BMAKE_VERSION): bump version to 20080215 4252 * Merge with NetBSD make, pick up: 4253 o warn if non-space chars follow 'empty' in a conditional. 4254 42552008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4256 4257 * Makefile.in (BMAKE_VERSION): bump version to 20080118 4258 * Merge with NetBSD make, pick up: 4259 o consider dependencies read from .depend as optional - dsl 4260 o remember when buffer for reading makefile grows - dsl 4261 o add -dl (aka LOUD) - David O'Brien 4262 42632007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 4264 4265 * Makefile.in (BMAKE_VERSION): bump version to 20071022 4266 * Merge with NetBSD make, pick up: 4267 o Allow .PATH<suffix> to be used for .include "" 4268 4269 * boot-strap: source default settings from .bmake-boot-strap.rc 4270 42712007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 4272 4273 * Makefile.in: fix maninstall on various systems 4274 provided that our man.mk is used. 4275 For non-BSD systems we install the preformatted page 4276 into $MANDIR/cat1 4277 42782007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 4279 4280 * boot-strap: make bmake.1 too, so maninstall works. 4281 42822007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 4283 4284 * Makefile.in (BMAKE_VERSION): bump version to 20071014 4285 * Merge with NetBSD make, pick up: 4286 o revamped handling of defshell - configure no longer needs to 4287 know the content of the shells array - apb 4288 o stop Var_Subst modifying its input - apb 4289 o avoid calling ParseTrackInput too often - dsl 4290 42912007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 4292 4293 * Makefile.in (BMAKE_VERSION): bump version to 20071011 4294 * Merge with NetBSD make, pick up: 4295 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 4296 4297 * sigcompat.c: some tweaks for HP-UX 11.x based on 4298 patch from Tobias Nygren 4299 4300 * configure.in: update handling of --with-defshell to match 4301 new make behavior. --with-defshell=/usr/xpg4/bin/sh 4302 will now do what one might hope - provided the chosen shell 4303 behaves enough like sh. 4304 43052007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 4306 4307 * Makefile.in (BMAKE_VERSION): bump to 20071008 4308 * Merge with NetBSD make, pick up: 4309 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 4310 o .export/.MAKE.EXPORTED - export of variables - sjg 4311 o .MAKE.MAKEFILES - track all makefiles read - sjg 4312 o performance improvements - dsl 4313 o revamp parallel job scheduling - dsl 4314 43152006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4316 4317 * Makefile.in (BMAKE_VERSION): bump to 20060728 4318 * Merge with NetBSD make, pick up: 4319 o extra debug info during variable and cond processing - sjg 4320 o shell definition now covers newline - rillig 4321 o minor mem leak in PrintOnError - sjg 4322 43232006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4324 4325 * Makefile.in (BMAKE_VERSION): bump to 20060511 4326 * Merge with NetBSD make, pick up: 4327 o more memory leaks - coverity 4328 o possible overflow in ArchFindMember - coverity 4329 o extract variable modifier code out of Var_Parse() 4330 so it can be called recursively - sjg 4331 o unit-tests/moderrs - sjg 4332 43332006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 4334 4335 * Makefile.in (BMAKE_VERSION): bump to 20060412 4336 * Merge with NetBSD make, pick up: 4337 o fixes for some memory leaks - coverity 4338 o only read first sys.mk etc when searching sysIncPath - sjg 4339 4340 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 4341 setting ${MAKEFILE} - OBATA Akio 4342 43432006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 4344 4345 * Makefile.in (BMAKE_VERSION): bump to 20060318 4346 * Merge with NetBSD make, pick up: 4347 o cleanup of job.c to remove remote handling, distcc is more 4348 useful and this code was likely bit-rotting - dsl 4349 o fix for :P modifier - sjg 4350 * boot-strap: set default prefix to something reasonable 4351 (for me anyway). 4352 43532006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 4354 4355 * Makefile.in (BMAKE_VERSION): bump to 20060301 4356 * Merge with NetBSD make, pick up: 4357 o make .WAIT apply recursively, document and test case - apb 4358 o allow variable modifiers in a variable appear anywhere in 4359 modifier list, document and test case - sjg 4360 43612006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 4362 4363 * Makefile.in (BMAKE_VERSION): bump to 20060222 4364 * Merge with NetBSD make, pick up: 4365 o improved job token handling - dsl 4366 o SIG_DFL the correct signal before exec - dsl 4367 o more debug info during parsing - dsl 4368 o allow variable modifiers to be specified via variable - sjg 4369 * boot-strap: explain why we died if no mksrc 4370 43712005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 4372 4373 * Makefile.in (BMAKE_VERSION): bump to 20051105 4374 * configure.in: always set default_sys_path 4375 default is ${prefix}/share/mk 4376 - remove prefix_sys_path, anyone wanting more than above 4377 needs to set it manually. 4378 43792005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4380 4381 * boot-strap: make this a bit easier for pkgsrc folk. 4382 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 4383 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 4384 43852005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 4386 4387 * Makefile.in (BMAKE_VERSION): bump to 20051102 4388 * job.c (JobFinish): fix likely ancient merge lossage 4389 fix from Todd Vierling. 4390 * boot-strap (srcdir): allow setting mksrc=none 4391 43922005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 4393 4394 * Makefile.in (BMAKE_VERSION): bump to 20051031 4395 * ranlib.h: skip on OSF too. 4396 (NetBSD PR 31864) 4397 43982005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 4399 4400 * Makefile.in (BMAKE_VERSION): bump to 20051002 4401 fix a silly typo 4402 44032005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4404 4405 * Makefile.in (BMAKE_VERSION): bump to 20051001 4406 support for UnixWare and some other systems, 4407 based on patches from pkgsrc/bootstrap 4408 44092005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4410 4411 * Makefile.in (BMAKE_VERSION): bump to 20050901 4412 * Merge with NetBSD make, pick up: 4413 o possible parse error causing us to wander off. 4414 44152005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 4416 4417 * Makefile.in (BMAKE_VERSION): bump to 20050606 4418 * Merge with NetBSD make, pick up: 4419 o :0x modifier for randomizing a list 4420 o fixes for a number of -Wuninitialized issues. 4421 44222005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 4423 4424 * Makefile.in (BMAKE_VERSION): bump to 20050530 4425 * Merge with NetBSD make, pick up: 4426 o Handle dependencies for .BEGIN, .END and .INTERRUPT 4427 4428 * README: was seriously out of date. 4429 44302005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4431 4432 * Important to use .MAKE rather than MAKE. 4433 44342005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4435 4436 * Makefile.in (BMAKE_VERSION): bump to 20050315 4437 * Merge with NetBSD make, pick up: 4438 o don't mistake .elsefoo for .else 4439 o use suffix-specific search path correctly 4440 o bunch of style nits 4441 44422004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4443 4444 * boot-strap: 4445 o ensure that args to --src and --with-mksrc 4446 are resolved before giving them to configure. 4447 o add -o "objdir" so that builder can control it, 4448 default is $OS as determined by os.sh 4449 o add -q to suppress all the install instructions. 4450 44512004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4452 4453 * Remove __IDSTRING() 4454 4455 * Makefile.in (BMAKE_VERSION): bump to 20040508 4456 * Merge with NetBSD make, pick up: 4457 o posix fixes 4458 - remove '-e' from compat mode 4459 - add support for '+' command-line prefix. 4460 o fix for handling '--' on command-line. 4461 o fix include in lst.lib/lstInt.h to simplify '-I's 4462 o we also picked up replacement of MAKE_BOOTSTRAP 4463 with !MAKE_NATIVE which is a noop, but possibly confusing. 4464 44652004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4466 4467 * Makefile.in (BMAKE_VERSION): bump to 20040414 4468 * Merge with NetBSD make, pick up: 4469 o allow quoted strings on lhs of conditionals 4470 o issue warning when extra .else is seen 4471 o print line numer when errors encountered during parsing from 4472 string. 4473 44742004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4475 4476 * Makefile.in (BMAKE_VERSION): bump to 20040220 4477 * Merge with NetBSD make, pick up: 4478 o fix for old :M parsing bug. 4479 o re-jigged unit-tests 4480 44812004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4482 4483 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4484 so that './bmake -f Makefile test' works. 4485 44862004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4487 4488 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4489 * Merge with NetBSD make, pick up: 4490 o search upwards for *.mk 4491 o fix for double free of var substitution buffers 4492 o use of getopt replaced with custom code, since the usage 4493 (re-scanning) isn't posix compatible. 4494 44952004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4496 4497 * arch.c: don't include ranlib.h on ELF systems 4498 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4499 45002004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4501 4502 * Makefile.in (BMAKE_VERSION): bump to 20040118 4503 4504 * boot-strap (while): export vars we assign to on cmdline 4505 * unit-test/Makefile.in: ternary is .PHONY 4506 45072004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4508 4509 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4510 * Merge with NetBSD make, pick up: 4511 o fix for ternary modifier 4512 45132004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4514 4515 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4516 * Merge with NetBSD make, pick up: 4517 o fix for cond.c to handle compound expressions better 4518 o variable expansion within sysV style replacements 4519 45202003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4521 4522 * Make portable snprintf safer - output to /dev/null first to 4523 check space needed. 4524 4525 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4526 * Merge with NetBSD make, pick up: 4527 o -dg3 to show input graph when things go wrong. 4528 o explicitly look for makefiles in objdir if not found in curdir so 4529 that errors in .depend etc will be reported accurarely. 4530 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4531 instead as it more accurately reflects the expected behavior and 4532 is more consistently implemented. 4533 o avoid use of asprintf. 4534 45352003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4536 4537 * util.c: Add asprintf and vasprintf. 4538 4539 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4540 * Merge with NetBSD make, pick up: 4541 :[] modifier - allows picking words from a variable. 4542 :tW modifier - allows treating value as one big word. 4543 W flag for :C and :S - allows treating value as one big word. 4544 45452003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4546 4547 * Merge with NetBSD make 4548 pick up -de flag to enable printing failed command. 4549 don't skip 1st two dir entries (normally . and ..) since 4550 coda does not have them. 4551 45522003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4553 4554 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4555 * Merge with NetBSD make, pick up: 4556 - changes for -V '${VAR}' to print fully expanded value 4557 cf. -V VAR 4558 - CompatRunCommand now prints the command that failed. 4559 - several files got updated 3 clause Berkeley license. 4560 45612003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4562 4563 * boot-strap: Allow setting configure args on command line. 4564 45652003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4566 4567 * configure.in: add --with-defshell to allow sh or ksh 4568 to be selected as default shell. 4569 4570 * Makefile.in: bump version to 20030731 4571 4572 * Merge with NetBSD make 4573 Pick up .SHELL spec for ksh and associate man page changes. 4574 Also compat mode now uses the same shell specs. 4575 45762003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4577 4578 * var.c (Var_Parse): ensure delim is initialized. 4579 4580 * unit-tests/Makefile.in: use single quotes to avoid problems from 4581 some shells. 4582 4583 * makefile.boot.in: 4584 Run the unit-tests as part of the bootstrap procedure. 4585 45862003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4587 4588 * unit-tests/Makefile.in: always force complaints from 4589 ${TEST_MAKE} to be from 'make'. 4590 4591 * configure.in: add check for 'diff -u' 4592 also fix some old autoconf'isms 4593 4594 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4595 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4596 4597 * Merge with NetBSD make 4598 Pick up fix for :ts parsing error in some cases. 4599 Pick unit-tests. 4600 46012003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4602 4603 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4604 4605 * var.c (Var_Parse): fix bug in :ts modifier, after const 4606 correctness fixes, must pass nstr to VarModify. 4607 46082003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4609 4610 * Makefile.in: BMAKE_VERSION switch to a date based version. 4611 We'll generally use the date of last import from NetBSD. 4612 4613 * Merge with NetBSD make 4614 Pick up fixes for const-correctness, now passes WARNS=3 on 4615 NetBSD. 4616 Pick up :ts modifier, allows controlling the separator used 4617 between words in variable expansion. 4618 46192003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4620 4621 * FILES: include boot-strap and os.sh 4622 4623 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4624 FreeBSD is known to be bad. 4625 4626 * makefile.boot.in (bootstrap): make this the default target. 4627 4628 * Makefile.in: bump version to 3.1.19 4629 4630 * machine.sh: avoid A-Z with tr as it is bound to lose. 4631 46322003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4633 4634 * Merge with NetBSD make 4635 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4636 Plus some doc fixes. 4637 46382003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4639 4640 * Merge with NetBSD make 4641 Pick up fix for PR/1523 - don't count a library as built, if there 4642 is no way to build it 4643 4644 * Bump version to 3.1.18 4645 46462003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4647 4648 * Merge with NetBSD make 4649 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4650 appears in src list. 4651 46522003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4653 4654 * Merge with NetBSD make (mmm 10th anniversary!) 4655 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4656 pick up -X which tells us to not export VAR=val via setenv if 4657 we are already doing so via MAKEFLAGS. This saves valuable env 4658 space on systems like Darwin. 4659 set MAKE_VERSION to 3.1.17 4660 4661 * parse.c: pix up fix for suffix rules 4662 46632003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4664 4665 * Merge with NetBSD make. 4666 pick up fix for propagating -B via MAKEFLAGS. 4667 set MAKE_VERSION to 3.1.16 4668 4669 * Apply some patches from pkgsrc-bootstrap/bmake 4670 Originally by Grant Beattie <grant@netbsd.org> 4671 I may have missed some - since they are based on bmake-3.1.12 4672 46732002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4674 4675 * makefile.boot.in (bmake): update install targets for those that 4676 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4677 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4678 4679 * bmake.cat1: update the pre-formatted man page! 4680 46812002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4682 4683 * Merge with NetBSD make. 4684 pick up fix for premature free of pointer used in call 4685 to Dir_InitCur(). 4686 set MAKE_VERSION to 3.1.15 4687 46882002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4689 4690 * configure.in: determine suitable value for MKSRC. 4691 override using --with-mksrc=PATH. 4692 4693 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4694 configs(8) will use 'sun4' as an alias for 'sparc'. 4695 46962002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4697 4698 * Merge with NetBSD make. 4699 pick up ${.PATH} 4700 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4701 set MAKE_VERSION to 3.1.14 4702 add configure checks for killpg and sys/socket.h 4703 47042002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4705 4706 * tag bmake-3-1-13 4707 4708 * makefile.boot.in (bmake): use install-mk 4709 Also setup ./mk before trying to invoke bmake.boot incase we 4710 needed install-mk to create a sys.mk for us. 4711 4712 * configure.in: If we need to add -I${srcdir}/missing, make it an 4713 absolute path so that it works for lst.lib too. 4714 4715 * make.h: always include sys/cdefs.h since we provide one if the 4716 host does not. 4717 4718 * Makefile.in (install-mk): 4719 use MKSRC/install-mk which will do the right thing. 4720 use uname -p for ARCH if possible. 4721 since install-mk will setup links bsd.prog.mk -> prog.mk if 4722 needed, just .include bsd.prog.mk 4723 4724 * Merge with NetBSD make (NetBSD-1.6) 4725 Code is ansi-C only now. 4726 Bug in handling of dotLast is fixed. 4727 Can now assign .OBJDIR and make will reset its notions of life. 4728 New modifiers :tu :tl for toUpper and toLower. 4729 4730Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4731 4732 * Merge with NetBSD make 4733 pick up fix for .END failure in compat mode. 4734 pick up fix for extra va_end() in ParseVErrorInternal. 4735 4736Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4737 4738 * configure.in: for systems that have sys/cdefs.h check if it is 4739 compatible. If not, include the one under missing, but tell it to 4740 include the native one too - necessary on Linux. 4741 4742 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4743 include_next (for gcc) to get the native sys/cdefs.h 4744 4745Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4746 4747 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4748 leaking descriptors when using -jN. 4749 4750 * job.c (JobPrintCommand): See if "curdir" exists before 4751 attempting to chdir(). Doing the chdir directly in make (when in 4752 compat mode) fails silently, so let the -jN version do the same. 4753 This can happen when building kernels in an object tree and 4754 playing clever games to reset .CURDIR. 4755 4756 * Merged with NetBSD make 4757 pick up .USEBEFORE 4758 4759Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4760 4761 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4762 4763Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4764 4765 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4766 us not to export the iterator variable when using VAR_CMD context. 4767 4768Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4769 4770 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4771 its the wrong "fix". 4772 4773Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4774 4775 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4776 We now simply append the variable names to .MAKEOVERRIDES, and 4777 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4778 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4779 Apart from fixing quoting bugs in previous version, this allows us 4780 to export vars to the environment by simply doing: 4781 .MAKEOVERRIDES+= PATH 4782 Merged again with NetBSD make, but the above is the only change. 4783 4784 * configure.in: added 4785 --disable-pwd-override disable $PWD overriding getcwd() 4786 --disable-check-make-chdir disable make trying to guess 4787 when it should automatically cd ${.CURDIR} 4788 4789 * Merge with NetBSD make, changes include: 4790 parse.c (ParseDoDependency): Spot that the syntax error is 4791 caused by an unresolved cvs/rcs conflict and say so. 4792 var.c: most of Var* functions now take a ctxt as 1st arg. 4793 now does variable substituion on rhs of sysv style modifiers. 4794 4795 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4796 is now done here. We append the name='value' to .MAKEOVERRIDES 4797 rather than directly into MAKEFLAGS as this allows a Makefile to 4798 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4799 very similar mechanism. Note that in adding name='value' to 4800 .MAKEOVERRIDES we do the moral equivalent of: 4801 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4802 4803Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4804 4805 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4806 4807 * Merged with NetBSD make 4808 make -dx can now be used to run commands via sh -x 4809 better error messages on exec failures. 4810 4811Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4812 4813 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4814 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4815 MACHINE etc otherwise they propagate from the previous bmake. 4816 4817 * configure.in (machine): allow --with-machine=generic to make 4818 configure use machine.sh to set MACHINE. 4819 4820 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4821 4822 * Makefile.in: mention in bmake.1 that we use autoconf. 4823 4824 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4825 4826Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4827 4828 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4829 as that rather defeats the usefulness of ${MAKEFILE}. 4830 4831 * main.c (MainParseArgs): append command line variable assignments 4832 to MAKEFLAGS so that they get propagated to child make's. 4833 Apparently this is required POSIX behaviour? Its useful anyway. 4834 4835Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4836 4837 * compat.c (CompatRunCommand): don't use perror() since stdio may 4838 cause problems in child of vfork(). 4839 4840 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4841 This routine prints out the .curdir where we stopped and will also 4842 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4843 4844 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4845 :@ expansion. 4846 4847 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4848 4849 * Added RCSid's for the files we've touched. 4850 4851Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4852 4853 * configure.in: Thanks to some clues from mdb@juniper.net, 4854 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4855 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4856 4857 --with-machine=MACHINE explicitly set MACHINE 4858 --with-force-machine=MACHINE set FORCE_MACHINE 4859 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4860 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4861 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4862 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4863 4864 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4865 4866 * makefile: added a pathetically simple makefile to drive 4867 bootstrapping. Running configure by hand is more useful. 4868 4869 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4870 dependent on NetBSD bsd.*.mk 4871 4872 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4873 _PATH_OBJDIRPREFIX for those that don't want a default. 4874 construct _PATH_DEFSYSPATH from the info we get from configure. 4875 4876 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4877 if MAKE_VERSION is defined. 4878 4879 * compat.c: when we bail, print out the .CURDIR we were in. 4880 4881Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4882 4883 * Merged with NetBSD make 4884 4885 * var.c: fixed a bug in the handling of the modifier :P 4886 if the node as found but the path was null, we segfault trying to 4887 duplicate it. 4888 4889Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4890 4891 * Merged with NetBSD make 4892 4893 * make.c: Make_OODate's test for a library out of date was using 4894 cmtime where it should have used mtime (my bug). 4895 4896 * compat.c: Use perror() to tell us what really went wrong when we 4897 cannot exec a command. 4898 4899Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4900 4901 * Merged with NetBSD make 4902 4903Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4904 4905 * Merged with NetBSD make 4906 4907Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4908 4909 * Merged with NetBSD make 4910 4911Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4912 4913 * Merged with NetBSD make 4914 4915Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4916 4917 * util.c: don't provide signal() since we use sigcompat.c 4918 4919 * Makefile.in: added a build target. 4920 4921 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4922 These allow some quite clever magic. 4923 4924 * main.c (main): added support for getenv(MAKESYSPATH). 4925 4926Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4927 4928 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4929 This avoids objdir having a different value depending on how a 4930 directory was reached (via command line, or subdir.mk). 4931 4932 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4933 4934Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4935 4936 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4937 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4938 I've been testing this in NetBSD's make for some weeks. 4939 4940 * Turn Makefile into Makefile.in and make it useful. 4941 4942Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4943 4944 * Imported NetBSD's -current make(1) and resolve conflicts. 4945 4946 * Applied autoconf patches from bmake v2 4947 4948 * Imported clean code base from NetBSD-1.0 4949