12025-06-18 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20250618 4 Merge with NetBSD make, pick up 5 o parse.c: in a warning without location information, 6 print the stack trace 7 82025-06-15 Simon J Gerraty <sjg@beast.crufty.net> 9 10 * VERSION (_MAKE_VERSION): 20250615 11 Merge with NetBSD make, pick up 12 o add on-demand inter-process stack traces 13 o job.c,meta.c: do not discard empty lines in the output of a command 14 o job.c: add job prefix if necessary in non-default filtered mode 15 o parse.c,var.c: skip inter-process stack trace when 16 MAKE_STACK_TRACE=no 17 182025-06-12 Simon J Gerraty <sjg@beast.crufty.net> 19 20 * VERSION (_MAKE_VERSION): 20250612 21 Merge with NetBSD make, pick up 22 o use a common style for unexpected error messages 23 o parse.c: add program name to stack traces from sub-makes 24 add quotes to "in directory" line in stack traces 25 o var.c: check variable names for invalid characters when there 26 are no modifiers to apply. This detects and warns about gmake 27 syntax like: $(addprefix -I, $(LIST)) 28 292025-06-09 Simon J Gerraty <sjg@beast.crufty.net> 30 31 * VERSION (_MAKE_VERSION): 20250606 32 Merge with NetBSD make, pick up 33 o main.c: fix bug in handling of output of children in jobs mode 34 352025-05-28 Simon J Gerraty <sjg@beast.crufty.net> 36 37 * VERSION (_MAKE_VERSION): 20250528 38 Merge with NetBSD make, pick up 39 o show contents of MAKEFLAGS in the stack trace. 40 o main.c: delay warning about bogus -J flag, if we end up in 41 compat mode before the call to InitMaxJobs, the warning isn't 42 necessary. 43 442025-05-25 Simon J Gerraty <sjg@beast.crufty.net> 45 46 * VERSION (_MAKE_VERSION): 20250525 47 Merge with NetBSD make, pick up 48 o main.c: set .CURDIR earlier so it can be reported in some errors. 49 502025-05-20 Simon J Gerraty <sjg@beast.crufty.net> 51 52 * VERSION (_MAKE_VERSION): 20250520 53 Merge with NetBSD make, pick up 54 o rename variables, remove now-redundant comments 55 o job.c: clean up building the shell commands in parallel mode 56 remove timeout for polling in parallel mode 57 o main.c: clean up error message for malformed internal -J option 58 592025-05-11 Simon J Gerraty <sjg@beast.crufty.net> 60 61 * VERSION (_MAKE_VERSION): 20250511 62 Merge with NetBSD make, pick up 63 o job.c: rename token pool variables to be more descriptive 64 move ContinueJobs further up, to eliminate a forward declaration 65 error out if writing to an internal pipe fails 66 clean up constant names and function names 67 use uniform debug log messages for the token pool 68 in the debug log, replace magic numbers with identifiers 69 o main.c: clean up error message for malformed internal -J option 70 o make.c: replace bitset in trace output with descriptive node 71 attributes 72 o targ.c: add end marker for -dg1, -dg2 and -dg3 debug log 73 o var.c: fix order of error messages in the ":?" modifier 74 752025-04-25 Simon J Gerraty <sjg@beast.crufty.net> 76 77 * VERSION (_MAKE_VERSION): 20250424 78 Merge with NetBSD make, pick up 79 o cleanup; replace unsigned int with just unsigned 80 Inline the TMPPAT macro, as it is only needed in a single place 81 o move struct Job from job.h to job.c 82 o job.c: group the code for handling the job token pool 83 avoid excessive values of -j 84 o make.c: fix grammar in debug log message 85 862025-04-14 Simon J Gerraty <sjg@beast.crufty.net> 87 88 * VERSION (_MAKE_VERSION): 20250414 89 Merge with NetBSD make, pick up 90 o job.c: clean up job and output handling 91 o parse.c: after entering POSIX mode, don't leave it again 92 932025-04-11 Simon J Gerraty <sjg@beast.crufty.net> 94 95 * VERSION (_MAKE_VERSION): 20250411 96 Merge with NetBSD make, pick up 97 o convert more messages to file:line: format 98 o for.c: condense code for parsing variable names in .for loops 99 1002025-04-10 Simon J Gerraty <sjg@beast.crufty.net> 101 102 * VERSION (_MAKE_VERSION): 20250410 103 Merge with NetBSD make, pick up 104 o cond.c: remove redundant error counter when parsing a condition 105 1062025-04-04 Simon J Gerraty <sjg@beast.crufty.net> 107 108 * VERSION (_MAKE_VERSION): 20250404 109 Merge with NetBSD make, pick up 110 o make.1: better document meta mode. 111 o var.c: fix error message for undefined variable in conditional. 112 1132025-03-30 Simon J Gerraty <sjg@beast.crufty.net> 114 115 * VERSION (_MAKE_VERSION): 20250330 116 Merge with NetBSD make, pick up 117 o in POSIX compatability mode, give preference to sysV style modifiers. 118 o in stack trace with details and includes, list the current file 119 o parse.c: report file location in more common file:line: format. 120 o var.c: simplify error handling for unknown modifiers 121 let the ":O" and ":t" modifiers fall back to the ":from=to" modifier 122 stop parsing after seeing an unknown modifier in an expression 123 fix error message for unclosed expression and invalid :[...] 124 add details to errors about ::= modifier 125 add details about indirect modifiers to the stack traces 126 in stack traces from target commands, add the command level 127 1282025-03-23 Simon J Gerraty <sjg@beast.crufty.net> 129 130 * VERSION (_MAKE_VERSION): 20250323 131 Merge with NetBSD make, pick up 132 o var.c: just ignore attempts to override a read-only global with 133 the same value. 134 1352025-03-08 Simon J Gerraty <sjg@beast.crufty.net> 136 137 * bsd.after-import.mk: by default generate makefiles 138 closer to BSD style. 139 140 * VERSION (_MAKE_VERSION): 20250308 141 Merge with NetBSD make, pick up 142 o clean up comments and code for parallel mode 143 o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. 144 1452025-02-27 Simon J Gerraty <sjg@beast.crufty.net> 146 147 * VERSION (_MAKE_VERSION): 20250225 148 Merge with NetBSD make, pick up 149 o job.c: reliably remove targets on interrupt, 150 by passing signal to children first. 151 1522025-01-25 Simon J Gerraty <sjg@beast.crufty.net> 153 154 * VERSION (_MAKE_VERSION): 20250125 155 Merge with NetBSD make, sync up below change. 156 157 * unit-tests/Makefile: remove $TMPDIR via .END 158 to avoid failure in test on NFS - since the temp file for the 159 target script is open and thus gets renamed by the server rather 160 than removed. 161 1622025-01-20 Simon J Gerraty <sjg@beast.crufty.net> 163 164 * VERSION (_MAKE_VERSION): 20250120 165 Merge with NetBSD make, pick up 166 o use FORK_FUNCTION so it can be forced to fork when doing coverage. 167 o main.c: avoid memory allocation in error path after exec failure. 168 1692025-01-16 Simon J Gerraty <sjg@beast.crufty.net> 170 171 * VERSION (_MAKE_VERSION): 20250116 172 Merge with NetBSD make, pick up 173 o clarify that undefined expressions are allowed in dependencies 174 o simplify code for evaluating the '!=' variable assignment 175 1762025-01-11 Simon J Gerraty <sjg@beast.crufty.net> 177 178 * VERSION (_MAKE_VERSION): 20250111 179 Merge with NetBSD make, pick up 180 o replace "Malformed conditional" with "Variable is undefined" 181 when appropriate 182 1832025-01-10 Simon J Gerraty <sjg@beast.crufty.net> 184 185 * VERSION (_MAKE_VERSION): 20250110 186 Merge with NetBSD make, pick up 187 o job.c: remove some unnecessary layers in job handling 188 o unit-tests: test expressions based on undefined variables 189 1902025-01-01 Simon J Gerraty <sjg@beast.crufty.net> 191 192 * VERSION (_MAKE_VERSION): 20250101 193 Merge with NetBSD make, pick up 194 o var.c: reduce pointer indirections when unexporting a variable 195 1962024-12-12 Simon J Gerraty <sjg@beast.crufty.net> 197 198 * VERSION (_MAKE_VERSION): 20241212 199 * mk/ updates 200 2012024-11-24 Simon J Gerraty <sjg@beast.crufty.net> 202 203 * VERSION (_MAKE_VERSION): 20241124 204 Merge with NetBSD make, pick up 205 o var.c: fix confusing error message when overriding a read-only 206 variable 207 2082024-11-22 Simon J Gerraty <sjg@beast.crufty.net> 209 210 * VERSION (_MAKE_VERSION): 20241122 211 Merge with NetBSD make, pick up 212 o unit-tests/Makefile: optimize running of tests skip extra cat 213 in 99% of cases. 214 2152024-11-15 Simon J Gerraty <sjg@beast.crufty.net> 216 217 * VERSION (_MAKE_VERSION): 20241114 218 Merge with NetBSD make, pick up 219 o make.1: note that MAKEOBJPREFIX should be absolute path 220 also that it can be set via makefile if suitable care taken. 221 2222024-11-10 Simon J Gerraty <sjg@beast.crufty.net> 223 224 * VERSION (_MAKE_VERSION): 20241110 225 Merge with NetBSD make, pick up 226 o make: allow .../ (search here and above) in 227 .MAKE.MAKEFILE_PREFERENCE and -f argument. 228 2292024-11-03 Simon J Gerraty <sjg@beast.crufty.net> 230 231 * VERSION (_MAKE_VERSION): 20241101 232 Merge with NetBSD make, pick up 233 o parse.c: report filename:linenumber in parse debug output 234 2352024-09-21 Simon J Gerraty <sjg@beast.crufty.net> 236 237 * VERSION (_MAKE_VERSION): 20240921 238 Merge with NetBSD make, pick up 239 o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. 240 241 * Makefile: use genfiles.mk to generate ${MAN} 242 so that it can be tuned for local site. 243 Ensure MAN is defined before including Makefile.inc 244 245 * Makefile: use MK_GEN_MAN to make it easier to control whether we 246 generate ${MAN} 247 2482024-09-16 Simon J Gerraty <sjg@beast.crufty.net> 249 250 * VERSION (_MAKE_VERSION): 20240909 251 252 * arch.c: fix NetBSD PR 58597 253 2542024-09-01 Simon J Gerraty <sjg@beast.crufty.net> 255 256 * Makefile: use SUBDIR.${MK_TESTS} so that we skip 257 unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS 258 259 * VERSION (_MAKE_VERSION): 20240901 260 Merge with NetBSD make, pick up 261 o reduce line length in error messages 262 o var.c: simplify printing of an evaluation stack element 263 2642024-08-29 Simon J Gerraty <sjg@beast.crufty.net> 265 266 * VERSION (_MAKE_VERSION): 20240828 267 Merge with NetBSD make, pick up 268 o add more context to error message about recursive variables 269 o treat recursive variables non-fatally - continue parsing to end 270 of makefile 271 2722024-08-12 Simon J Gerraty <sjg@beast.crufty.net> 273 274 * VERSION (_MAKE_VERSION): 20240808 275 Merge with NetBSD make, pick up 276 o improve some error messages for better clarify and readability 277 2782024-07-22 Simon J Gerraty <sjg@beast.crufty.net> 279 280 * VERSION (_MAKE_VERSION): 20240722 281 Merge with NetBSD make, pick up 282 o job.c: remove dead code 283 2842024-07-21 Simon J Gerraty <sjg@beast.crufty.net> 285 286 * VERSION (_MAKE_VERSION): 20240720 287 Merge with NetBSD make, pick up 288 o compat.c: do not run commands that have parse or evaluation errors. 289 o var.c: remove wrong error message about an undefined variable 290 2912024-07-13 Simon J Gerraty <sjg@beast.crufty.net> 292 293 * cleanup redundant differences from NetBSD make 294 o parse.c: no longer uses mmap 295 o var.c: check __STDC_VERSION__ not __STDC__ 296 2972024-07-12 Simon J Gerraty <sjg@beast.crufty.net> 298 299 * Apply some patches from NetBSD pkgsrc to reduce divergence 300 o meta.c: requires sys/select.h if available 301 o var.c: ensure SIZE_MAX has a value 302 o util.c: ensure SA_RESTART is defined 303 304 * configure.in: use *ksh* rather than just *ksh to match 305 ksh shell specification. 306 307 * unit-tests/Makefile: expand BROKEN_TESTS for ksh and 308 mksh in particular 309 3102024-07-11 Simon J Gerraty <sjg@beast.crufty.net> 311 312 * VERSION (_MAKE_VERSION): 20240711 313 Merge with NetBSD make, pick up 314 o compat.c: allow Compat_RunCommand to also handle very long 315 commands by writing to a temp file when needed. 316 o main.c: extract the temp file logic recently added to Cmd_Exec 317 to Cmd_Argv so it can be leveraged by Compat_RunCommand. 318 3192024-07-09 Simon J Gerraty <sjg@beast.crufty.net> 320 321 * VERSION (_MAKE_VERSION): 20240709 322 Merge with NetBSD make, pick up 323 o error out on parse/evaluation errors in shell commands 324 o var.c: error out on syntax errors in ':M' and ':N' modifiers 325 3262024-07-07 Simon J Gerraty <sjg@beast.crufty.net> 327 328 * VERSION (_MAKE_VERSION): 20240707 329 Merge with NetBSD make, pick up 330 o only generate code for cleanup functions in CLEANUP mode 331 o hash.c: don't track hash table chain lengths during lookup 332 unless debugging 333 o main.c: move initialization of variable scopes to targ.c 334 o var.c: remove Var_End as it is now unnecessary 335 3362024-07-06 Simon J Gerraty <sjg@beast.crufty.net> 337 338 * VERSION (_MAKE_VERSION): 20240706 339 Merge with NetBSD make, pick up 340 o reduce lint comments about ARGSUSED 341 o cond.c: error out on conditions containing the operators '&' and '|' 342 o str.c: error out on a matching malformed matching pattern '[[' 343 o var.c: in error messages, distinguish parsing from evaluating 344 in error messages for anonymous variables, log the value 345 error out on unclosed expressions during parse time 346 3472024-07-04 Simon J Gerraty <sjg@beast.crufty.net> 348 349 * VERSION (_MAKE_VERSION): 20240704 350 Merge with NetBSD make, pick up 351 o add more context information to error messages 352 o main.c: on error, print the targets to be made 353 add detailed exit status to message for failed sub-commands 354 o var.c: error out on the "Bad modifier" error message 355 3562024-07-01 Simon J Gerraty <sjg@beast.crufty.net> 357 358 * VERSION (_MAKE_VERSION): 20240701 359 Merge with NetBSD make, pick up 360 o var.c: add :tt for Title case 361 3622024-06-30 Simon J Gerraty <sjg@beast.crufty.net> 363 364 * configure.in: 20240630 further refine check for whether 365 TZ=Europe/Berlin works 366 367 * VERSION (_MAKE_VERSION): 20240630 368 Merge with NetBSD make, pick up 369 o job.c: reduce use of UNCONST 370 o main.c: add detailed exit status to message for failed sub-commands 371 o var.c: error out on some more syntax errors 372 add more context to "returned non-zero status" message 373 3742024-06-25 Simon J Gerraty <sjg@beast.crufty.net> 375 376 * VERSION (_MAKE_VERSION): 20240625 377 Merge with NetBSD make, pick up 378 o job.c: ensure shellPath is always duped, avoid upsetting free() 379 3802024-06-16 Simon J Gerraty <sjg@beast.crufty.net> 381 382 * VERSION (_MAKE_VERSION): 20240616 383 Merge with NetBSD make, pick up 384 o clean up collection of context information for error messages 385 o in warnings, move the word "warning" to the front 386 o var.c: throw an error on attempt to override an internal 387 read-only variable 388 3892024-06-10 Simon J Gerraty <sjg@beast.crufty.net> 390 391 * VERSION (_MAKE_VERSION): 20240610 392 Merge with NetBSD make, pick up 393 o for.c: remove redundant shortcut for building the .for loop body 394 3952024-06-02 Simon J Gerraty <sjg@beast.crufty.net> 396 397 * VERSION (_MAKE_VERSION): 20240602 398 Merge with NetBSD make, pick up 399 o rename some VarEvalMode constants to better match debug names. 400 o var.c: avoid out-of-bounds read when parsing indirect modifiers. 401 4022024-06-01 Simon J Gerraty <sjg@beast.crufty.net> 403 404 * VERSION (_MAKE_VERSION): 20240601 405 Merge with NetBSD make, pick up 406 o add .export-all rather than allow .export with no argument 407 which can happen accidentally. 408 o if lua is available, run check-expect.lua after unit-tests 409 o main.c: use snprintf rather than strncpy 410 fix memory leak when purging realpath cache. 411 4122024-05-28 Simon J Gerraty <sjg@beast.crufty.net> 413 414 * VERSION (_MAKE_VERSION): 20240528 415 Merge with NetBSD make, pick up 416 o fix a number of memory leaks 417 o replace magic numbers with POSIX FILENO constants 418 o hash.c: remove dead code from HashTable_DeleteEntry 419 o main.c: when complaining about unusable .OBJDIR 420 call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. 421 o parse.c: use fewer technical terms in debug message for dependency 422 4232024-05-20 Simon J Gerraty <sjg@beast.crufty.net> 424 425 * VERSION (_MAKE_VERSION): 426 Merge with NetBSD make, pick up 427 o dir.c: in FindFile restore last search of .CURDIR even for 428 includes, as a number of existing makefiles are broken otherwise. 429 4302024-05-19 Simon J Gerraty <sjg@beast.crufty.net> 431 432 * VERSION (_MAKE_VERSION): 20240519 433 Merge with NetBSD make, pick up 434 o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. 435 Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. 436 o main.c: no need to set .DOTLAST in sysIncPath 437 4382024-05-07 Simon J Gerraty <sjg@beast.crufty.net> 439 440 * VERSION (_MAKE_VERSION): 20240508 441 Merge with NetBSD make, pick up 442 o make: ensure variables set on command line get added to 443 .MAKEOVERRIDES (even if they start with '.') so they are passed to 444 sub-makes. 445 4462024-04-30 Simon J Gerraty <sjg@beast.crufty.net> 447 448 * VERSION (_MAKE_VERSION): 20240430 449 Merge with NetBSD make, pick up 450 o main.c: ensure '.include <makefile>' respects MAKESYSPATH. 451 Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 452 4532024-04-28 Simon J Gerraty <sjg@beast.crufty.net> 454 455 * VERSION (_MAKE_VERSION): 20240428 456 Merge with NetBSD make, pick up 457 o simplify freeing of lists 458 o arch.c: trim pointless comments 459 o var.c: delay variable assignments until actually needed 460 don't reallocate memory after evaluating an expression, result is 461 almost always short-lived. 462 4632024-04-26 Simon J Gerraty <sjg@beast.crufty.net> 464 465 * VERSION (_MAKE_VERSION): 20240426 466 Merge with NetBSD make, pick up 467 o job.c: in debug output, print the directory in which a job 468 failed at same time as failed target so it is more easily found in 469 build log. 470 4712024-04-24 Simon J Gerraty <sjg@beast.crufty.net> 472 473 * VERSION (_MAKE_VERSION): 20240424 474 Merge with NetBSD make, pick up 475 o clean up comments, code and tests 476 4772024-04-23 Simon J Gerraty <sjg@beast.crufty.net> 478 479 * VERSION (_MAKE_VERSION): 20240422 480 Merge with NetBSD make, pick up 481 o var.c: avoid LazyBuf for :*time modifiers. 482 LazyBuf's are not nul terminated so not suitable for passing to 483 functions that expect that. These modifiers are used sparingly so 484 an extra allocation is not a problem. 485 4862024-04-20 Simon J Gerraty <sjg@beast.crufty.net> 487 488 * VERSION (_MAKE_VERSION): 20240420 489 Merge with NetBSD make, pick up 490 o provide more context information for parse/evaluate errors 491 4922024-04-14 Simon J Gerraty <sjg@beast.crufty.net> 493 494 * VERSION (_MAKE_VERSION): 20240414 495 Merge with NetBSD make, pick up 496 o parse.c: print -dp debug info earlier so we see which 497 .if or .for line is being parsed. 498 4992024-04-04 Simon J Gerraty <sjg@beast.crufty.net> 500 501 * VERSION (_MAKE_VERSION): 20240404 502 Merge with NetBSD make, pick up 503 o fix some unit tests for Cygwin 504 o parse.c: exit immediately after reading a null byte from a makefile 505 506 * fix generation of bmake.cat1 507 5082024-03-19 Simon J Gerraty <sjg@beast.crufty.net> 509 510 * VERSION (_MAKE_VERSION): 20240314 511 Add/Improve support for Cygwin 512 o uname -s output isn't useful so allow configure to 513 set FORCE_MAKE_OS - to force the value of .MAKE.OS 514 and use Cygwin which matches uname -o 515 o fix some unit-tests for Cygwin 516 5172024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 518 519 * boot-strap: tests can take a long time; use a cookie to 520 skip them if bmake has not been updated since tests last 521 ran successfully. 522 523 * Makefile: Cygwin handles MANTARGET man 524 525 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 526 5272024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 528 529 * VERSION (_MAKE_VERSION): 20240309 530 Merge with NetBSD make, pick up 531 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 532 this allows a .ERROR target to ignore the case of 533 .ERROR_EXIT==6 which just means that the build actually 534 failed somewhere else. 535 5362024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 537 538 * VERSION (_MAKE_VERSION): 20240303 539 540 * var.c: on IRIX we need both inttypes.h and stdint.h 541 5422024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 543 544 * VERSION (_MAKE_VERSION): 20240301 545 Merge with NetBSD make, pick up 546 o export variables with value from target scope 547 when appropriate. 548 5492024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 550 551 * VERSION (_MAKE_VERSION): 20240212 552 Merge with NetBSD make, pick up 553 o remove unneeded conditional-compilation toggles 554 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 555 GMAKEEXPORT NO_REGEX and SUNSHCMD 556 557 * configure.in: add check for regex.h 558 559 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 560 5612024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 562 563 * VERSION (_MAKE_VERSION): 20240204 564 Merge with NetBSD make, pick up 565 o var.c: fix some lint (-dL) mode parsing issues 566 5672024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 568 569 * VERSION: (_MAKE_VERSION): 20240202 570 Merge with NetBSD make, pick up 571 o make.1: note that arg to :D and :U can be empty 572 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 573 5742024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 575 576 * VERSION (_MAKE_VERSION): 20240108 577 Merge with NetBSD make, pick up 578 o miscellaneous cleanups 579 5802024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 581 582 * VERSION (_MAKE_VERSION): 20240106 583 Merge with NetBSD make, pick up 584 o fix duplicate progname when reporting an unknown target 585 o unit tests for Cmd_Exec using temp file 586 5872024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 588 589 * VERSION (_MAKE_VERSION): 20240105 590 Merge with NetBSD make, pick up 591 o main.c: Cmd_Exec write cmd to a file if too big 592 avoid blowing commandline/env limits 593 5942024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 595 596 * VERSION (_MAKE_VERSION): 20240101 597 o util.c: flesh out more of strftime 598 * configure.in: add --with-bmake-strftime 599 it is not a full implementation but enough to pass all 600 the unit-tests. 601 * parse.c: LoadFile do not append \n to empty buffer. 602 6032023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 604 605 * VERSION (_MAKE_VERSION): 20231230 606 Merge with NetBSD make, pick up 607 o simplify memory allocation for string buffers 608 o fix declared types of list nodes 609 o suff.c: clean up freeing of suffixes 610 o var.c: simplify debug message for the ':@var@...@' modifier 611 clean up variable handling 612 6132023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 614 615 * VERSION (_MAKE_VERSION): 20231226 616 Merge with NetBSD make, pick up 617 o compat.c: ensure make's output is correctly ordered with that of 618 the target when not going to a tty 619 o main.c: check for shellPath whether to call Shell_Init() 620 6212023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 622 623 * VERSION (_MAKE_VERSION): 20231224 624 Merge with NetBSD make, pick up 625 o compat.c: check for shellPath whether to call Shell_Init() 626 tweak the unit test to detect the bug thus fixed. 627 o make.1: do not claim .SHELL is only used by jobs mode. 628 6292023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 630 631 * VERSION (_MAKE_VERSION): 20231220 632 Merge with NetBSD make, pick up 633 o str.c: speed up pattern matching in the ':M' modifier 634 o var.c: fix confusing debug logging when deleting a variable 635 use consistent debug messages style when ignoring variables 636 6372023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 638 639 * VERSION (_MAKE_VERSION): 20231210 640 Merge with NetBSD make, pick up 641 o var.c: avoid segfault on empty :C match expression 642 explain in debug log why variable assignment is ignored. 643 6442023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 645 646 * VERSION (_MAKE_VERSION): 20231208 647 Merge with NetBSD make, pick up 648 o var.c: ensure fromCmd is set correctly for variables set on 649 command line. 650 6512023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 652 653 * configure.in: disable generation of 'makefile' for 654 Darwin by default. 655 656 * boot-strap: docuement --without-makefile 657 6582023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 659 660 * VERSION (_MAKE_VERSION): 20231124 661 Merge with NetBSD make, pick up 662 o main.c: cleanup processing of -j 663 fix lint warning about strchr 664 o var.c: more accurate error message for invalid ':mtime' argument 665 cleanup :[...] modifier 666 avoid reading beyond substring when comparing 667 o unit-tests cover all cases of :mtime, test and explain exporting 668 of variables 669 o cleanup comments 670 6712023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 672 673 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 674 $FreeBSD$ tag, so avoid adding it. 675 6762023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 677 678 * VERSION (_MAKE_VERSION): 20230909 679 Merge with NetBSD make, pick up 680 o main.c: allow -j to compute a multiple of ncpu 681 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 682 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 683 _SC_NPROCESSORS_ONLN 684 .MAKE.JOBS.C will be "yes" if -jC is supported 685 6862023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 687 688 * VERSION (_MAKE_VERSION): 20230820 689 Merge with NetBSD make, pick up 690 o make.1: note that :localtime is better for %s 691 o parse.c: improve error messages for invalid input. 692 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 693 correct result, it is still better to use %s:L:localtime. 694 6952023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 696 697 * VERSION (_MAKE_VERSION): 20230818 698 Merge with NetBSD make, pick up 699 o meta.c: meta_ignore - check raw path against metaIgnorePaths 700 to potentially skip call to realpath. 701 o var.c: be strict when parsing the argument of the ':mtime' modifier 702 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 703 should be used to get an equivalent value to time(3). 704 7052023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 706 707 * VERSION (_MAKE_VERSION): 20230816 708 Merge with NetBSD make, pick up 709 o cond.c: clean up multiple-inclusion guards 710 7112023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 712 713 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 714 if configure cannot work out how to control TZ. 715 Remove varmod-localtime from BROKEN_TESTS for IRIX* 716 7172023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 718 719 * VERSION (_MAKE_VERSION): 20230723 720 721 * configure.in: fix the test for wether TZ=Europe/Berlin works. 722 Depending on the time of year, if run between 22:00 and 00:00 UTC 723 the check in configure would fail incorrectly. 724 Take the day into account as well. 725 7262023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 727 728 * VERSION (_MAKE_VERSION): 20230711 729 Merge with NetBSD make, pick up 730 o make.1: clean up wording, clarify scope of '!' in conditions 731 7322023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 733 734 * make-bootstrap.sh.in: set prefix 735 If configure is run using ksh we get unexpanded ${prefix} in 736 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 737 correct result. 738 7392023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 740 741 * VERSION (_MAKE_VERSION): 20230711 742 bump version for IRIX tweaks 743 744 * make.h: undef OP_NONE if defined 745 746 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 747 748 * configure.in: override INSTALL on IRIX 749 7502023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 751 752 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 753 7542023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 755 756 * VERSION (_MAKE_VERSION): 20230622 757 Merge with NetBSD make, pick up 758 o optimize string matching for ':M' and ':N' 759 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 760 7612023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 762 763 * VERSION (_MAKE_VERSION): 20230621 764 Merge with NetBSD make, pick up 765 o more extensive tests for include guards 766 o parse.c: if a guard is already defined a file that uses the same 767 guard is still guarded by it. 768 7692023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 770 771 * VERSION (_MAKE_VERSION): 20230620 772 Merge with NetBSD make, pick up 773 o allow guards to be targets as well as variables 774 The guard targets may include variable references like 775 __${.PARSEDIR:tA}/${.PARSEFILE}__ 776 7772023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 778 779 * VERSION (_MAKE_VERSION): 20230619 780 Merge with NetBSD make, pick up 781 o unit test for .undef of readOnly vars 782 o optimization for makefiles protected from multiple-inclusion 783 skip even opening the file after first include. 784 Initially this only handles makefiles guarded by a variable 785 target guards are next. 786 7872023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 788 789 * VERSION (_MAKE_VERSION): 20230616 790 Merge with NetBSD make, pick up 791 o var.c: do not allow delete of readOnly variable 792 7932023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 794 795 * VERSION (_MAKE_VERSION): 20230601 796 Merge with NetBSD make, pick up 797 o parse.c: .break takes no args 798 o lots of unit test updates 799 8002023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 801 802 * unit-tests/Makefile: skip tests that require /dev/filemon 803 if it does not exists - issue a warning. 804 8052023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 806 807 * VERSION (_MAKE_VERSION): 20230522 808 Fix building on darwin ppc 809 810 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 811 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 812 8132023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 814 815 * VERSION (_MAKE_VERSION): 20230515 816 817 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 818 compile filemon_ktrace.c 819 8202023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 821 822 * VERSION (_MAKE_VERSION): 20230512 823 o sys.dirdeps.mk - broke after-import target 824 8252023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 826 827 * VERSION (_MAKE_VERSION): 20230510 828 Merge with NetBSD make, pick up 829 o parse.c: don't print null filename in stack traces 830 o var.c: :mtime operate on each word in variable value 831 8322023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 833 834 * VERSION (_MAKE_VERSION): 20230509 835 Merge with NetBSD make, pick up 836 o for.c: skip syntactically wrong .for loops 837 o var.c: allow for :gmtime=${mtime} 838 add :mtime[=timestamp] where timestamp is used if stat(2) 839 fails, if :mtime=error stat(2) failure causes error. 840 8412023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 842 843 * VERSION (_MAKE_VERSION): 20230504 844 Merge with NetBSD make, pick up 845 o compat.c: fix compile on NetBSD 7.2 846 o make.1: fix documentation of .PREFIX to match reality and POSIX 847 o unit-tests: improved var-scope-local 848 8492023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 850 851 * VERSION (_MAKE_VERSION): 20230414 852 Merge with NetBSD make, pick up 853 o minor cleanup 854 8552023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 856 857 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 858 unlimited results in an insane number (0x7fffffffffffffff). 859 If BMAKE_NOFILE_MAX is defined, use that instead. 860 8612023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 862 863 * VERSION (_MAKE_VERSION): 20230321 864 Merge with NetBSD make, pick up 865 * make.1: document seemingly unexplained Error code 6. 866 8672023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 868 869 * VERSION (_MAKE_VERSION): 20230317 870 Merge with NetBSD make, pick up 871 o compat.c: CompatDeleteTarget skip .PHONY targets to be 872 consistent with JobDeleteTarget. 873 o job.c: fix memory leak in handling sysv :from=to modifiers 874 8752023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 876 877 * VERSION (_MAKE_VERSION): 20230303 878 Merge with NetBSD make, pick up 879 o several updated unit-tests 880 8812023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 882 883 * VERSION (_MAKE_VERSION): 20230222 884 Merge with NetBSD make, pick up 885 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 886 8872023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 888 889 * VERSION (_MAKE_VERSION): 20230218 890 Merge with NetBSD make, pick up 891 o var.c: fix parsing of unevaluated subexpressions with 892 unbalanced '{}' 893 8942023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 895 896 * VERSION (_MAKE_VERSION): 20230215 897 Merge with NetBSD make, pick up 898 o inline macros for some variable names 899 o cond.c: reduce complexity of evaluating expressions 900 9012023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 902 903 * VERSION (_MAKE_VERSION): 20230208 904 Merge with NetBSD make, pick up 905 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 906 when it has been used within conditional expressions 907 9082023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 909 910 * VERSION (_MAKE_VERSION): 20230127 911 912 * install-sh: if making directories ensure umask is set 913 to match mode. 914 915 * Makefile: use DIRMODE for directories and 916 NONBINMODE for man pages and mk files 917 9182023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 919 920 * VERSION (_MAKE_VERSION): 20230126 921 Merge with NetBSD make, pick up 922 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 923 should be read-only. 924 9252023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 926 927 * VERSION (_MAKE_VERSION): 20230123 928 Merge with NetBSD make, pick up 929 o .[NO]READONLY: for control of read-only variables 930 o .SYSPATH: for controlling the path searched for makefiles 931 9322023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 933 934 * VERSION (_MAKE_VERSION): 20230120 935 Merge with NetBSD make, pick up 936 o allow for white-space between command specifiers @+- 937 o add more details to warning 'Extra targets ignored' 938 9392023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 940 941 * machine.sh: leverage os.sh rather than duplicate 942 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 943 for that purpose for the past decade or so. 944 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 945 9462023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 947 948 * VERSION (_MAKE_VERSION): 20230101 949 Merge with NetBSD make, pick up 950 o cleanup comments, inline some LazyBuf_ methods 951 o unit-tests/ add/improve comments in tests 952 o make.1: sync list of built-in variables with reality 953 sort list of built-in variables 954 reduce indentation of the long list of variable names 955 use consistent markup for boolean flags 956 move description of .MAKE.MODE below the .MAKE.META block 957 clarify in which case an expression may omit braces 958 9592022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 960 961 * VERSION (_MAKE_VERSION): 20221024 962 Merge with NetBSD make, pick up 963 o change return type of unlink_file back to int 964 9652022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 966 967 * Makefile: Darwin and Linux can handle MANTARGET=man 968 9692022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 970 971 * VERSION (_MAKE_VERSION): 20220928 972 Merge with NetBSD make, pick up 973 o fix more ignored returns from snprintf 974 o compile with higher warnings 975 9762022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 977 978 * main.c meta.c: do not ignore return from snprintf 979 980 * meta.c strlcpy.c: we need prototype for strlcpy 981 982 * sigcompat.c: fix unused function warnings 983 9842022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 985 986 * VERSION (_MAKE_VERSION): 20220924 987 Merge with NetBSD make, pick up 988 o fix bug in .break reset of conditional depth 989 o overhaul and simplify tracking of conditional depth 990 9912022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 992 993 * VERSION (_MAKE_VERSION): 20220912 994 Merge with NetBSD make, pick up 995 o man page updates 996 9972022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 998 999 * VERSION (_MAKE_VERSION): 20220909 1000 Merge with NetBSD make, pick up 1001 o update unit-tests to handle deprecation of egrep 1002 o cond.c: add more details to error message for numeric comparison 1003 1004 * configure.in: allow for deprecation of egrep 1005 1006 * Makefile: Linux can handle MANTARGET=man 1007 10082022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 1009 1010 * VERSION (_MAKE_VERSION): 20220903 1011 Merge with NetBSD make, pick up 1012 o job.c: fix handling of null bytes in output 1013 10142022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1015 1016 * VERSION (_MAKE_VERSION): 20220902 1017 Merge with NetBSD make, pick up 1018 o Allow .break to terminate a .for loop early 1019 10202022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1021 1022 * VERSION (_MAKE_VERSION): 20220901 1023 Merge with NetBSD make, pick up 1024 o var.c: fix out-of-bounds errors when parsing 1025 10262022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1027 1028 * VERSION (_MAKE_VERSION): 20220824 1029 Merge with NetBSD make, pick up 1030 o var.c: revert change to modifier parsing that breaks 1031 shell variable references within ':@var@body@' 1032 o adjust unit-tests 1033 10342022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 1035 1036 * VERSION (_MAKE_VERSION): 20220818 1037 Merge with NetBSD make, pick up 1038 o fix exit status for '-q' (since 1994) 1039 10402022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1041 1042 * VERSION (_MAKE_VERSION): 20220808 1043 Merge with NetBSD make, pick up 1044 o var.c: fix parsing of modifiers containing unbalanced subexpressions 1045 extract parsing of ':D' and ':U' modifiers into separate function 1046 10472022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1048 1049 * VERSION (_MAKE_VERSION): 20220726 1050 1051 * Auto-create objdir for bmake/unit-tests if appropriate 1052 10532022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 1054 1055 * VERSION (_MAKE_VERSION): 20220724 1056 Merge with NetBSD make, pick up 1057 o make.1: describe variable assignment and evaluation more precisely 1058 o parse.c: fix out-of-bounds read when parsing an invalid line 1059 o var.c: simplify return type of IsShortVarnameValid 1060 10612022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 1062 1063 * VERSION (_MAKE_VERSION): 20220612 1064 Merge with NetBSD make, pick up 1065 o allow to randomize build order of targets 1066 .MAKE.MODE += randomize-targets can help uncover dependency bugs 1067 within a makefile. 1068 o compat.c: rename Compat_Run to Compat_MakeAll 1069 o make.c: inline MakeBuildParent 1070 inline make_abort, improve error details 1071 o parse.c: reorganize Parse_Error 1072 fix memory leak in wildcard targets and sources 1073 separate cases in HandleDependencyTargetMundane 1074 extract HandleSingleDependencyTargetMundane 1075 rename loadfile to LoadFile 1076 split IncludeFile into separate functions 1077 condense code for searching a file in the paths 1078 fix off-by-one error in buffer for .WAIT nodes 1079 o str.c: condense Str_Match 1080 make code for string matching syntactically more consistent 1081 10822022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1083 1084 * VERSION (_MAKE_VERSION): 20220418 1085 Merge with NetBSD make, pick up 1086 o ignore '.POSIX:' if not in first non-comment line 1087 of Makefile as specified by POSIX. 1088 add unit-tests for above. 1089 o meta.c: make it easier to find usage of identifiers 1090 o targ.c: add .USEBEFORE to Targ_PrintType 1091 10922022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 1093 1094 * VERSION (_MAKE_VERSION): 20220414 1095 1096 * unit-tests/Makefile: simplify checks for shells with 1097 BROKEN_TESTS, this helps with other Linux distros that 1098 use dash. 1099 11002022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1101 1102 * VERSION (_MAKE_VERSION): 20220330 1103 Merge with NetBSD make, pick up 1104 o var.c: fix spacing, and a typo in a test 1105 11062022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 1107 1108 * VERSION (_MAKE_VERSION): 20220326 1109 Merge with NetBSD make, pick up 1110 o parse.c: try to include 'posix.mk' the first time 1111 .POSIX: is encountered, to allow for beter POSIX compliance. 1112 o var.c: make debug logs more readable 1113 prefer 'long long' over 'long' on 32-bit C99 platforms 1114 fix crash on .undef of an environment variable 1115 11162022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 1117 1118 * VERSION (_MAKE_VERSION): 20220303 1119 Merge with NetBSD make, pick up 1120 o tell meta mode unit tests not to expect filemon 1121 o cond.c: make debug logging for comparisons less technical 1122 o lst.c: fix mem leak in Lst_Remove 1123 o str.c: make code for string matching syntactically more consistent 1124 o var.c: simplify ParseModifier_Match 1125 11262022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 1127 1128 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 1129 1130 * VERSION (_MAKE_VERSION): 20220214 1131 Merge with NetBSD make, pick up 1132 o cond.c: simplify control flow in CondParser_Comparison 1133 o job.c: fix echoing of command with '-' in silent target in jobs mode 1134 o main.c: prefix the warning about read-only .OBJDIR with a colon 1135 o parse.c: remove redundant conditions 1136 o var.c: simplify control flow in ModifyWord_SysVSubst 1137 11382022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1139 1140 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 1141 is any chance we have dash as .SHELL 1142 1143 * VERSION (_MAKE_VERSION): 20220208 1144 Merge with NetBSD make, pick up 1145 o more unit tests 1146 o meta.c: use a variable to hold command line to be filtered 1147 to avoid any side effects from content of command line. 1148 11492022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 1150 1151 * VERSION (_MAKE_VERSION): 20220204 1152 Merge with NetBSD make, pick up 1153 o use unsigned consistently for line numbers, avoid the need for %z 1154 o parse.c: do not step off end of input in Parse_IsVar 1155 when checking for target local variable assignments 1156 11572022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 1158 1159 * VERSION (_MAKE_VERSION): 20220202 1160 Merge with NetBSD make, pick up 1161 o remove redundant declaration of HashIter_Init 1162 o make DEBUG0 simpler 1163 11642022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1165 1166 * cast gn->lineno to avoid %z 1167 1168 * VERSION (_MAKE_VERSION): 20220130 1169 Merge with NetBSD make, pick up 1170 o more unit tests 1171 o make GNode lineno unsigned to please lint 1172 o print location of recursive variable references in commands 1173 o print "stack trace" (makefile includes) on fatal errors 1174 o make.1: refine documentation for target local assignments 1175 11762022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 1177 1178 * VERSION (_MAKE_VERSION): 20220128 1179 Merge with NetBSD make, pick up 1180 o inline functions called only once 1181 o for.c: clean up AddEscape for building the body of a .for loop 1182 o hash.c: merge duplicate code for finding an entry in a hash table 1183 replace HashEntry_KeyEquals with strncmp 1184 o make.1: document quirks of target local variable assignments. 1185 o parse.c: cleanup white-space 1186 11872022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1188 1189 * VERSION (_MAKE_VERSION): 20220126 1190 Merge with NetBSD make, pick up 1191 o allow setting target local variables 1192 o more unit tests 1193 o add missing newline after "cannot continue" message 1194 o meta.c: clean up eat_dots 1195 o parse.c: fix filename in warning about duplicate script 1196 o var.c: when expanding nested variables, check simple things first 1197 11982022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 1199 1200 * VERSION (_MAKE_VERSION): 20220116 1201 Merge with NetBSD make, pick up 1202 o fix for unit-tests/varname-makeflags on non-BSD systems 1203 o use Var_Exists rather than Var_Value where appropriate 1204 o remove unnecessary functions for expanding variable names 1205 o cond.c: inline EvalBare 1206 o main.c: lint cleanup 1207 o parse.c: condense code in Parse_IsVar 1208 use islower for parsing directives (none have upper case) 1209 12102022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1211 1212 * VERSION (_MAKE_VERSION): 20220112 1213 Merge with NetBSD make, pick up 1214 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 1215 comparion, rarely needed but useful when it is. 1216 12172022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1218 1219 * VERSION (_MAKE_VERSION): 20220110 1220 Merge with NetBSD make, pick up 1221 o inline Buf_Clear 1222 o remove redundant braces 1223 o rename and inline Targ_Precious 1224 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 1225 o for.c: clean up handling of .for loops 1226 fix reported line numbers of continuation lines 1227 add details about .for loop variables to stack traces 1228 o job.c: reduce code for initializing error handling in shell 1229 o main.c: in Cmd_Exec, return error message instead of format string 1230 have as few statements as possible between va_start and va_end 1231 add debug logging for capturing the output of external commands 1232 o make.c: use consistent variable names for varargs 1233 o make_malloc.c: remove duplicate code from bmake_strdup 1234 o parse.c: add missing printflike annotations 1235 remove redundant lines from stack traces 1236 fix stack traces in -dp mode 1237 reduce confusing code in ParseForLoop 1238 fix line number in debug log after returning from a file 1239 rename IFile and its fields to match their actual content 1240 clean up ParseDependencySources 1241 o var.c: shorten ApplyModifier_Assign 1242 rename is_shell_metachar, fix character conversion warning 1243 merge calls to ApplyModifier_Time 1244 merge duplicate code for modifiers 'gmtime' and 'localtime' 1245 12462022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 1247 1248 * parse.c: loadfile restore extra byte in buffer. 1249 12502022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1251 1252 * VERSION (_MAKE_VERSION): 20220101 1253 Merge with NetBSD make, pick up 1254 o more unit-tests 1255 o remove unnecessary words from command line options in CmdOpts 1256 o rename eunlink to unlink_file 1257 o cond.c: make ParseWord in condition parser simpler 1258 internally return false for irrelevant leaves in conditions 1259 replace table for function lookup in conditions with simple code 1260 merge duplicate types CondEvalResult and CondResult 1261 o for.c: clean up handling of .for loops and .include directives 1262 o main.c: constify cached_realpath 1263 clean up Cmd_Exec 1264 o parse.c: sync API documentation 1265 fix error message when reading more than 1 GB from stdin 1266 clean up parsing of makefiles 1267 fix line number in error message about open conditionals 1268 unexport types VarAssignOp and VarAssign 1269 clean up function names 1270 remove redundant parameters in dependency parsing functions 1271 reduce scope of the list of wildcard target names 1272 extract OP_NOTARGET into separate function 1273 clean up variable names for parsing dependency lines 1274 make debug logging a bit more human-friendly 1275 o var.c: condense code in ApplyModifier_Assign 1276 12772021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1278 1279 * VERSION (_MAKE_VERSION): 20211221 1280 Merge with NetBSD make, pick up 1281 o more unit-tests 1282 o style cleanup 1283 o in CLEANUP mode, free interned strings at the very end 1284 o fix memory leak for filenames in .for loops 1285 o buf.c: avoid memory leak 1286 o cond.c: condense CondParser_ComparisonOp 1287 o hash.c: change return type of HashTable_Set to void 1288 o job.c: change return type of Compat_RunCommand from int to bool 1289 o main.c: remove bmake_free 1290 o parse.c: condense repetetive code in ParseDirective 1291 remove dead code for handling traditional include directives 1292 clean up parsing of variable assignments 1293 remove unreachable code for parsing the dependency operator 1294 clean up loading of files 1295 fix memory leak in IncludeFile 1296 o var.c: fix memory leak when parsing a variable name 1297 fix memory leak from ${.SUFFIXES} 1298 reduce memory allocation in modifier ':?' and ':C' 1299 condense RegexReplace for the modifier ':C' and avoid strlen 1300 merge duplicate code for memory handling in Var_Parse 1301 distinguish between short-lived and environment variables 1302 rename VarFreeEnv to VarFreeShortLived 1303 13042021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 1305 1306 * cond.c: fix mem leak in CondParser_Leaf 1307 13082021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1309 1310 * VERSION (_MAKE_VERSION): 20211212 1311 Merge with NetBSD make, pick up 1312 o rename Parse_SetInput to Parse_PushInput 1313 o remove remove period from end of error messages and warnings 1314 to be more consistent 1315 o arch.c: use simpler memory management for parsing archive members 1316 o cond.c: rework and reduce recursion 1317 o for.c: rename some functions to better reflect purpose 1318 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 1319 o var.c: in parse errors, mark whitespace more clearly 1320 inline ParseEmptyArg into CondParser_FuncCallEmpty 1321 minimize calls to LazyBuf_Get in ParseVarnameLong 1322 treat .SUFFIXES as a read-only variable 1323 13242021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 1325 1326 * VERSION (_MAKE_VERSION): 20211207 1327 Merge with NetBSD make, pick up 1328 o inline HashIter_Init 1329 o parse.c: inline common subexpression in ParseRawLine 1330 o var.c: merge branches for modifiers ':D' and ':U' 1331 extract common code into Expr_Words 1332 extract common code into Expr_Str 1333 move low-level implementation details out of Var_Parse 1334 13352021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1336 1337 * VERSION (_MAKE_VERSION): 20211206 1338 Merge with NetBSD make, pick up 1339 o add unit-tests/varmod-loop-delete 1340 o for.c: inline Str_Words - reduce memory allocation 1341 o parse.c: do not try to expand fixed variable names 1342 only allocate the name of an included file if necessary 1343 clean up ParseInclude 1344 o var.c: fix use-after-free in modifier ':@' 1345 save a memory allocation in each modifier ':O' and ':u' 1346 save a memory allocation in the modifier ':[...]' 1347 in UnexportVars, replace Str_Words with Substring_Words to 1348 reduce allocations and copying. 1349 13502021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 1351 1352 * VERSION (_MAKE_VERSION): 20211204 1353 Merge with NetBSD make, pick up 1354 o flesh out a number of tests 1355 o replace enums with bitfields, this simplifies a lot of code. 1356 o var.c: refactor ParseModifierPartSubst 1357 13582021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 1359 1360 * VERSION (_MAKE_VERSION): 20211024 1361 Merge with NetBSD make, pick up 1362 o Punt on write errors - ENOSPC etc. 1363 13642021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1365 1366 * configure.in: use_defshell, set both DEFSHELL_INDEX 1367 and defshell_path if appropriate. 1368 This makes it easier to use say the KSH specification with 1369 and alternate path for the shell. 1370 1371 * configure.in compat.c: for SCO we need to force UseShell 1372 1373 * configure.in: SCO /bin/sh is not usable, provide a list of 1374 alternatives for use as .SHELL. 1375 We still have to mark some tests as broken, plus more if we end up 1376 with ksh as .SHELL. 1377 Issue a warning about skipped tests. 1378 1379 * boot-strap: leave TOOL_DIFF to configure 1380 1381 * configure.in: on SCO native cc is not usable, 1382 gcc is to be found in /usr/gnu/bin 1383 and while ancient is at least able to compile bmake. 1384 Thus we add /usr/gnu/bin to PATH if it exists, and later 1385 check if $CC would have been found via $PATH. 1386 If not we set CC to the full path of $CC. 1387 Also gnu diff is known to support -u, so if it exists use it. 1388 1389 * configure.in: move getopt to AC_REPLACE_FUNCS 1390 also add AC_C_INLINE - in an attempt to compile using 1391 native cc on SCO. 1392 1393 * configure.in: check for stresep as well as strsep, since we 1394 define the later to the former if necessary, and if we have to 1395 provide stresep we also need to provide a prototype. 1396 1397 * configure.in: we no longer need to worry about 1398 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 1399 1400 * make.h: make sure we have __RCSID 1401 1402 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 1403 can control it. 1404 14052021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 1406 1407 * VERSION: 20211020 1408 Merge with NetBSD make, pick up 1409 o confirm sync of unit-tests 1410 14112021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1412 1413 * configure.in: check if timezone Europe/Berlin is supported 1414 if not try UTC-1 1415 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 1416 symlink unit-tests -> ../unit-tests/obj so that 1417 unit-tests/Makefile.config is put in the right place. 1418 * refine filtering of .OBJDIR in unit-tests 1419 14202021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 1421 1422 * Fix unit-tests on Minix 3.2.0 1423 o job.c: do not punt if read of token pipe fails for EAGAIN. 1424 On Minix at least, we are not ready to read the childExitJob pipe 1425 when poll says we are. 1426 There should actually be no reason for this pipe to be 1427 non-blocking, but while that works fine on {Net,Free}BSD it 1428 breaks another test case on Minix. 1429 o unit-tests/Makefile: deal with variants of error messages 1430 and use of obj as .OBJDIR 1431 14322021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 1433 1434 * configure.in: add sigaction to AC_REPLACE_FUNCS 1435 we also need to check for sigaddset etc just for the benefit of 1436 sigact.c 1437 1438 * Add sigact.c as sigaction.c so this "just works". 1439 This should have been done back when bmake_signal started using 1440 sigaction (I only just noticed that sigact.c wasn't here ;-) 1441 Note: I no longer have access to any system where this would matter. 1442 14432021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 1444 1445 * VERSION (_MAKE_VERSION): 20211011 1446 1447 * Makefile: cleanup a little 1448 1449 * configure.in: check for sigsetmask 1450 14512021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1452 1453 * VERSION (_MAKE_VERSION): 20211001 1454 Merge with NetBSD make, pick up 1455 o reduce locations reducing text size 1456 o remove unnecessary const 1457 o cond.c: fix lint warning on i386 1458 do not allow unquoted 'left == right' after modifier ':?' 1459 o hash.c: fix build for DEBUG_HASH_LOOKUP 1460 o var.c: fix memory leak in error case of the ':?' modifier 1461 14622021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1463 1464 * VERSION (_MAKE_VERSION): 20210911 1465 Merge with NetBSD make, pick up 1466 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 1467 14682021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 1469 1470 * VERSION (_MAKE_VERSION): 20210906 1471 Merge with NetBSD make, pick up 1472 o more unit tests 1473 o lint cleanup 1474 o rename some functions to better fit purpose 1475 o for.c: cleanup - remove unnecessary optimization 1476 fix embedded newlines 1477 o parse.c: correct case for CVS/RCS 1478 14792021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 1480 1481 * VERSION (_MAKE_VERSION): 20210808 1482 Merge with NetBSD make, pick up 1483 o var.c: remove redundant initialization in ApplyModifier_Order 1484 1485 * mk/options.mk: issue warning for incorrect usage 1486 14872021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1488 1489 * var.c: use long for :On if we don't have a 64bit int type 1490 1491 * VERSION (_MAKE_VERSION): 20210803 1492 Merge with NetBSD make, pick up 1493 o rework varmod-order tests to avoid qsort instability 1494 o make.1: clarify :On entry 1495 14962021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1497 1498 * VERSION (_MAKE_VERSION): 20210731 1499 Merge with NetBSD make, pick up 1500 o fix some lint issues 1501 o more unit tests 1502 o var.c: rework of ApplyModifier_Order 1503 15042021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1505 1506 * util.c: add strto*l if HAVE_STRTO*L not defined 1507 1508 * VERSION (_MAKE_VERSION): 20210730 1509 Merge with NetBSD make, pick up 1510 o var.c: add :On and :Orn for numeric sort 1511 disabled if no 64bit type available. 1512 o _strtol.h: to implement strto*l functions 1513 15142021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1515 1516 * VERSION (_MAKE_VERSION): 20210704 1517 Merge with NetBSD make, pick up 1518 o unit-tests: fix some tests to be more portable 1519 - job-output-null not all shells do the same number of write calls 1520 - objdir-writable if TMPDIR is set; /tmp may not be usable 1521 15222021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1523 1524 * VERSION (_MAKE_VERSION): 20210701 1525 Merge with NetBSD make, pick up 1526 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1527 some tests just cannot work in some environments. 1528 o buf.c: simpler upper bound for length in Buf_AddInt 1529 o cond.c: fix grammar in error message for malformed conditional 1530 o for.c: prevent newline injection (from ${.newline}) in .for loops 1531 o var.c: use more practical data type in RegexReplace 1532 (avoid need for %zu) 1533 extract RegexReplace from ModifyWord_SubstRegex 1534 15352021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1536 1537 * VERSION (_MAKE_VERSION): 20210621 1538 Merge with NetBSD make, pick up 1539 o var.c: only report error for unmatched regex subexpression 1540 when linting (-dL) since we cannot tell when an unmatched 1541 subexpression is an expected result. 1542 o move unmatched regex subexpression tests to 1543 varmod-subst-regex.mk and enable strict (lint) mode 1544 15452021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1546 1547 * VERSION (_MAKE_VERSION): 20210616 1548 Merge with NetBSD make, pick up 1549 o more unit tests 1550 o cond.c: rename If_Eval to EvalBare 1551 improve function names for parsing conditions 1552 o job.c: fix error handling of targets that cannot be made 1553 o var.c: uncompress code in ApplyModifier_Unique 1554 15552021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1556 1557 * VERSION (_MAKE_VERSION): 20210518 1558 Merge with NetBSD make, pick up 1559 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1560 o job.c: Print -de error information when running multiple jobs 1561 15622021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1563 1564 * VERSION (_MAKE_VERSION): 20210420 1565 Merge with NetBSD make, pick up 1566 o use C99 bool type 1567 o convert VarEvalFlags back into an enum 1568 o cond.c: do not complain when skipping the condition 'no >= 10' 1569 o hash.c: avoid allocating memory for simple variable names 1570 o job.c: use distinct wording for writing to the shell commands file 1571 remove type name for the abort status in job handling 1572 rename PrintOutput to PrintFilteredOutput to avoid confusion 1573 o main.c: avoid double slash in name of temporary directory 1574 o var.c: use straight quotes for error 'Bad conditional expression' 1575 reduce memory allocations in the modifiers ':D' and ':U' 1576 rename members of ModifyWord_LoopArgs 1577 clean up pattern flags for the modifiers ':S' and ':C' 1578 reduce memory allocation and strlen calls in modifier ':from=to' 1579 in the ':Q' modifier, only allocate memory if necessary 1580 improve performance for LazyBuf 1581 remove redundant parameter from ParseVarnameLong 1582 migrate ParseModifierPart to use Substring 1583 avoid unnecessary calls to strlen when evaluating modifiers 1584 migrate ModifyWord functions to use Substring 1585 migrate handling of the modifier ':S,from,to,' to Substring 1586 reduce debug logging and memory allocation for ${:U...} 1587 reduce verbosity of the -dv debug logging for standard cases 1588 clean up debug logging for ':M' and ':N' 1589 disallow '$' in the variable name of the modifier ':@' 1590 simplify access to the name of an expression during evaluation 1591 15922021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1593 1594 * VERSION (_MAKE_VERSION): 20210330 1595 Merge with NetBSD make, pick up 1596 o replace enum bit-field with struct bit-field for VarEvalFlags 1597 o rename VARE_NONE to VARE_PARSE_ONLY 1598 o var.c: rename ApplyModifiersState to ModChain 1599 fix double varname expansion in the variable modifier '::=' 1600 change debug log for variable evaluation flags to lowercase 1601 16022021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1603 1604 * VERSION (_MAKE_VERSION): 20210314 1605 Merge with NetBSD make, pick up 1606 o var.c: avoid evaluating many modifiers in parse only mode 1607 in strict mode (-dL) many variable references are parsed twice, 1608 the first time just to report parse errors early, so we want to 1609 avoid side effects and wasted effort to the extent possible. 1610 16112021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1612 1613 * VERSION (_MAKE_VERSION): 20210226 1614 Merge with NetBSD make, pick up 1615 o remove freestanding freeIt variables 1616 link via FStr 1617 o var.c: restructure code in ParseVarname to target human readers 1618 improve error message for; 1619 bad modifier in variable expression 1620 unclosed modifier 1621 unknown modifier 1622 remove redundant parameter of ApplySingleModifier 1623 explain non-obvious code around indirect variable modifiers 1624 quote ':S' in error message about missing delimiter 1625 extract ParseModifier_Match into separate function 1626 add context information to error message about ':range' modifier 1627 add quotes around variable name in an error message 1628 reorder code in ModifyWords 1629 use more common parameter order for VarSelectWords 1630 make ModifyWord_Subst a little easier to understand 1631 do not expand variable name from the command line twice 1632 extract ExistsInCmdline from Var_SetWithFlags 1633 save a hash map lookup when defining a cmdline variable 1634 clean up VarAdd, Var_Delete, Var_ReexportVars 1635 use bit-shift expressions for VarFlags constants 1636 rename constants for VarFlags 1637 rename ExprDefined constants for debug logging 1638 rename ExprStatus to ExprDefined 1639 split parameters for evaluating variable expressions 1640 reduce redundant code around ModifyWords 1641 print error about failed shell command before overwriting variable 1642 clean up ValidShortVarname, ParseVarnameShort 1643 rename VarExprStatus to ExprStatus 1644 add functions for assigning the value of an expression 1645 rename ApplyModifiersState_Define to Expr_Define 1646 condense the code for parsing :S and :C modifiers 1647 16482021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1649 1650 * VERSION (_MAKE_VERSION): 20210206 1651 Merge with NetBSD make, pick up 1652 o unit-tests: use private TMPDIR to avoid errors from other users 1653 16542021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1655 1656 * VERSION (_MAKE_VERSION): 20210205 1657 Merge with NetBSD make, pick up 1658 o avoid strdup in mkTempFile 1659 o always use vfork 1660 o rename context and ctxt to scope 1661 o rename some VAR constants to SCOPE 1662 o Var_ functions, move the scope to the front 1663 o use shortcut functions Global_Set and Global_Append 1664 o add shortcut Global_Delete for deleting a global variable 1665 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1666 o compat.c: when exiting due to an error, print graph information 1667 o enum.c: remove overengineered Enum_ValueToString 1668 o make.c: remove unused INTERNAL flag 1669 remove unused return type of MakeBuildParent 1670 o parse.c: replace parse error "Need an operator" with better message 1671 o var.c: improve documentation about variable scopes 1672 rename Var_ValueDirect to GNode_ValueDirect 1673 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1674 merge SetVar into Var_SetWithFlags 1675 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1676 split Var_Append into Var_Append and Var_AppendExpand 1677 replace enum bit-set with bit-field 1678 o unit-tests/var-op-shell: use kill rather than kill -14 1679 which broke on darwin with recent update. 1680 16812021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1682 1683 * configure.in: check for sig_atomic_t and define it as 'int' 1684 if missing. 1685 1686 * VERSION (_MAKE_VERSION): 20210201 1687 Merge with NetBSD make, pick up 1688 o use sig_atomic_t for caught_sigchld 1689 16902021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1691 1692 * VERSION (_MAKE_VERSION): 20210130 1693 Merge with NetBSD make, pick up 1694 o more unit tests 1695 o convert SearchPath to struct 1696 o split Buf_Destroy into Buf_Done and Buf_DoneData 1697 o for.c: split For_Eval into separate functions 1698 rename struct For to struct ForLoop 1699 o job.c: do not create empty shell files in jobs mode 1700 rename JobOpenTmpFile to JobWriteShellCommands 1701 reduce unnecessary calls to waitpid 1702 o parse.c: in -dp mode, print stack trace with each diagnostic 1703 17042021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1705 1706 * VERSION (_MAKE_VERSION): 20210123 1707 Merge with NetBSD make, pick up 1708 o rename Dir_Expand to SearchPath_Expand 1709 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1710 o cond.c: fix debug output for comparison operators in conditionals 1711 o dir.c: split Dir_FindFile into separate functions 1712 17132021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1714 1715 * VERSION (_MAKE_VERSION): 20210120 1716 Merge with NetBSD make, pick up 1717 o fix some more lint nits 1718 o refine some unit tests for portability 1719 o cond.c: rework parsing 1720 17212021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1722 1723 * VERSION (_MAKE_VERSION): 20210110 1724 Merge with NetBSD make, pick up 1725 o fix lint warnings 1726 o consistently use boolean expressions in conditions 1727 17282021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1729 1730 * VERSION (_MAKE_VERSION): 20210108 1731 Merge with NetBSD make, pick up 1732 o job.c: back to polling token pipe if we want a token 1733 o main.c: always print 'stopped in' on first call 1734 The execption is if we bail because of an abort token 1735 in which case just exit 6. 1736 17372021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1738 1739 * VERSION (_MAKE_VERSION): 20210101 1740 Merge with NetBSD make, pick up 1741 o Happy New Year! 1742 o rename CmdOpts.lint to strict 1743 o exit 2 on technical errors 1744 o replace pointers in controlling conditions with booleans 1745 o replace global preserveUndefined with VARE_KEEP_UNDEF 1746 o compat.c: re-export variables from the actual make process 1747 if using vfork this is the effect anyway 1748 o cond.c: clean up VarParseResult constants 1749 o for.c: fix undefined behavior in SubstVarLong 1750 make control flow in SubstVarLong of .for loops more obvious 1751 clean up SubstVarShort in .for loops 1752 extract ForSubstBody from ForReadMore 1753 clean up ForReadMore 1754 simplify termination condition for .for loop 1755 add error handling for .for loop items 1756 job.c: re-export variables from the actual make process 1757 parse.c: remove mmap for loading files, only allow files < 1 GiB 1758 fix edge case in := with undefined in variable name 1759 skip variable expansion in ParseDependencyTargetWord 1760 var.c: split ExportVar into separate functions 1761 clean up code in extracted ExportVar functions 1762 remove dead code from ApplyModifiersIndirect 1763 split Var_Subst into easily understandable functions 1764 clean up VarParseResult constants 1765 17662020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1767 1768 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1769 17702020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1771 1772 * VERSION (_MAKE_VERSION): 20201222 1773 Merge with NetBSD make, pick up 1774 o make DEBUG macro return boolean 1775 o parse.c: fix assertion failure for files without trailing newline 1776 o var.c: allow .undef to undefine multiple variables at once 1777 remove excess newline from parse errors 1778 17792020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1780 1781 * VERSION (_MAKE_VERSION): 20201221 1782 Merge with NetBSD make, pick up 1783 o some unit-test updates 1784 17852020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1786 1787 * VERSION (_MAKE_VERSION): 20201220 1788 Merge with NetBSD make, pick up 1789 o more unit tests 1790 o return FStr from Var_Parse and Var_Value 1791 o spell nonexistent consistently 1792 o add str_basename to reduce duplicate code 1793 o compat.c: fix .ERROR_TARGET in compat -k mode 1794 extract InitSignals from Compat_Run 1795 extract UseShell from Compat_RunCommand 1796 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1797 o for.c: rename ForIterate to ForReadMore 1798 o hash.c: clean up hash function for HashTable 1799 o lst.c: rename Vector.priv_cap to cap 1800 o main.c: remove constant parameter from MakeMode 1801 o make.c: use symbolic time for 0 in Make_Recheck 1802 extract MakeChildren from MakeStartJobs 1803 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1804 fix error message for .info/.warning/.error without argument 1805 extract Var_Undef from ParseDirective 1806 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1807 rename mode constants for ParseGetLine to be more expressive 1808 reduce debugging details in Parse_SetInput 1809 fix line numbers in .for loops 1810 split ParseGetLine into separate functions 1811 fix garbled output for failed shell command 1812 var.c: remove redundant assignment in ApplyModifier_SysV 1813 error out on unknown variable modifiers at parse time 1814 remove wrong error message for indirect modifier in lint mode 1815 extract ApplySingleModifier from ApplyModifiers 1816 use FStr for memory management in Var_SetWithFlags 1817 extract SetVar from Var_SetWithFlags 1818 use FStr in VarNew 1819 extract string functions from ApplyModifier_To 1820 error out if .undef has not exactly 1 argument 1821 extract Var_DeleteVar from Var_Delete 1822 extract Var_Undef from ParseDirective 1823 clean up memory management for expanding variable expressions 1824 18252020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1826 1827 * avoid %zu 1828 1829 * lst.c: avoid anonymous union 1830 1831 * VERSION (_MAKE_VERSION): 20201212 1832 Merge with NetBSD make, pick up 1833 o more unit tests 1834 o inline Targ_Ignore and Targ_Silent 1835 o split JobFlags into separate fields 1836 o remove const from function parameters (left overs from refactoring) 1837 o eliminate boolean argument of Var_Export 1838 o make API of Buf_Init simpler 1839 o rename ParseRunOptions to ParseCommandFlags 1840 o replace *line with line[0] 1841 o compat.c: fix wrong exit status for multiple failed main targets 1842 refactor Compat_Run to show the error condition more clearly 1843 don't make .END if the main targets already failed (-k mode) 1844 fix exit status in -k mode if a dependency fails 1845 o for.c: clean up Buf_AddEscaped in .for loops 1846 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1847 make Job_Touch simpler 1848 refactor JobFinish 1849 rename Shell.exitFlag to errFlag 1850 move Job.xtraced to ShellWriter 1851 make printing of shell commands independent from the job 1852 rename shell flags in struct Shell 1853 extract JobOpenTmpFile from JobStart 1854 rename RunFlags to CommandFlags 1855 split various Job.* into separate fields 1856 rename commandShell to shell 1857 extract InitShellNameAndPath from Shell_Init 1858 replace signal handling macros with local functions 1859 replace macro MESSAGE with local function 1860 parse.c: error out on null bytes in makefiles 1861 error out on misspelled directives 1862 rename IFile.nextbuf to readMore 1863 fix undefined behavior in ParseEOF 1864 str.c: remove redundant call to strlen in Str_Words 1865 var.c: error out on misspelled .unexport-env 1866 error out on misspelled .export directives 1867 extract ExportVars from Var_Export 1868 extract ExportVarsExpand from Var_Export 1869 eliminate boolean argument of Var_Export 1870 fix undefined behavior when exporting ${:U } 1871 rename Var_ExportVars to Var_ReexportVars 1872 rename Var_Export1 to ExportVar 1873 18742020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1875 1876 * VERSION (_MAKE_VERSION): 20201206 1877 Merge with NetBSD make, pick up 1878 o more unit tests 1879 o inline macros for debug logging 1880 o use consistent variable names for list nodes 1881 o define constants for enum zero-values 1882 o dir.c: use fixed format for debug output of the directory cache 1883 remove Dir_InitDir 1884 o lst.c: inline Lst_Enqueue, Vector_Done 1885 o meta.c: remove unused parameter from meta_needed 1886 o parse.c: rename parse functions 1887 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1888 o targ.c: don't concatenate identifiers in Targ_PrintType 1889 o var.c: remove comment decoration 1890 extract UnexportVars from Var_UnExport 1891 extract GetVarnamesToUnexport from Var_UnExport 1892 extract UnexportEnv from Var_UnExport 1893 extract UnexportVar from Var_UnExport 1894 move CleanEnv to UnexportVars 1895 replace pointer comparisons with enum 1896 add FStr to var.c to make memory handling simpler 1897 use FStr in Var_UnExport 1898 move type definitions in var.c to the top 1899 extract FreeEnvVar from Var_Parse 1900 extract ShuffleStrings from ApplyModifier_Order 1901 19022020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1903 1904 * VERSION (_MAKE_VERSION): 20201130 1905 Merge with NetBSD make, pick up 1906 o add unit tests for META MODE 1907 o reduce memory allocation for dirSearchPath, GNode.parents, 1908 GNode.children, OpenDirs 1909 o reduce pointer indirection for GNode.cohorts and 1910 GNode.implicitParents 1911 o remove pointer indirection from GNode.commands 1912 o inline Lst_ForEachUntil in meta mode 1913 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1914 clean up memory management for CachedDirs 1915 fix the reference count of dotLast going negative 1916 add debug logging for OpenDirs_Done 1917 extract CacheNewDir from Dir_AddDir 1918 add debug logging for reference counting of CachedDir 1919 rename some Dir functions to SearchPath 1920 o job.c: rename some global variables 1921 o main.c: reduce memory allocation in ReadBuiltinRules 1922 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1923 CmdOpts.makefiles 1924 Add .MAKE.UID and .MAKE.GID 1925 o make.c: reduce memory allocation for/in toBeMade, 1926 Make_ProcessWait, Make_ExpandUse 1927 o meta.c: reduce memory allocation in meta_oodate 1928 o parse.c: reduce memory allocations for parsing dependencies and 1929 targets 1930 o suff.c: reduce memory allocation in suffix handling 1931 19322020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1933 1934 * VERSION (_MAKE_VERSION): 20201124 1935 Merge with NetBSD make, pick up 1936 o .MAKE.{UID,GID} represent uid and gid running make. 1937 o fix error handling for .BEGIN and .END dependency in -k mode 1938 o fix missing "Stop." after failed .END node in -k mode 1939 o use properly typed comparisons in boolean contexts 1940 o replace a few HashTable_CreateEntry with HashTable_Set 1941 o add HashSet type 1942 o compat.c: split Compat_Make into smaller functions 1943 extract DebugFailedTarget from Compat_RunCommand 1944 o dir.c: refactor Dir_UpdateMTime 1945 migrate CachedDir.files from HashTable to HashSet 1946 o make.c: add high-level API for GNode.made 1947 19482020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1949 1950 * VERSION (_MAKE_VERSION): 20201122 1951 Merge with NetBSD make, pick up 1952 o rename GNode.context to vars 1953 o suff.c: cleanup and refactor 1954 rename some functions and vars to better reflect usage 1955 add high-level API for CandidateSearcher 1956 o targ.c: add more debug logging for suffix handling 1957 o more unit tests 1958 o add debug logging for setting and resetting the main target 1959 19602020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1961 1962 * VERSION (_MAKE_VERSION): 20201117 1963 Merge with NetBSD make, pick up 1964 o fix some unit-tests when .SHELL is dash 1965 o rename Targ_NewGN to GNode_New 1966 o make some GNode functions const 1967 o main.c: call Targ_Init before Var_Init 1968 cleanup PrintOnError, getTmpdir and ParseBoolean 1969 o var.c: fix error message of failed :!cmd! modifier 1970 19712020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1972 1973 * VERSION (_MAKE_VERSION): 20201114 1974 Merge with NetBSD make, pick up 1975 o replace a few HashTable_CreateEntry with HashTable_Set 1976 o clean up cached_stats 1977 o rename DEFAULT to defaultNode 1978 o remove redundant struct make_stat 1979 o cond.c: in lint mode, check for ".else <cond>" 1980 use bitset for IfState 1981 replace large switch with if-else in Cond_EvalLine 1982 o job.c: clean up JobExec, JobStart, JobDoOutput 1983 use stderr for error message about failed touch 1984 clean up Job_Touch 1985 replace macro DBPRINTF with JobPrintln 1986 rename JobState to JobStatus 1987 main.c: switch cache for realpath from GNode to HashTable 1988 clean up Fatal 1989 clean up InitDefSysIncPath 1990 use progname instead of hard-coded 'make' in warning 1991 rename Main_SetVarObjdir to SetVarObjdir 1992 make.1: document the -S option 1993 make.c: fix debug output for GNode details 1994 use symbolic names in debug output of GNodes 1995 19962020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1997 1998 * configure.in: fix --with-force-machine-arch 1999 2000 * VERSION (_MAKE_VERSION): 20201112 2001 Merge with NetBSD make, pick up 2002 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 2003 checks in InitObjdir. Explicit .OBJDIR target always allows 2004 read-only directory. 2005 o cond.c: clean up Cond_EvalLine 2006 20072020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 2008 2009 * VERSION (_MAKE_VERSION): 20201111 2010 Merge with NetBSD make, pick up 2011 o more unit-tests 2012 o style cleanup 2013 remove redundant parentheses from sizeof operator 2014 replace character literal 0 with '\0'. 2015 replace pointer literal 0 with NULL. 2016 remove redundant parentheses. 2017 replace (expr & mask) == 0 with !(expr & mask). 2018 use strict typing in conditions of the form !var 2019 o rename Make_OODate to GNode_IsOODate 2020 o rename Make_TimeStamp to GNode_UpdateYoungestChild 2021 o rename Var_Set_with_flags to Var_SetWithFlags 2022 o rename dieQuietly to shouldDieQuietly 2023 o buf.c: make API of Buf_Init simpler 2024 o compat.c: clean up Compat_Make, Compat_RunCommand, 2025 CompatDeleteTarget and CompatInterrupt 2026 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 2027 clean up CondParser_Comparison 2028 o main.c: rename getBoolean and s2Boolean 2029 rename MAKEFILE_PREFERENCE for consistency 2030 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 2031 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 2032 replace emptyString with allocated empty string 2033 error out on unclosed expressions after the colon 2034 20352020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 2036 2037 * VERSION (_MAKE_VERSION): 20201101 2038 Merge with NetBSD make, pick up 2039 o negate NoExecute to GNode_ShouldExecute 2040 o job.c: rename JobMatchShell to FindShellByName 2041 extract EscapeShellDblQuot from JobPrintCommand 2042 extract ParseRunOptions from JobPrintCommand 2043 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 2044 treat malformed :range, :ts and :[...] as errors 2045 add tests for the variable modifiers :[words] and :range 2046 20472020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 2048 2049 * VERSION (_MAKE_VERSION): 20201031 2050 Merge with NetBSD make, pick up 2051 o format #include directives consistently 2052 o do not look up local variables like .TARGET anywhere else 2053 o main.c: Main_SetObjdir is first called for curdir which may be 2054 readonly 2055 reduce the scope where recursive expressions are detected 2056 remove redundant :tl from getBoolean 2057 clean up mkTempFile 2058 o meta.c: simplify memory allocation in meta_create and meta_oodate 2059 o parse.c: extract loadedfile_mmap from loadfile 2060 o trace.c: document possible undefined behavior with .CURDIR 2061 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 2062 rename ismeta to is_shell_metachar 2063 remove debug logging for the :Q variable modifier 2064 rename VarIsDynamic to VarnameIsDynamic 2065 use consistent parameter order in varname parsing functions 2066 extract ParseVarnameLong from Var_Parse 2067 extract ParseVarnameShort from Var_Parse 2068 fix type of ParseModifierPart parameter delim 2069 extract IsEscapedModifierPart from ParseModifierPart 2070 clean up ModifyWords 2071 add test for combining the :@ and :? variable modifiers 2072 20732020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 2074 2075 * VERSION (_MAKE_VERSION): 20201030 2076 Merge with NetBSD make, pick up 2077 o change char * to void * in Var_Value 2078 o make iterating over HashTable simpler 2079 o rename VAR_CMD to VAR_CMDLINE 2080 o cond.c: clean up is_separator 2081 fix parse error in string literal in conditional 2082 o main.c: do not use objdir that is not writable 2083 in lint mode, exit with error status on errors 2084 o parse.c: clean up StrContainsWord 2085 fix out-of-bounds pointer in ParseTrackInput 2086 o var.c: rename Str_SYSVMatch and its parameters 2087 remove unsatisfiable conditions in Var_Set_with_flags 2088 document where the variable name is expanded 2089 fix documentation for VARP_SUB_ONE 2090 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 2091 document VAR_READONLY 2092 prevent appending to read-only variables 2093 extract MayExport from Var_Export1 2094 remove redundant evaluations in VarFind 2095 replace VarFindFlags with a simple Boolean 2096 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 2097 20982020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 2099 2100 * VERSION (_MAKE_VERSION): 20201028 2101 Merge with NetBSD make, pick up 2102 o rename defIncPath to defSysIncPath 2103 o initialize all CmdOpts fields 2104 o lst.c: inline Vector_Get 2105 o main.c: refactor main extract 2106 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 2107 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 2108 InitDefIncPath,CmdOpts_Init,UnlimitFiles 2109 o parse.c: merge curFile into includes 2110 rename predecessor to order_pred 2111 sort ParseSpecial alphabetically 2112 remove unused, undocumented .NOEXPORT 2113 rename ParseSpecial enum values consistently 2114 rename some fields of struct IFile 2115 21162020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 2117 2118 * VERSION (_MAKE_VERSION): 20201026 2119 Merge with NetBSD make, pick up 2120 o group the command line options and arguments into a struct 2121 o rename GNode.cmgn to youngestChild 2122 o rename hash functions to identify the type name 2123 o negate OP_NOP and rename it to GNode_IsTarget 2124 o add GNode_Path to access the path of a GNode 2125 o remove macros MIN and MAX 2126 o remove unused Lst_Find and Lst_FindFrom 2127 o arch.c: and make Arch_FindLib simpler 2128 clean up code layout 2129 make Arch_ParseArchive simpler 2130 o cond.c: inline CondFindStrMatch into FuncMake 2131 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 2132 omit trailing space in debug output for expanding file patterns 2133 refactor DirMatchFiles 2134 document that the SearchPath of Dir_FindFile may be NULL 2135 remove UNCONST from Dir_Expand 2136 inline DirFindName 2137 o for.c: clean up code for handling .for loops 2138 o hash.c: print hash in debug log with fixed width 2139 clean up hash table functions 2140 reduce amount of string hashing 2141 o job.c: refactor JobDeleteTarget 2142 use proper enum constants for aborting 2143 convert result of JobStart from macros to enum 2144 convert abort reason macros to enum 2145 rework Job_CheckCommands to reduce indentation 2146 rename Shell fields 2147 add field names in declaration of DEFSHELL_CUSTOM 2148 convert JobState and JobFlags to enum types 2149 move handling of the "..." command to JobPrintCommands 2150 o lst.c: clean up 2151 refactor LstNodeNew 2152 remove Lst_Open, Lst_Next, Lst_Close 2153 remove code for circular lists from Lst_Next 2154 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 2155 /dev/null or anything starting with "no" 2156 convert macros for debug flags into enum 2157 o make.c: inline Lst_Copy in Make_ExpandUse 2158 o meta.c: inline Lst_Find in meta_oodate 2159 make Lst_RemoveIf simpler in meta_oodate 2160 o parse.c: convert error level for Parse_Error to an enum 2161 o suff.c: properly terminate debug output with newline 2162 add more details to DEBUG_SRC log 2163 replace Dir_CopyDir with Dir_CopyDirSearchPath 2164 don't modify GNode name while rebuilding the suffix graph 2165 o var.c: reduce duplicate code in VarFind 2166 21672020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 2168 2169 * VERSION (_MAKE_VERSION): 20201022 2170 Merge with NetBSD make, pick up 2171 o more refactoring and simplification to reduce code size 2172 o var.c: extract CanonicalVarname from VarFind 2173 o make.c: extract UpdateImplicitParentsVars from Make_Update 2174 o main.c: extract PrintVar from doPrintVars 2175 extract HandlePWD from main 2176 o lst.c: inline simple Lst getters 2177 remove unused Lst_ForEach 2178 o job.c: move struct Shell from job.h to job.c 2179 o more unit tests 2180 21812020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 2182 2183 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 2184 21852020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 2186 2187 * VERSION (_MAKE_VERSION): 20201018 2188 Merge with NetBSD make, pick up 2189 o remove USE_IOVEC 2190 o rename some Hash_* apis to Hash* 2191 o replace execError with execDie 2192 o rename Lst_Init to Lst_New 2193 o add tags to enum types 2194 o rename Stack to Vector 2195 o parse.c: more refactoring 2196 o unit-tests: make some tests use line buffered stdout 2197 o unit-tests/Makefile: in meta mode do not make all tests depend on 2198 Makefile, it isn't necessary. 2199 22002020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 2201 2202 * main.c: check for CTL_HW being defined. 2203 * unit-tests/Makefile: ensure export tests output are POSIX compliant 2204 disable opt-debug-jobs test until it works on ubuntu 2205 2206 * VERSION (_MAKE_VERSION): 20201010 2207 Merge with NetBSD make, pick up 2208 o dir.c: remove pathname limit for Dir_FindHereOrAbove 2209 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 2210 o main.c: extract init_machine and init_machine_arch from main 2211 allow to disable debug logging options 2212 o parse.c: enable format string truncation warnings 2213 extract parsing of sources from ParseDoDependency 2214 split ParseDoSrc into smaller functions 2215 hide implementation details from Parse_DoVar 2216 clean up parsing of variable assignments 2217 split Parse_DoVar into manageable pieces 2218 don't modify the given line during Parse_DoVar 2219 fix out-of-bounds memory access in Parse_DoVar 2220 fix parsing of the :sh assignment modifier 2221 o var.c: rework memory allocation for the name of variables 2222 extract ApplyModifier_Literal into separate function 2223 in lint mode, reject modifiers without delimiter 2224 do not export variable names starting with '-' 2225 o fix double-free bug in -DCLEANUP mode 2226 o more cleanup to enable higher warnings level 2227 o more unit tests 2228 22292020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 2230 2231 * VERSION (_MAKE_VERSION): 20201002 2232 Merge with NetBSD make, pick up 2233 o dir.c: use hash table for looking up open directories by name 2234 o main.c: clean up option handling 2235 o parse.c: add missing const for Parse_AddIncludeDir 2236 o var.c: ApplyModifier_To, update pp in each branch 2237 o remove redundant function prototypes 2238 o more unit tests 2239 22402020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 2241 2242 * VERSION (_MAKE_VERSION): 20201001 2243 Merge with NetBSD make, pick up 2244 o compat.c: comment about "..." 2245 22462020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 2247 2248 * VERSION (_MAKE_VERSION): 20200930 2249 Merge with NetBSD make, pick up 2250 o job.c: split Job.jobPipe into 2 separate fields 2251 replace Lst_Open with direct iteration 2252 o lst.c: remove redundant assertions 2253 o targ.c: replace Lst_Open with direct iteration 2254 o var.c: fix bug in evaluation of indirect variable modifiers 2255 extract ApplyModifier_Quote into separate function 2256 o make debug logging simpler 2257 22582020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 2259 2260 * VERSION (_MAKE_VERSION): 20200927 2261 Merge with NetBSD make, pick up 2262 o parse.c: ensure parse errors result in 'stopped in' message. 2263 o compat.c: make parameter of Compat_RunCommand const 2264 o main.c: extract InitVarTarget from main 2265 o parse.c: rename ParseFinishLine to FinishDependencyGroup 2266 refactor ParseDoDependency 2267 o var.c: Var_Subst no longer returns string result 2268 rename Var_ParsePP back to Var_Parse 2269 in lint mode, improve error handling for undefined variables 2270 extract ParseVarname from Var_Parse 2271 o rename Lst_ForEach to Lst_ForEachUntil 2272 o inline Lst_ForEachUntil in several cases 2273 o clean up API for finding and creating GNodes 2274 o fix assertion failure in -j mode with .END node 2275 o inline and remove LstNode_Prev and LstNode_Next 2276 o use fine-grained type names for lists and their nodes 2277 o more unit tests 2278 22792020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 2280 2281 * VERSION (_MAKE_VERSION): 20200911 2282 Merge with NetBSD make, pick up 2283 o cond.c: split EvalComparison into smaller functions 2284 reorder parameters of condition parsing functions 2285 reduce code size in CondParser_Eval 2286 rename CondGetString to CondParser_String 2287 add CondLexer_SkipWhitespace 2288 group the condition parsing state into a struct 2289 in CondGetString, replace repeated Buf_Add with Buf_AddStr 2290 o migrate Var_Parse to Var_ParsePP 2291 o add wrappers around ctype.h functions 2292 o lst.c: use a stack instead of a list for the nested include path 2293 o more unit tests 2294 22952020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 2296 2297 * make-bootstrap.sh.in: adjust object list 2298 22992020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 2300 2301 * VERSION (_MAKE_VERSION): 20200902 2302 Merge with NetBSD make, pick up 2303 o use make_stat to ensure no confusion over valid fields 2304 returned by cached_stat 2305 o var.c: make VarQuote const-correct 2306 o add unit tests for .for 2307 23082020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 2309 2310 * VERSION (_MAKE_VERSION): 20200901 2311 Merge with NetBSD make, pick up 2312 o rename Hash_Table fields 2313 o make data types in Dir_HasWildcards more precise 2314 23152020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 2316 2317 * VERSION (_MAKE_VERSION): 20200831 2318 Merge with NetBSD make, pick up 2319 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 2320 o lst.c: Lst_Open renable assert that list isn't open 2321 o unit test for .TARGET dependent flags 2322 o var.c: fix aliasing bug in VarUniq 2323 o more unit tests for :u 2324 23252020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 2326 2327 * VERSION (_MAKE_VERSION): 20200830 2328 Merge with NetBSD make, pick up 2329 o allow for strict type checking for Boolean 2330 o Var_Parse never returns NULL 2331 o Var_Subst never returns NULL 2332 o Lst_Find now takes boolean match function 2333 o rename Lst_Memeber to Lst_FindDatum 2334 o rename LstNode functions to match their type 2335 o rename GNode.iParents to implicitParents 2336 o fix assertion failure for .SUFFIXES in archives 2337 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 2338 remove unreachable code from CompatRunCommand 2339 o main.c: simplify getBoolean 2340 o stc.c: replace brk_string with simpler Str_Words 2341 o suff.c: add debug macros 2342 23432020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 2344 2345 * VERSION (_MAKE_VERSION): 20200828 2346 Merge with NetBSD make, pick up 2347 o lst.c: inline LstIsValid and LstNodeIsValid 2348 o remove trailing S from Lst function names after migration complete 2349 o more comment cleanup/clarification 2350 o suff.c: clean up suffix handling 2351 o more unit tests 2352 23532020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 2354 2355 * VERSION (_MAKE_VERSION): 20200826 2356 Merge with NetBSD make, pick up 2357 o enum.c: distinguish between bitsets containing flags and 2358 ordinary enums 2359 o var.c: fix error message for ::!= modifier with shell error 2360 o fix bugs in -DCLEANUP mode 2361 23622020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 2363 2364 * VERSION (_MAKE_VERSION): 20200824 2365 Merge with NetBSD make, pick up 2366 o in debug mode, print GNode details in symbols 2367 23682020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 2369 2370 * VERSION (_MAKE_VERSION): 20200823 2371 Merge with NetBSD make, pick up 2372 o lst.c: more asserts, 2373 make args to Lst_Find match others. 2374 o var.c: pass flags to VarAdd 2375 o arch.c: use Buffer 2376 o str.c: brk_string return size_t for nwords 2377 o more unit tests 2378 23792020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 2380 2381 * VERSION (_MAKE_VERSION): 2382 Merge with NetBSD make, pick up 2383 o var.c: support for read-only variables eg .SHELL 2384 being the shell used to run scripts. 2385 o lst.c: more simplification 2386 o more documentation and style cleanup 2387 o more unit tests 2388 o ensure unit-test/Makefile is run by TEST_MAKE 2389 o reduce duplication of header inclusion 2390 23912020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 2392 2393 * VERSION (_MAKE_VERSION): 20200821 2394 Merge with NetBSD make, pick up 2395 o lst.c: revert invalid assertion - but document it 2396 o dir.c: split Dir_Init into two functions 2397 23982020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 2399 2400 * lst.c: needs inttypes.h on Linux 2401 2402 * VERSION (_MAKE_VERSION): 20200820 2403 Merge with NetBSD make, pick up 2404 o make.1: clarify some passages 2405 o var.c: more cleanup, clarify comments 2406 o make_malloc.c: remove unreachable code 2407 o cond.c: make CondGetString easier to debug 2408 o simplify list usage 2409 o unit-tests: more 2410 24112020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 2412 2413 * VERSION (_MAKE_VERSION): 20200816 2414 Merge with NetBSD make, pick up 2415 o refactor unit-tests to be more fine grained 2416 not all tests moved yet 2417 24182020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 2419 2420 * VERSION (_MAKE_VERSION): 20200814 2421 Merge with NetBSD make, pick up 2422 o more str_concat variants 2423 o more enums for flags 2424 o var.c: cleanup for higher warnings level 2425 24262020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 2427 2428 * VERSION (_MAKE_VERSION): 20200810 2429 Merge with NetBSD make, pick up 2430 o more unit tests 2431 o general comment and style cleanup 2432 24332020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 2434 2435 * VERSION (_MAKE_VERSION): 20200808 2436 Merge with NetBSD make, pick up 2437 o enum.[ch]: streamline, enums for use in flags and debug output 2438 o cond.c: cleanup 2439 o var.c: reduce duplicate code for modifiers 2440 debug logging for Var_Parse 2441 more detailed debug output 2442 o more unit tests 2443 24442020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 2445 2446 * unit-tests/Makefile: -r for recursive and include Makefile.inc 2447 so I can run tests in meta mode 2448 supress extra noise if in meta mode 2449 2450 * VERSION (_MAKE_VERSION): 20200806 2451 Merge with NetBSD make, pick up 2452 o parse.c: remove VARE_WANTRES for LINT 2453 we just want to check parsing (for now). 2454 24552020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 2456 2457 * VERSION (_MAKE_VERSION): 20200805 2458 Merge with NetBSD make, pick up 2459 o make.1: Rework the description of dependence operators 2460 24612020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 2462 2463 * VERSION (_MAKE_VERSION): 20200803 2464 Merge with NetBSD make, pick up 2465 o revert some C99 usage, for max portability 2466 o unit-tests/lint 2467 24682020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 2469 2470 * VERSION (_MAKE_VERSION): 20200802 2471 Merge with NetBSD make, pick up 2472 o more unit tests 2473 24742020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 2475 2476 * Remove NetBSD specific plumbing from unit-tests/Makefile 2477 2478 * VERSION (_MAKE_VERSION): 20200801 2479 Merge with NetBSD make, pick up 2480 o make Var_Value return const 2481 o size_t for buf sizes 2482 o optimize some buffer operations - avoid strlen 2483 24842020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 2485 2486 * VERSION (_MAKE_VERSION): 20200731 2487 Merge with NetBSD make, pick up 2488 o var.c: fix undefinded behavior for incomplete :t modifier 2489 fixes unit-test/moderrs on Ubuntu 2490 o parse.c: When parsing variable assignments other than := 2491 if DEBUG(LINT) test substition of value, so we get a file and 2492 line number in the resulting error. 2493 o dir.c: fix parsing of nested braces in dependency lines 2494 add unit-tests 2495 24962020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 2497 2498 * VERSION (_MAKE_VERSION): 20200730 2499 Merge with NetBSD make, pick up 2500 o var.c: minor cleanup 2501 o unit-tests: more tests to improve code coverage 2502 25032020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 2504 2505 * VERSION (_MAKE_VERSION): 20200728 2506 Merge with NetBSD make, pick up 2507 o var.c: more optimizations 2508 25092020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 2510 2511 * VERSION (_MAKE_VERSION): 20200726 2512 Merge with NetBSD make, pick up 2513 o collapse lsd.lib into lst.c - reduce code size and allow inlining 2514 o lots of function comment updates 2515 o var.c: more optimizations 2516 o make return of Var_Parse const 2517 25182020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2519 2520 * VERSION (_MAKE_VERSION): 20200720 2521 Merge with NetBSD make, pick up 2522 o DEBUG_HASH report stats at end and tone down the noise 2523 o var.c: each flag type gets its own prefix. 2524 move SysV string matching to var.c 2525 make ampersand in ${VAR:from=to&} an ordinary character 2526 cleanup and simplify implementation of modifiers 2527 o make.1: move documentation for assignment modifiers 2528 25292020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2530 2531 * VERSION (_MAKE_VERSION): 20200718 2532 Merge with NetBSD make, pick up 2533 o DEBUG_HASH to see how well the hash tables are working 2534 25352020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2536 2537 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2538 25392020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2540 2541 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2542 2543 * VERSION (_MAKE_VERSION): 20200710 2544 Merge with NetBSD make, pick up 2545 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2546 o meta.c: target flagged .META is out-of-date if meta file missing 2547 25482020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2549 2550 * VERSION (_MAKE_VERSION): 20200709 2551 Merge with NetBSD make, pick up 2552 o cond.c: fix for compare_expression when doEval=0 2553 o unit-tests/Makefile: rework 2554 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2555 25562020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2557 2558 * VERSION (_MAKE_VERSION): 20200704 2559 Merge with NetBSD make, pick up 2560 (most of this by rillig@) 2561 o lots of style and white-space cleanup 2562 o lots more unit tests for variable modifiers 2563 o simplified description of some functions 2564 o str.c: refactor Str_Match 2565 o var.c: debugging output for :@ 2566 constify VarModify parameter 2567 fix :hash modifier on 16-bit platforms 2568 remove unnecessary forward declarations 2569 refactor ApplyModifier_SysV to have less indentation 2570 simplify code for :E and :R 2571 clean up code for :H and :T 2572 refactor ApplyModifiers 2573 2574 * var.c: we need stdint.h on some platforms to get uint32_t 2575 * unit-test/Makefile: we need to supress the specific error 2576 for RE substitution error in modmisc, since it varies accross 2577 different OS. 2578 25792020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2580 2581 * VERSION (_MAKE_VERSION): 20200702 2582 Merge with NetBSD make, pick up 2583 o var.c: more improvements to avoiding unnecessary evaluation 2584 use enums for flags 2585 o remove flags arg to Var_Set which outside of var.c is always 0 2586 25872020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2588 2589 * VERSION (_MAKE_VERSION): 20200701 2590 Merge with NetBSD make, pick up 2591 o var.c: with change to cond.c; ensure that nested variables 2592 within a variable name are expanded. 2593 o unit-tests/varmisc.mk: test for nested varname 2594 25952020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2596 2597 * VERSION (_MAKE_VERSION): 20200629 2598 Merge with NetBSD make, pick up 2599 o cond.c: do not eval unnecessary terms of conditionals. 2600 26012020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2602 2603 * VERSION (_MAKE_VERSION): 20200625 2604 Merge with NetBSD make, pick up 2605 o meta.c: report error if lseek in filemon_read fails 2606 26072020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2608 2609 * VERSION (_MAKE_VERSION): 20200622 2610 Merge with NetBSD make, pick up 2611 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2612 26132020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2614 2615 * VERSION (_MAKE_VERSION): 20200619 2616 Merge with NetBSD make, pick up 2617 o str.c: performance improvement for Str_Match for multiple '*' 2618 o dieQuietly: supress the failure output from make 2619 when failing node is a sub-make or a sibling failed. 2620 This cuts down greatly on unhelpful noise at the end of 2621 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2622 26232020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2624 2625 * FILES: add LICENSE to appease some packagers. 2626 This is an attempt to fairly represent the license on almost 2627 200 files, which are almost all BSD-3-Clause 2628 The few exceptions being more liberal. 2629 2630 * VERSION (_MAKE_VERSION): 20200610 2631 Merge with NetBSD make, pick up 2632 o unit test for :Or 2633 26342020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2635 2636 * VERSION (_MAKE_VERSION): 20200606 2637 Merge with NetBSD make, pick up 2638 o make.1: cleanup 2639 2640 * Makefile: fix depends for main.o which broke MAKE_VERSION 2641 26422020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2643 2644 * VERSION (_MAKE_VERSION): 20200605 2645 Merge with NetBSD make, pick up 2646 o dir.c: cached_stats - don't confuse stat and lstat results. 2647 o var.c: add :Or for reverse sort. 2648 26492020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2650 2651 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2652 also if --with-filemon= specifies path to filemon.h 2653 set use_filemon=dev 2654 * dirname.c: remove include of namespace.h 2655 26562020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2657 2658 * VERSION (_MAKE_VERSION): 20200517 2659 Merge with NetBSD make, pick up 2660 o modified dollar tests to avoid shell dependencies 2661 o new tests for .INCLUDEFROM 2662 26632020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2664 2665 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2666 to not depend so much on shell behavior 2667 26682020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2669 2670 * VERSION (_MAKE_VERSION): 20200510 2671 Merge with NetBSD make, pick up 2672 o unit test for dollar handling 2673 26742020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2675 2676 * VERSION (_MAKE_VERSION): 20200506 2677 Merge with NetBSD make, pick up 2678 o str.c: empty string does not match % pattern 2679 plus unit-test changes 2680 26812020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2682 2683 * VERSION (_MAKE_VERSION): 20200504 2684 May the 4th be with you 2685 Merge with NetBSD make, pick up 2686 o var.c: import handling of old sysV style modifier using '%' 2687 o str.c: refactor brk_string 2688 o unit-tests: add test case for lazy conditions 2689 26902020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2691 2692 * VERSION (_MAKE_VERSION): 20200418 2693 2694 * configure.in: use_makefile=no for Cygwin et al. 2695 case insensitive filesystems just don't work if both 2696 makefile and Makefile exist. 2697 NOTE: bmake does not support Cygwin and likely never will, 2698 but if brave souls want to try it - help them out. 2699 27002020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2701 2702 * VERSION (_MAKE_VERSION): 20200402 2703 Merge with NetBSD make, pick up 2704 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2705 a blank command is perfectly valid. 2706 27072020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2708 2709 * VERSION (_MAKE_VERSION): 20200330 2710 Merge with NetBSD make, pick up 2711 o make.h: extern debug_file 2712 27132020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2714 2715 * VERSION (_MAKE_VERSION): 20200318 2716 Merge with NetBSD make, pick up 2717 o meta.c: meta_oodate, check for corrupted meta file 2718 earlier and more often. 2719 27202020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2721 2722 * VERSION (_MAKE_VERSION): 20200220 2723 27242020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2725 2726 * boot-strap: unset MAKEFLAGS 2727 27282020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2729 2730 * VERSION (_MAKE_VERSION): 20200212 2731 * meta.c: meta_compat_parent check for USE_FILEMON 2732 patch from Soeren Tempel 2733 27342020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2735 2736 * VERSION: 20200205 2737 Merge with NetBSD make, pick up 2738 o meta.c: fix compat mode, need to call meta_job_output() 2739 o job.c: extra fds for meta mode not needed if using filemon_dev 2740 27412020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2742 2743 * VERSION: 20200122 2744 Merge with NetBSD make, pick up 2745 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2746 returns FALSE. 2747 27482020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2749 2750 * VERSION: 20200121 2751 Merge with NetBSD make, pick up 2752 o filemon/filemon_{dev,ktrace}.c: allow selection of 2753 filemon implementation. filemon_dev.c uses the kernel module 2754 while filemon_ktrace.c leverages the fktrace api available in 2755 NetBSD. filemon_ktrace.c can hopefully form the basis for 2756 adding support for other tracing mechanisms such as strace on 2757 Linux. 2758 o meta.c: when target is out-of-date per normal make rules 2759 record value of .OODATE in meta file. 2760 27612019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2762 2763 * VERSION: 20190926 2764 Merge with NetBSD make, pick up 2765 o parse.c: don't pass NULL to realpath(3) 2766 some versions cannot handle it. 2767 27682019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2769 2770 * VERSION: 20190409 2771 Merge with NetBSD make, pick up 2772 o parse.c: ParseDoDependency: free paths rather than assert 2773 27742018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2775 2776 * VERSION: 20181222 2777 2778 * configure.in: add --without-makefile to avoid generating 2779 makefile and make-bootstrap.sh 2780 2781 * include Makefile.inc if it exists 2782 2783 * Use Makefile and Makefile.config.in in unit-tests 2784 so we can use just: make obj && make && make test 2785 when bmake is already available. 2786 We add --without-makefile to CONFIGURE_ARGS in this case. 2787 2788 * tweak bsd.after-import.mk (captures Makefile.config etc 2789 after import to FreeBSD for example) to cope with all the above. 2790 27912018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2792 2793 * VERSION: 20181221 2794 Merge with NetBSD make, pick up 2795 o parse.c: ParseVErrorInternal use .PARSEDIR 2796 and apply if relative, and then use .PARSEFILE 2797 for consistent result. 2798 27992018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2800 2801 * VERSION: 20181220 2802 Merge with NetBSD make, pick up 2803 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2804 is relative 2805 o var.c: avoid SEGFAULT in .unexport-env 2806 when MAKELEVEL is not set 2807 28082018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2809 2810 * VERSION: 20181216 2811 Merge with NetBSD make, pick up 2812 o fix for unit-tests/varquote.mk on Debian 2813 28142018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2815 2816 * VERSION: 20180919 2817 Merge with NetBSD make, pick up 2818 o var.c: add :q 2819 o dir.c: cleanup caching of stats 2820 28212018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2822 2823 * Makefile.config.in: use += where it makes sense. 2824 28252018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2826 2827 * VERSION: 20180512 2828 Merge with NetBSD make, pick up 2829 o job.c: skip polling job token pipe 2830 28312018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2832 2833 * VERSION: 20180405 2834 Merge with NetBSD make, pick up 2835 o parse.c: be more cautious about detecting depenency line 2836 rather than sysV style include. 2837 28382018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2839 2840 * VERSION: 20180222 2841 Merge with NetBSD make, pick up 2842 o parse.c: avoid calling sysconf for every call to loadfile 2843 28442018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2845 2846 * VERSION: 20180218 2847 Merge with NetBSD make, pick up 2848 o var.c: Var_Set handle NULL value anytime. 2849 28502018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2851 2852 * VERSION: 20180212 2853 Merge with NetBSD make, pick up 2854 o parse.c: do not treat .info as warning with -W 2855 28562017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2857 2858 * VERSION: 20171207 2859 Merge with NetBSD make, pick up 2860 o var.c: Var_Append use Var_Set if var not previously set 2861 so that VAR_CMD is handled correctly. 2862 Add a suitable unit-test. 2863 28642017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2865 2866 * VERSION (_MAKE_VERSION): 20171126 2867 2868 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2869 since AC_TRY_COMPILE puts input inside main() 2870 which upsets modern compilers. 2871 28722017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2873 2874 * VERSION: 20171118 2875 Merge with NetBSD make, pick up 2876 o var.c: do not append to variable set on command line 2877 add unit-test to catch this. 2878 28792017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2880 2881 * VERSION: 20171028 2882 Merge with NetBSD make, pick up 2883 o main.c: ignore empty MAKEOBJDIR 2884 2885 * Makefile.config.in: 2886 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2887 28882017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2889 2890 * VERSION: 20171005 2891 2892 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2893 consistent result on some platforms. 2894 28952017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2896 2897 * machine.sh: entry for AIX 2898 28992017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2900 2901 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2902 to a file that can be included by configure as well as make. 2903 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2904 29052017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2906 2907 * Makefile (_MAKE_VERSION): 20170810 2908 Merge with NetBSD make, pick up 2909 o meta.c: if target is in subdir we only need subdir name in 2910 meta_name. 2911 29122017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2913 2914 * Makefile (_MAKE_VERSION): 20170720 2915 Merge with NetBSD make, pick up 2916 o compat.c: pass SIGINT etc onto child and wait for it to exit 2917 before we self-terminate. 2918 29192017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2920 2921 * Makefile (_MAKE_VERSION): 20170711 2922 forgot to update after merge on 20170708 ;-) 2923 o main.c: refactor to reduce size of main function. 2924 add -v option to always fully expand values. 2925 o meta.c: ensure command output in meta file has ending newline 2926 even when filemon not being used. 2927 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2928 pathname via ':L' since any ':' in pathname breaks that. 2929 Instead set a '${.p.}' to pathname in the target context and 2930 use that. 2931 29322017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2933 2934 * Makefile (_MAKE_VERSION): 20170510 2935 Merge with NetBSD make, pick up 2936 o main.c: Main_SetObjdir: ensure buf2 is in scope 2937 29382017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2939 2940 * Makefile (_MAKE_VERSION): 20170505 2941 see mk/ChangeLog 2942 29432017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2944 2945 * parse.c: not everyone has stdint.h 2946 29472017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2948 2949 * Makefile (_MAKE_VERSION): 20170501 2950 see mk/ChangeLog 2951 29522017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2953 2954 * Makefile (_MAKE_VERSION): 20170421 2955 Merge with NetBSD make, pick up 2956 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2957 29582017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2959 2960 * Makefile (_MAKE_VERSION): 20170420 2961 Merge with NetBSD make, pick up 2962 o main.c: only use -C arg "as is" if it contains no 2963 relative component. 2964 29652017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2966 2967 * Makefile (_MAKE_VERSION): 20170418 2968 Merge with NetBSD make, pick up 2969 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2970 29712017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2972 2973 * Makefile (_MAKE_VERSION): 20170417 2974 Merge with NetBSD make, pick up 2975 o fixes a number of coverity complaints 2976 - check return value of fseek, fcntl 2977 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2978 JobPrintCommand, ParseTraditionalInclude 2979 - use bmake_malloc() where NULL is not tollerated 2980 - use MAKE_ATTR_UNUSED rather that kludges like 2981 return(unused ? 0 : 0) 2982 - use purge_cached_realpaths() rather than abuse cached_realpath() 2983 29842017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2985 2986 * Makefile (_MAKE_VERSION): 20170413 2987 Merge with NetBSD make, pick up 2988 o main.c: when setting .OBJDIR ignore '$' in paths. 2989 2990 * job.c: use MALLOC_OPTIONS to set malloc_options. 2991 29922017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2993 2994 * Makefile (_MAKE_VERSION): 20170411 2995 Merge with NetBSD make, pick up 2996 o str.c: Str_Match: allow [^a-z] to behave as expected. 2997 29982017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2999 3000 * Makefile (_MAKE_VERSION): 20170326 3001 Merge with NetBSD make, pick up 3002 o main.c: purge relative paths from realpath cache when .OBJDIR 3003 is changed. 3004 30052017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 3006 3007 * Makefile (_MAKE_VERSION): 20170311 3008 Merge with NetBSD make, pick up 3009 o main.c: only use -C arg "as is" if it starts with '/'. 3010 30112017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 3012 3013 * Makefile (_MAKE_VERSION): 20170301 3014 Merge with NetBSD make, pick up 3015 o main.c: use -C arg "as is" rather than getcwd() 3016 if they identify the same directory. 3017 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 3018 30192017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 3020 3021 * Makefile (_MAKE_VERSION): 20170201 3022 Merge with NetBSD make, pick up 3023 o var.c: allow :_=var and avoid use of special context. 3024 30252017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 3026 3027 * Makefile (_MAKE_VERSION): 20170130 3028 Merge with NetBSD make, pick up 3029 o var.c: add :range and :_ 3030 o main.c: partially initialize Dir_* before MainParseArgs() 3031 can be called. 3032 If -V, skip Main_ExportMAKEFLAGS() 3033 30342017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 3035 3036 * Makefile (_MAKE_VERSION): 20170114 3037 Merge with NetBSD make, pick up 3038 o var.c: allow specifying the utc value used by :{gm,local}time 3039 30402016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3041 3042 * Makefile (_MAKE_VERSION): 20161212 3043 Merge with NetBSD make, pick up 3044 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 3045 30462016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 3047 3048 * Makefile (_MAKE_VERSION): 20161209 3049 Merge with NetBSD make, pick up 3050 o main.c: cleanup setting of .OBJDIR 3051 o parse.c: avoid coredump from (var)=val 3052 30532016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3054 3055 * Makefile (_MAKE_VERSION): 20161126 3056 Merge with NetBSD make, pick up 3057 o make.c: Make_OODate: report src node name if path not set 3058 30592016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3060 3061 * Makefile (_MAKE_VERSION): 20160926 3062 Merge with NetBSD make, pick up 3063 o support for .DELETE_ON_ERROR: (remove targets that fail) 3064 30652016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3066 3067 * Makefile MAN: tweak .Dt to match ${PROG} 3068 30692016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3070 3071 * Makefile (_MAKE_VERSION): 20160818 3072 its a neater number; pick up whitespace fixes to man page. 3073 30742016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 3075 3076 * Makefile (_MAKE_VERSION): 20160817 3077 Merge with NetBSD make, pick up 3078 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 3079 so we can call it before adding entries to missingFiles. 3080 Thus we do not track files we have been told to ignore. 3081 30822016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 3083 3084 * Makefile (_MAKE_VERSION): 20160815 3085 Merge with NetBSD make, pick up 3086 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 3087 pathnames, and skip if the expansion is empty. 3088 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 3089 30902016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 3091 3092 * Makefile (_MAKE_VERSION): 20160812 3093 Merge with NetBSD make, pick up 3094 o meta.c: remove all missingFiles entries that match a deleted 3095 dir. 3096 o main.c: set .ERROR_CMD if possible. 3097 30982016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3099 3100 * Makefile (_MAKE_VERSION): 20160606 3101 Merge with NetBSD make, pick up 3102 o dir.c: extend mtimes cache to others via cached_stat() 3103 31042016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3105 3106 * Makefile (_MAKE_VERSION): 20160604 3107 Merge with NetBSD make, pick up 3108 o meta.c: missing filemon data is only relevant if we read a 3109 meta file. 3110 Also do not return oodate for a missing metafile if gn->path 3111 points to .CURDIR 3112 31132016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3114 3115 * Makefile (_MAKE_VERSION): 20160602 3116 Merge with NetBSD make, pick up 3117 o cached_realpath(): avoid hitting filesystem more than necessary. 3118 o meta.c: refactor need_meta decision, add knobs for 3119 missing meta file and filemon data wrt out-of-datedness. 3120 31212016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3122 3123 * Makefile (_MAKE_VERSION): 20160528 3124 3125 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 3126 31272016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 3128 3129 * Makefile (_MAKE_VERSION): 20160512 3130 Merge with NetBSD make, pick up 3131 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 3132 this is useful for gcov builds. 3133 o propagate errors from filemon(4). 3134 31352016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 3136 3137 * Makefile (_MAKE_VERSION): 20160509 3138 Merge with NetBSD make, pick up 3139 o remove use of non-standard types u_int etc. 3140 o meta.c: apply realpath() before matching against metaIgnorePaths 3141 31422016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 3143 3144 * Makefile (_MAKE_VERSION): 20160404 3145 Merge with NetBSD make, pick up 3146 o allow makefile to set .MAKE.JOBS 3147 3148 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 3149 31502016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 3151 3152 * Makefile (_MAKE_VERSION): 20160315 3153 Merge with NetBSD make, pick up 3154 o fix handling of archive members 3155 31562016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3157 3158 * Makefile (_MAKE_VERSION): rename variable to avoid interference 3159 with checks for ${MAKE_VERSION} 3160 31612016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 3162 3163 * Makefile (MAKE_VERSION): 20160310 3164 Merge with NetBSD make, pick up 3165 o meta.c: treat missing Read file same as Write, incase we Delete it. 3166 31672016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 3168 3169 * Makefile (MAKE_VERSION): 20160307 3170 Merge with NetBSD make, pick up 3171 o var.c: fix :ts\nnn to be octal by default. 3172 o meta.c: meta_finish() to cleanup memory. 3173 31742016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 3175 3176 * Makefile (MAKE_VERSION): 20160226 3177 Merge with NetBSD make, pick up 3178 o meta.c: allow meta file for makeDepend if makefiles want it. 3179 31802016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 3181 3182 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 3183 for backwards compatability. 3184 3185 * Makefile (MAKE_VERSION): 20160220 3186 Merge with NetBSD make, pick up 3187 o var.c: add knob to control handling of '$$' in := 3188 31892016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3190 3191 * Makefile (MAKE_VERSION): 20160218 3192 Merge with NetBSD make, pick up 3193 o var.c: add .export-literal allows us to fix sys.clean-env.mk 3194 post the changes to Var_Subst. 3195 Var_Subst now takes flags, and does not consume '$$' in := 3196 31972016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 3198 3199 * Makefile (MAKE_VERSION): 20160217 3200 Merge with NetBSD make, pick up 3201 o var.c: preserve '$$' in := 3202 o parse.c: add .dinclude for handling included 3203 makefile like .depend 3204 32052015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 3206 3207 * Makefile (MAKE_VERSION): 20151220 3208 Merge with NetBSD make, pick up 3209 o suff.c: re-initialize suffNull when clearing suffixes. 3210 32112015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 3212 3213 * Makefile (MAKE_VERSION): 20151201 3214 Merge with NetBSD make, pick up 3215 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 3216 o meta.c: meta_oodate: use lstat(2) for checking link target 3217 in case it is a symlink. 3218 o var.c: avoid calling brk_string and Var_Export1 with empty 3219 strings. 3220 32212015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3222 3223 * Makefile (MAKE_VERSION): 20151126 3224 Merge with NetBSD make, pick up 3225 o parse.c: ParseTrackInput don't access beyond 3226 end of old value. 3227 32282015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 3229 3230 * Makefile (MAKE_VERSION): 20151022 3231 3232 * Add support for BSD/OS which lacks inttypes.h 3233 and really needs sys/param.h for sys/sysctl.h 3234 also 'type' is not a shell builtin. 3235 3236 * var.c: eliminate uint32_t and need for inttypes.h 3237 3238 * main.c: PrintOnError flush stdout before run .ERROR 3239 3240 * parse.c: cope with _SC_PAGESIZE not being defined. 3241 3242 32432015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 3244 3245 * Makefile (MAKE_VERSION): 20151020 3246 Merge with NetBSD make, pick up 3247 o var.c: fix uninitialized var 3248 32492015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 3250 3251 * var.c: the conditional expressions used with ':?' can be 3252 expensive, if already discarding do not evaluate or expand 3253 anything. 3254 32552015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3256 3257 * Makefile (MAKE_VERSION): 20151010 3258 Merge with NetBSD make, pick up 3259 o Add Boolean wantit flag to Var_Subst and Var_Parse 3260 when FALSE we know we are discarding the result and can 3261 skip operations like Cmd_Exec. 3262 32632015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3264 3265 * Makefile (MAKE_VERSION): 20151009 3266 Merge with NetBSD make, pick up 3267 o var.c: don't check for NULL before free() 3268 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 3269 32702015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3271 3272 * Makefile (MAKE_VERSION): 20150910 3273 Merge with NetBSD make, pick up 3274 o main.c: with -w print Enter/Leaving messages for objdir too 3275 if necessary. 3276 o centralize shell metachar handling 3277 3278 * FILES: add metachar.[ch] 3279 32802015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3281 3282 * Makefile (MAKE_VERSION): 20150606 3283 Merge with NetBSD make, pick up 3284 o make.1: document .OBJDIR target 3285 32862015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3287 3288 * Makefile (MAKE_VERSION): 20150505 3289 Merge with NetBSD make, pick up 3290 o cond.c: be strict about lhs of comparison when evaluating .if 3291 but less so when called from variable expansion. 3292 o unit-tests/cond2.mk: test various error conditions 3293 32942015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 3295 3296 * machine.sh (MACHINE): Add Bitrig 3297 patch from joerg@netbsd.org 3298 32992015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3300 3301 * Makefile (MAKE_VERSION): 20150418 3302 Merge with NetBSD make, pick up 3303 o job.c: use memmove() rather than memcpy() 3304 3305 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 3306 case, so skip it. 3307 33082015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3309 3310 * Makefile (MAKE_VERSION): 20150411 3311 bump version - only mk/ changes. 3312 33132015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3314 3315 * Makefile (MAKE_VERSION): 20150410 3316 Merge with NetBSD make, pick up 3317 o document different handling of '-' in jobs mode vs compat 3318 o fix jobs mode so that '-' only applies to whole job 3319 when shell lacks hasErrCtl 3320 o meta.c: use separate vars to track lcwd and latestdir (read) 3321 per process 3322 33232015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 3324 3325 * Makefile (MAKE_VERSION): 20150401 3326 Merge with NetBSD make, pick up 3327 o meta.c: close meta file in child 3328 3329 * Makefile: use BINDIR.bmake if set. 3330 Same for MANDIR and SHAREDIR 3331 Handy for testing release candidates 3332 in various environments. 3333 33342015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3335 3336 * move initialization of savederr to block where it is used 3337 to avoid spurious warning from gcc5 3338 33392014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3340 3341 * Makefile (MAKE_VERSION): 20141111 3342 just a cooler number 3343 33442014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 3345 3346 * Makefile (MAKE_VERSION): 20141105 3347 Merge with NetBSD make, pick up 3348 o revert major overhaul of suffix handling 3349 and POSIX compliance - too much breakage 3350 and impossible to make backwards compatible. 3351 o we still have the new unit test structure which is ok. 3352 o meta.c ensure "-- filemon" is at start of line. 3353 33542014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 3355 3356 * configure.in: test that result of getconf PATH_MAX is numeric 3357 and discard if not. Apparently needed for Hurd. 3358 33592014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3360 3361 * Makefile (MAKE_VERSION): 20140830 3362 Merge with NetBSD make, pick up 3363 o major overhaul of suffix handling 3364 o improved POSIX compliance 3365 o overhauled unit-tests 3366 33672014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3368 3369 * Makefile (MAKE_VERSION): 20140620 3370 Merge with NetBSD make, pick up 3371 o var.c return varNoError rather than var_Error for ::= modifiers. 3372 33732014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 3374 3375 * Makefile (MAKE_VERSION): 20140522 3376 Merge with NetBSD make, pick up 3377 o var.c detect some parse errors. 3378 33792014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3380 3381 * Fix spelling errors - patch from Pedro Giffuni 3382 33832014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 3384 3385 * Makefile (MAKE_VERSION): 20140214 3386 Merge with NetBSD make, pick up 3387 o .INCLUDEFROM* 3388 o use Var_Value to get MAKEOBJDIR[PREFIX] 3389 o reduced realloc'ign in brk_string. 3390 * configure.in: add a check for compiler supporting __func__ 3391 33922014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3393 3394 * boot-strap: ignore mksrc=none 3395 33962014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 3397 3398 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 3399 34002014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3401 3402 * Makefile (MAKE_VERSION): 20140101 3403 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 3404 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 3405 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 3406 Hurd) 3407 * configure.in: Add AC_PREREQ and check for 3408 sysctl; patch from Andrew Shadura andrewsh at debian.org 3409 34102013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3411 3412 * Makefile (MAKE_VERSION): 20131010 3413 * lose the const from arg to systcl to avoid problems on older BSDs. 3414 34152013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3416 3417 * Makefile (MAKE_VERSION): 20131001 3418 Merge with NetBSD make, pick up 3419 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 3420 hw.machine_arch if necessary. 3421 o meta.c: meta_oodate - need to look at src of Link and target 3422 of Move as well. 3423 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 3424 provide __arraycount() if needed. 3425 34262013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 3427 3428 * Makefile (MAKE_VERSION): 20130904 3429 Merge with NetBSD make, pick up 3430 o Add VAR_INTERNAL context, so that internal setting of 3431 MAKEFILE does not override value set by makefiles. 3432 34332013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 3434 3435 * Makefile (MAKE_VERSION): 20130902 3436 Merge with NetBSD make, pick up 3437 o CompatRunCommand: only apply shellErrFlag when errCheck is true 3438 34392013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3440 3441 * Makefile (MAKE_VERSION): 20130828 3442 Merge with NetBSD make, pick up 3443 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 3444 o Call Job_SetPrefix() from Job_Init() so makefiles have 3445 opportunity to set .MAKE.JOB.PREFIX 3446 34472013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 3448 3449 * Makefile (MAKE_VERSION): 20130730 3450 Merge with NetBSD make, pick up 3451 o Allow suppression of --- job -- tokens by setting 3452 .MAKE.JOB.PREFIX empty. 3453 34542013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 3455 3456 * Makefile (MAKE_VERSION): 20130716 3457 Merge with NetBSD make, pick up 3458 o number of gmake compatibility tweaks 3459 -w for gmake style entering/leaving messages 3460 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 3461 handle MAKEFLAGS containing only letters. 3462 o when overriding a GLOBAL variable on the command line, 3463 delete it from GLOBAL context so -V doesn't show the wrong 3464 value. 3465 34662013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 3467 3468 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 3469 3470 * Makefile (MAKE_VERSION): 20130706 3471 Merge with NetBSD make, pick up 3472 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 3473 true so that CompatRunCommand() can use it, to ensure 3474 consistent behavior with jobs mode. 3475 o use MAKE_LEVEL_ENV to define the variable to propagate 3476 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 3477 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 3478 paths to ignore. 3479 34802013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3481 3482 * Makefile (MAKE_VERSION): 20130604 3483 Merge with NetBSD make, pick up 3484 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 3485 to avoid leaking descriptors. 3486 34872013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3488 3489 * Makefile (MAKE_VERSION): 20130528 3490 Merge with NetBSD make, pick up 3491 o var.c: cleanup some left-overs in VarHash() 3492 34932013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3494 3495 * Makefile (MAKE_VERSION): 20130520 3496 generate manifest from component FILES rather than have to 3497 update FILES when mk/FILES changes. 3498 34992013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3500 3501 * Makefile (MAKE_VERSION): 20130518 3502 Merge with NetBSD make, pick up 3503 o suff.c: don't skip all processsing for .PHONY targets 3504 else wildcard srcs do not get expanded. 3505 o var.c: expand name of variable to delete if necessary. 3506 35072013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3508 3509 * Makefile (MAKE_VERSION): 20130330 3510 Merge with NetBSD make, pick up 3511 o meta.c: refine the handling of .OODATE in commands. 3512 Rather than suppress command comparison for the entire script 3513 as though .NOMETA_CMP had been used, only suppress it for the 3514 one command line. 3515 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3516 suppress comparison of a command without otherwise affecting it. 3517 o make.1: document that 3518 35192013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3520 3521 * Makefile (MAKE_VERSION): 20130321 3522 yes, not quite right but its a cooler number. 3523 Merge with NetBSD make, pick up 3524 o parse.c: fix ParseGmakeExport to be portable 3525 and add a unit-test. 3526 * meta.c: call meta_init() before makefiles are read and if built 3527 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3528 this let's makefiles test for support. 3529 Call meta_mode_init() to process .MAKE.MODE. 3530 35312013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3532 3533 * Makefile (MAKE_VERSION): 20130305 3534 Merge with NetBSD make, pick up 3535 o run .STALE: target when a dependency from .depend is missing. 3536 o job.c: add Job_RunTarget() for the above and .BEGIN 3537 35382013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3539 3540 * Makefile (MAKE_VERSION): 20130303 3541 Merge with NetBSD make, pick up 3542 o main.c: set .MAKE.OS to utsname.sysname 3543 o job.c: more checks for read and poll errors 3544 o var.c: lose VarChangeCase() saves 4% time 3545 35462013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3547 3548 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3549 want to use MAKEOBJDIR 3550 35512013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3552 3553 * Merge with NetBSD make, pick up 3554 o make.1: more info on how shell commands are handled. 3555 o job.c,main.c: detect write errors to job pipes. 3556 35572013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3558 3559 * Makefile (MAKE_VERSION): 20130123 3560 Merge with NetBSD make, pick up 3561 o meta.c: if script uses .OODATE and meta_oodate() decides 3562 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3563 o var.c: in debug output indicate which variabale modifiers 3564 apply to. 3565 o remove Check_Cwd logic the makefiles have been fixed. 3566 35672012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3568 3569 * makefile.in: add a simple makefile for folk who insist on 3570 ./configure; make; make install 3571 it just runs boot-strap 3572 * include mk/* to accommodate the above 3573 * boot-strap: re-work to accommodate the above 3574 mksrc defaults to $Mydir/mk 3575 allow op={configure,build,install,clean,all} 3576 add options to facilitate install 3577 * Makefile.config.in: just the bits set by configure 3578 * Makefile: bump version to 20121212 3579 abandon Makefile.in (NetBSD Makefile) 3580 leverage mk/* instead 3581 * configure.in: ensure srcdir is absolute 3582 35832012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3584 3585 * Makefile.in (MAKE_VERSION): 20121111 3586 fix generation of bmake.cat1 3587 35882012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3589 3590 * Makefile.in (MAKE_VERSION): 20121109 3591 Merge with NetBSD make, pick up 3592 o make.c: MakeBuildChild: return 0 so search continues if a 3593 .ORDER dependency is detected. 3594 o unit-tests/order: test the above 3595 35962012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3597 3598 * Makefile.in (MAKE_VERSION): 20121102 3599 Merge with NetBSD make, pick up 3600 o cond.c: allow cond_state[] to grow. 3601 In meta mode with a very large tree, we can hit the limit 3602 while processing dirdeps. 3603 36042012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3605 3606 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3607 36082012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3609 3610 * Makefile.in (MAKE_VERSION): 20121010 3611 o protect syntax that only bmake parses correctly. 3612 o remove auto setting of FORCE_MACHINE, use configure's 3613 --with-force-machine=whatever if that is desired. 3614 36152012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3616 3617 * Makefile.in: do not lose history from make.1 when generating bmake.1 3618 36192012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3620 3621 * Makefile.in (MAKE_VERSION): 20121007 3622 Merge with NetBSD make, pick up 3623 o compat.c: ignore empty commands - same as jobs mode. 3624 o make.1: document meta chars that cause use of shell 3625 36262012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3627 3628 * Makefile.in (MAKE_VERSION): bump version to 20120911 3629 * bsd.after-import.mk: include Makefile.inc early and allow it to 3630 override PROG 3631 36322012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3633 3634 * Makefile.in (MAKE_VERSION): bump version to 20120831 3635 Merge with NetBSD make, pick up 3636 o cast sizeof() to int for comparison 3637 o minor make.1 tweak 3638 36392012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3640 3641 * Makefile.in (MAKE_VERSION): bump version to 20120830 3642 Merge with NetBSD make, pick up 3643 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3644 o debug flag -dV causes -V to show raw value regardless. 3645 36462012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3647 3648 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3649 gets SRCTOP set. 3650 36512012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3652 3653 * Makefile.in (MAKE_VERSION): bump version to 20120704 3654 Merge with NetBSD make, pick up 3655 o Job_ParseShell should call Shell_Init if it has been 3656 previously called. 3657 * Makefile.in: set USE_META based on configure result. 3658 also .PARSEDIR is safer indicator of bmake. 3659 36602012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3661 3662 * Makefile.in: bump version to 20120626 3663 ensure CPPFLAGS is in CFLAGS 3664 * meta.c: avoid nested externs 3665 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3666 36672012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3668 3669 * Makefile.in (MAKE_VERSION): bump version to 20120620 3670 Merge with NetBSD make, pick up 3671 o make_malloc.c: avoid including make_malloc.h again 3672 3673 * Makefile.in: avoid bmake only syntax or protect with 3674 .if defined(.MAKE.LEVEL) 3675 * bsd.after-import.mk: replace .-include with .sinclude 3676 ensure? SRCTOP gets a value 3677 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3678 36792012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3680 3681 * Makefile.in (MAKE_VERSION): bump version to 20120612 3682 Merge with NetBSD make, pick up 3683 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3684 for greater portability. 3685 o unit-tests/forloop: check that .for works as expected wrt 3686 number of times and with "quoted strings". 3687 36882012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3689 3690 * Makefile.in (MAKE_VERSION): bump version to 20120606 3691 Merge with NetBSD make, pick up 3692 o compat.c: use kill(2) rather than raise(3). 3693 * configure.in: look for sys/dev/filemon 3694 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3695 and pass BOOTSTRAP_XTRAS to boot-strap. 3696 36972012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3698 3699 * Makefile.in (MAKE_VERSION): bump version to 20120604 3700 Merge with NetBSD make, pick up 3701 o util.c and var.c share same var for tracking if environ 3702 has been reallocated. 3703 o util.c provide getenv with setenv. 3704 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3705 when the shell actively strips .MAKE.* from the environment. 3706 We still refer to the variable always as .MAKE.LEVEL 3707 * util.c fix bug in findenv() was finding prefix of name. 3708 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3709 results in more reliable termination of all activity on many 3710 platforms. 3711 37122012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3713 3714 * Makefile.in (MAKE_VERSION): bump version to 20120602 3715 Merge with NetBSD make, pick up 3716 o for.c: handle quoted items in .for list 3717 37182012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3719 3720 * Makefile.in (MAKE_VERSION): bump version to 20120530 3721 Merge with NetBSD make, pick up 3722 o compat.c: ignore empty command. 3723 37242012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3725 3726 * Makefile.in (MAKE_VERSION): bump version to 20120524 3727 * FILES: add bsd.after-import.mk: 3728 A simple means of integrating bmake into a BSD build system. 3729 37302012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3731 3732 * Makefile.in (MAKE_VERSION): bump version to 20120520 3733 Merge with NetBSD make, pick up 3734 o increased limit for nested conditionals. 3735 37362012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3737 3738 * Makefile.in (MAKE_VERSION): bump version to 20120518 3739 Merge with NetBSD make, pick up 3740 o use _exit(2) in signal hanlder 3741 o Don't use the [dir] cache when building nodes that might have 3742 changed since the last exec. 3743 o Avoid nested extern declaration warnings. 3744 37452012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3746 3747 * meta.c (fgetLine): avoid %z - not portable. 3748 * parse.c: Since we moved include of sys/mman.h 3749 and def's of MAP_COPY etc. we got dups from a merge. 3750 37512012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3752 3753 * Makefile.in (MAKE_VERSION): bump version to 20120420 3754 Merge with NetBSD make, pick up 3755 o restore duplicate supression in .MAKE.MAKEFILES 3756 runtime saving can be significant. 3757 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3758 consumption up to 20%. 3759 37602012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3761 3762 * Makefile.in (MAKE_VERSION): bump version to 20120420 3763 Merge with NetBSD make, pick up 3764 o remove duplicate supression in .MAKE.MAKEFILES 3765 o improved dir cache behavior 3766 o gmake'ish export command 3767 37682012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3769 3770 * Makefile.in (MAKE_VERSION): bump version to 20120325 3771 Merge with NetBSD make, pick up 3772 o fix parsing of :[#] in conditionals. 3773 37742012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3775 3776 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3777 since some systems cannot cope with .Nx <version> 3778 37792011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3780 3781 * Makefile.in (MAKE_VERSION): bump version to 20111111 3782 Merge with NetBSD make, pick up 3783 o debug output for .PARSEDIR and .PARSEFILE 3784 37852011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3786 3787 * Makefile.in (MAKE_VERSION): bump version to 20111010 3788 37892011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3790 3791 * boot-strap: check for an expected file in the dirs we look for. 3792 * make-bootstrap.sh: pass on LDSTATIC 3793 37942011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3795 3796 * Makefile.in (MAKE_VERSION): bump version to 20111001 3797 Merge with NetBSD make, pick up 3798 o ensure .PREFIX is set for .PHONY 3799 and .TARGET set for .PHONY run via .END 3800 o __dead used consistently 3801 38022011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3803 3804 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3805 38062011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3807 3808 * Makefile.in (MAKE_VERSION): bump version to 20110905 3809 Merge with NetBSD make, pick up 3810 o meta_oodate: ignore makeDependfile 3811 38122011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3813 3814 * Makefile.in (MAKE_VERSION): bump version to 20110828 3815 Merge with NetBSD make, pick up 3816 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3817 as SILENT if a .meta file is created 3818 38192011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3820 3821 * Makefile.in (MAKE_VERSION): bump version to 20110818 3822 Merge with NetBSD make, pick up 3823 o in meta mode, if target flagged .META a missing .meta file 3824 means target is out-of-date 3825 o fixes for gcc 4.5 warnings 3826 o simplify job printing code 3827 38282011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3829 3830 * Makefile.in (MAKE_VERSION): bump version to 20110808 3831 Merge with NetBSD make, pick up 3832 o do not touch OP_SPECIAL targets when doing make -t 3833 38342011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3835 3836 * Makefile.in (MAKE_VERSION): bump version to 20110622 3837 Merge with NetBSD make, pick up 3838 o meta_oodate detect corrupted .meta file and declare oodate. 3839 * configure.in: add check for setsid 3840 38412011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3842 3843 * Merge with NetBSD make, pick up 3844 o unit-tests/modts now works on MirBSD 3845 38462011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3847 3848 * Makefile.in (MAKE_VERSION): bump version to 20110606 3849 Merge with NetBSD make, pick up 3850 o ApplyModifiers: when we parse a variable which is not 3851 the entire modifier string, or not followed by ':', do not 3852 consider it as containing modifiers. 3853 o loadfile: ensure newline at end of mapped file. 3854 38552011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3856 3857 * Makefile.in (MAKE_VERSION): bump version to 20110505 3858 Merge with NetBSD make, pick up 3859 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3860 of make's control. In meta mode, any generated file within 3861 said bailiwick, which is found to be missing, causes current 3862 target to be out-of-date. 3863 38642011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3865 3866 * Makefile.in (MAKE_VERSION): bump version to 20110411 3867 Merge with NetBSD make, pick up 3868 o when long modifiers fail to match, check sysV style. 3869 - add a test case 3870 38712011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3872 3873 * Makefile.in (MAKE_VERSION): bump version to 20110410 3874 Merge with NetBSD make, pick up 3875 o :hash - cheap 32bit hash of value 3876 o :localtime, :gmtime - use value as format string for strftime. 3877 38782011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3879 3880 * Makefile.in (MAKE_VERSION): bump version to 20110330 3881 mostly because its a cooler version. 3882 Merge with NetBSD make, pick up 3883 o NetBSD tags for meta.[ch] 3884 o job.c call meta_job_finish() after meta_job_error(). 3885 o meta_job_error() should call meta_job_finish() to ensure 3886 .meta file is closed, and safe to copy - if .ERROR target wants. 3887 meta_job_finish() is safe to call repeatedly. 3888 38892011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3890 3891 * unit-tests/modts: use printf if it is a builtin, 3892 to save us from MirBSD 3893 3894 * Makefile.in (MAKE_VERSION): bump version to 20110329 3895 Merge with NetBSD make, pick up 3896 o fix for use after free() in CondDoExists(). 3897 o meta_oodate() report extra commands and return earlier. 3898 38992011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3900 3901 * Makefile.in (MAKE_VERSION): bump version to 20110327 3902 Merge with NetBSD make, pick up 3903 o meta.c, if .MAKE.MODE contains curdirOk=yes 3904 allow creating .meta files in .CURDIR 3905 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3906 formats the output of 'type' differently - so eat any "()" 3907 39082011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3909 3910 * Makefile.in (MAKE_VERSION): bump version to 20110306 3911 Merge with NetBSD make, pick up 3912 o meta.c, only do getcwd() once 3913 39142011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3915 3916 * Makefile.in (MAKE_VERSION): bump version to 20110305 3917 Merge with NetBSD make, pick up 3918 o correct sysV substitution handling of empty lhs and variable 3919 o correct exists() check for dir with trailing / 3920 o correct handling of modifiers for non-existant variables 3921 during evaluation of conditionals. 3922 o ensure MAP_FILE is defined. 3923 o meta.c use curdir[] now exported by main.c 3924 39252011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3926 3927 * Makefile.in (MAKE_VERSION): bump version to 20110225 3928 Merge with NetBSD make, pick up 3929 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3930 makefiles have been read. 3931 o fix example of :? modifier in man page. 3932 39332011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3934 3935 * Makefile.in (MAKE_VERSION): bump version to 20110214 3936 Merge with NetBSD make, pick up 3937 o meta.c handle realpath() failing when generating meta file 3938 name. 3939 3940 * sigcompat.c: convert to ansi so we can use higher warning levels. 3941 3942 39432011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3944 3945 * Makefile.in (MAKE_VERSION): bump version to 20110207 3946 Merge with NetBSD make, pick up 3947 o fix for bug in meta mode. 3948 39492011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3950 3951 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3952 39532011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3954 3955 * Makefile.in (MAKE_VERSION): bump version to 20110101 3956 Merge with NetBSD make, pick up 3957 o use mmap(2) if available, for reading makefiles 3958 39592010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3960 3961 * Makefile.in (MAKE_VERSION): bump version to 20101215 3962 Merge with NetBSD make, pick up 3963 o ensure meta_job_error() does not report a previous .meta file 3964 as being culprit. 3965 39662010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3967 3968 * Makefile.in (MAKE_VERSION): bump version to 20101210 3969 Merge with NetBSD make, pick up 3970 o meta_oodate: track cwd per process, and only consider target 3971 out-of-date if missing file is outside make's CWD. 3972 Ignore files in /tmp/ etc. 3973 o to ensure unit-tests results match, need to control LC_ALL 3974 as well as LANG. 3975 o fix for parsing bug in var.c 3976 39772010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3978 3979 * Makefile.in (MAKE_VERSION): bump version to 20101126 3980 Merge with NetBSD make, pick up 3981 o if stale dependency is an IMPSRC, search via .PATH 3982 o meta_oodate: if a referenced file is missing, target is 3983 out-of-date. 3984 o meta_oodate: if a target uses .OODATE in its commands, 3985 it (.OODATE) needs to be recomputed. 3986 o keep a pointer to youngest child node, rather than just its 3987 mtime. 3988 39892010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3990 3991 * Makefile.in (MAKE_VERSION): bump version to 20101101 3992 39932010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3994 3995 * machine.sh: like os.sh, 3996 allow for uname -p producing useless drivel 3997 39982010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3999 4000 * boot-strap: document configure knobs for meta and filemon. 4001 4002 * Makefile.in (MAKE_VERSION): bump version to 20100911 4003 Merge with NetBSD make, pick up 4004 o meta.c - meta mode 4005 4006 * make-bootstrap.sh.in: handle meta.c 4007 * configure.in: add knobs for use_meta and filemon_h 4008 also, look for dirname, str[e]sep and strlcpy 4009 * util.c: add simple err[x] and warn[x] 4010 40112010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 4012 4013 * boot-strap (TOOL_DIFF): set this to ensure tests use 4014 the same version of diff that configure tested 4015 4016 * Makefile.in (MAKE_VERSION): bump version to 20100808 4017 Merge with NetBSD make, pick up 4018 o in jobs mode, when we discover we cannot make something, 4019 call PrintOnError before exit. 4020 40212010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 4022 4023 * Makefile.in (MAKE_VERSION): bump version to 20100806 4024 Merge with NetBSD make, pick up 4025 o formatting fixes for ignored errors 4026 o ensure jobs are cleaned up regardless of where wait() was called. 4027 40282010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 4029 4030 * Makefile.in (MAKE_VERSION): bump version to 20100618 4031 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 4032 40332010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 4034 4035 * Makefile.in (MAKE_VERSION): bump version to 20100616 4036 Merge with NetBSD make, pick up 4037 o man page update 4038 o call PrintOnError from JobFinish when we detect an error we 4039 are not ignoring. 4040 40412010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 4042 4043 * Makefile.in (MAKE_VERSION): bump version to 20100606 4044 Merge with NetBSD make, pick up 4045 o man page update 4046 40472010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 4048 4049 * Makefile.in (MAKE_VERSION): bump version to 20100605 4050 Merge with NetBSD make, pick up 4051 o use bmake_signal() which is a wrapper around sigaction() 4052 in place of signal() 4053 o add .export-env to allow exporting variables to environment 4054 without tracking (so no re-export when the internal value is 4055 changed). 4056 40572010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 4058 4059 * Makefile.in (MAKE_VERSION): bump version to 20100524 4060 Merge with NetBSD make, pick up 4061 o fix for .info et al being greedy. 4062 40632010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 4064 4065 * Makefile.in (MAKE_VERSION): bump version to 20100520 4066 Merge with NetBSD make, pick up 4067 o back to using realpath on argv[0] 4068 but only if contains '/' and does not start with '/'. 4069 40702010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 4071 4072 * boot-strap: use absolute path for bmake when running tests. 4073 4074 * Makefile.in (MAKE_VERSION): bump version to 20100510 4075 Merge with NetBSD make, pick up 4076 o revert use of realpath on argv[0] 4077 too many corner cases. 4078 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 4079 40802010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 4081 4082 * Makefile.in (MAKE_VERSION): bump version to 20100505 4083 Merge with NetBSD make, pick up 4084 o fix for missed SIGCHLD when compiled with SunPRO 4085 actually for bmake, defining FORCE_POSIX_SIGNALS would have 4086 done the job. 4087 40882010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 4089 4090 * Makefile.in (MAKE_VERSION): bump version to 20100430 4091 Merge with NetBSD make, pick up 4092 o fflush stdout before writing to stdout 4093 40942010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 4095 4096 * Makefile.in (MAKE_VERSION): bump version to 20100423 4097 Merge with NetBSD make, pick up 4098 o updated unit tests for Haiku (this time for sure). 4099 * boot-strap: based on patch from joerg 4100 honor --with-default-sys-path better. 4101 * boot-strap: remove mention of --with-prefix-sys-path 4102 41032010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 4104 4105 * Makefile.in (MAKE_VERSION): bump version to 20100422 4106 * Merge with NetBSD make, pick up 4107 o fix for vfork() on Darwin. 4108 o fix for bogus $TMPDIR. 4109 o set .MAKE.MODE=compat for -B 4110 o set .MAKE.JOBS=max_jobs for -j max_jobs 4111 o allow unit-tests to run without any *.mk 4112 o unit-tests/modmisc be more conservative in dirs presumed to exist. 4113 * boot-strap: ignore /usr/share/mk except on NetBSD. 4114 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 4115 ensure sort(1) behaves as expected. 4116 41172010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 4118 4119 * boot-strap: add FindHereOrAbove so we can use -m .../mk 4120 41212010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 4122 4123 * Makefile.in (MAKE_VERSION): bump version to 20100420 4124 * Merge with NetBSD make, pick up 4125 o fix for variable realpath() behavior. 4126 we have to stat(2) the result to be sure. 4127 o fix for .export (all) when nested vars use :sh 4128 41292010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 4130 4131 * Makefile.in (MAKE_VERSION): bump version to 20100414 4132 * Merge with NetBSD make, pick up 4133 o use realpath to resolve argv[0] (for .MAKE) if needed. 4134 o add realpath from libc. 4135 o add :tA to resolve variable via realpath(3) if possible. 4136 41372010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 4138 4139 * Makefile.in (MAKE_VERSION): bump version to 20100408 4140 * Merge with NetBSD make, pick up 4141 o unit tests for .ERROR, .error 4142 o fix for .ERROR to ensure it cannot be default target. 4143 41442010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 4145 4146 * Makefile.in (MAKE_VERSION): bump version to 20100406 4147 * Merge with NetBSD make, pick up 4148 o fix for compat mode "Error code" going to debug_file. 4149 o fix for .ALLSRC being populated twice. 4150 o support for .info, .warning and .error directives 4151 o .MAKE.MODE to control make's operational mode 4152 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 4153 name(s). 4154 o .MAKE.DEPENDFILE to control the name of the depend file 4155 o .ERROR target - run on failure. 4156 41572010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 4158 4159 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 4160 4161 * os.sh,arch.c: patch for Haiku from joerg at netbsd 4162 41632010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 4164 4165 * Makefile.in (MAKE_VERSION): bump version to 20100222 4166 * Merge with NetBSD make, pick up 4167 o better error msg for .for with mutiple inter vars 4168 4169 * boot-strap: 4170 o use make-bootstrap.sh from joerg at netbsd 4171 to avoid the need for a native make when bootstrapping. 4172 o add "" everywhere ;-) 4173 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 4174 otherwise the pre-formated version. 4175 41762010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 4177 4178 * Makefile.in (MAKE_VERSION): bump version to 20100102 4179 * Merge with NetBSD make, pick up: 4180 o fix for -m .../ 4181 41822009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 4183 4184 * Makefile.in (MAKE_VERSION): bump version to 20091118 4185 * Merge with NetBSD make, pick up: 4186 o .unexport 4187 o report lines that start with '.' and should have ':' 4188 (catch typo's of .el*if). 4189 41902009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4191 4192 * configure.in: Ensure that srcdir and mksrc are absolute paths. 4193 41942009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4195 4196 * Makefile.in (MAKE_VERSION): fix version to 20091007 4197 41982009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 4199 4200 * Makefile.in (MAKE_VERSION): bump version to 200910007 4201 * Merge with NetBSD make, pick up: 4202 o fix for parsing of :S;...;...; applied to .for loop iterator 4203 appearing in a dependency line. 4204 42052009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4206 4207 * Makefile.in (MAKE_VERSION): bump version to 20090909 4208 * Merge with NetBSD make, pick up: 4209 o fix for -C, .CURDIR and .OBJDIR 4210 * boot-strap: 4211 o allow share_dir to be set independent of prefix. 4212 o select default share_dir better when prefix ends in $HOST_TARGET 4213 o if FORCE_BSD_MK etc were set, include them in the suggested 4214 install-mk command. 4215 42162009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 4217 4218 * Makefile.in (MAKE_VERSION): bump version to 20090908 4219 * Merge with NetBSD make, pick up: 4220 o .MAKE.LEVEL for recursion tracking 4221 o fix for :M scanning \: 4222 42232009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4224 4225 * configure.in: Don't -D__EXTENSIONS__ if 4226 AC_USE_SYSTEM_EXTENSIONS says "no". 4227 42282009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 4229 4230 * Makefile.in (MAKE_VERSION): bump version to 20090826 4231 Simplify MAKE_VERSION to just the bare date. 4232 * Merge with NetBSD make, pick up: 4233 o -C directory support. 4234 o support for SIGINFO 4235 o use $TMPDIR for temp files. 4236 o child of vfork should be careful about modifying parent's state. 4237 4238 42392009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 4240 4241 * Appy some patches for MiNT from David Brownlee 4242 42432009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 4244 4245 * Makefile.in (BMAKE_VERSION): bump version to 20090222 4246 * Merge with NetBSD make, pick up: 4247 o Possible null pointer de-ref in Var_Set. 4248 42492009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 4250 4251 * Makefile.in (BMAKE_VERSION): bump version to 20090204 4252 * Merge with NetBSD make, pick up: 4253 o bmake_malloc et al moved to their own .c 4254 o Count both () and {} when looking for the end of a :M pattern 4255 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 4256 o strlist.c - functions for processing extendable arrays of pointers to strings. 4257 o ClientData replaced with void *, so const void * can be used. 4258 o New debug flag C for DEBUG_CWD 4259 42602008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 4261 4262 * Makefile.in (BMAKE_VERSION): bump version to 20081111 4263 Apply patch from Joerg Sonnenberge to 4264 configure.in: 4265 o remove some redundant checks 4266 o check for emlloc etc only in libutil and require the whole family. 4267 util.c: 4268 o remove [v]asprintf which is no longer used. 4269 42702008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4271 4272 * Makefile.in (BMAKE_VERSION): bump version to 20081101 4273 * Merge with NetBSD make, pick up: 4274 o util.c: avoid use of putenv() - christos 4275 42762008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4277 4278 * Makefile.in (BMAKE_VERSION): bump version to 20081030 4279 pick up man page tweaks. 4280 42812008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 4282 4283 * Makefile.in: move processing of LIBOBJS to after is definition! 4284 thus we'll have getenv.c in SRCS only if needed. 4285 4286 * make.1: add examples of how to use :? 4287 4288 * Makefile.in (BMAKE_VERSION): bump version to 20081029 4289 * Merge with NetBSD make, pick up: 4290 o fix for .END processing with -j 4291 o segfault from Parse_Error when no makefile is open 4292 o handle numeric expressions in any variable expansion 4293 o debug output now defaults to stderr, -dF to change it - apb 4294 o make now uses bmake_malloc etc so that it can build natively 4295 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 4296 42972008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 4298 4299 * Makefile.in (BMAKE_VERSION): bump version to 20080808 4300 * Merge with NetBSD make, pick up: 4301 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 4302 long lines in Makefiles 4303 o optimizations for VarQuote by joerg 4304 o fix for PR/38756: dominik: make dumps core on invalid makefile 4305 43062008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 4307 4308 * Makefile.in (BMAKE_VERSION): bump version to 20080515 4309 * Merge with NetBSD make, pick up: 4310 o fix skip setting vars in VAR_GLOBAL context, to handle 4311 cases where VAR_CMD is used for other than command line vars. 4312 43132008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 4314 4315 * boot-strap (make_version): we may need to look in 4316 $prefix/share/mk for sys.mk 4317 4318 * Makefile.in (BMAKE_VERSION): bump version to 20080514 4319 * Merge with NetBSD make, pick up: 4320 o skip setting vars in VAR_GLOBAL context, when already set in 4321 VAR_CMD which takes precedence. 4322 43232008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 4324 4325 * Makefile.in (BMAKE_VERSION): bump version to 20080330 4326 * Merge with NetBSD make, pick up: 4327 o fix for ?= when LHS contains variable reference. 4328 43292008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4330 4331 * merge some patches from NetBSD pkgsrc. 4332 4333 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 4334 the MAKSYSPATH used during bootstrap. 4335 4336 * Makefile.in (BMAKE_VERSION): bump version to 20080215 4337 * Merge with NetBSD make, pick up: 4338 o warn if non-space chars follow 'empty' in a conditional. 4339 43402008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4341 4342 * Makefile.in (BMAKE_VERSION): bump version to 20080118 4343 * Merge with NetBSD make, pick up: 4344 o consider dependencies read from .depend as optional - dsl 4345 o remember when buffer for reading makefile grows - dsl 4346 o add -dl (aka LOUD) - David O'Brien 4347 43482007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 4349 4350 * Makefile.in (BMAKE_VERSION): bump version to 20071022 4351 * Merge with NetBSD make, pick up: 4352 o Allow .PATH<suffix> to be used for .include "" 4353 4354 * boot-strap: source default settings from .bmake-boot-strap.rc 4355 43562007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 4357 4358 * Makefile.in: fix maninstall on various systems 4359 provided that our man.mk is used. 4360 For non-BSD systems we install the preformatted page 4361 into $MANDIR/cat1 4362 43632007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 4364 4365 * boot-strap: make bmake.1 too, so maninstall works. 4366 43672007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 4368 4369 * Makefile.in (BMAKE_VERSION): bump version to 20071014 4370 * Merge with NetBSD make, pick up: 4371 o revamped handling of defshell - configure no longer needs to 4372 know the content of the shells array - apb 4373 o stop Var_Subst modifying its input - apb 4374 o avoid calling ParseTrackInput too often - dsl 4375 43762007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 4377 4378 * Makefile.in (BMAKE_VERSION): bump version to 20071011 4379 * Merge with NetBSD make, pick up: 4380 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 4381 4382 * sigcompat.c: some tweaks for HP-UX 11.x based on 4383 patch from Tobias Nygren 4384 4385 * configure.in: update handling of --with-defshell to match 4386 new make behavior. --with-defshell=/usr/xpg4/bin/sh 4387 will now do what one might hope - provided the chosen shell 4388 behaves enough like sh. 4389 43902007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 4391 4392 * Makefile.in (BMAKE_VERSION): bump to 20071008 4393 * Merge with NetBSD make, pick up: 4394 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 4395 o .export/.MAKE.EXPORTED - export of variables - sjg 4396 o .MAKE.MAKEFILES - track all makefiles read - sjg 4397 o performance improvements - dsl 4398 o revamp parallel job scheduling - dsl 4399 44002006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4401 4402 * Makefile.in (BMAKE_VERSION): bump to 20060728 4403 * Merge with NetBSD make, pick up: 4404 o extra debug info during variable and cond processing - sjg 4405 o shell definition now covers newline - rillig 4406 o minor mem leak in PrintOnError - sjg 4407 44082006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4409 4410 * Makefile.in (BMAKE_VERSION): bump to 20060511 4411 * Merge with NetBSD make, pick up: 4412 o more memory leaks - coverity 4413 o possible overflow in ArchFindMember - coverity 4414 o extract variable modifier code out of Var_Parse() 4415 so it can be called recursively - sjg 4416 o unit-tests/moderrs - sjg 4417 44182006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 4419 4420 * Makefile.in (BMAKE_VERSION): bump to 20060412 4421 * Merge with NetBSD make, pick up: 4422 o fixes for some memory leaks - coverity 4423 o only read first sys.mk etc when searching sysIncPath - sjg 4424 4425 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 4426 setting ${MAKEFILE} - OBATA Akio 4427 44282006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 4429 4430 * Makefile.in (BMAKE_VERSION): bump to 20060318 4431 * Merge with NetBSD make, pick up: 4432 o cleanup of job.c to remove remote handling, distcc is more 4433 useful and this code was likely bit-rotting - dsl 4434 o fix for :P modifier - sjg 4435 * boot-strap: set default prefix to something reasonable 4436 (for me anyway). 4437 44382006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 4439 4440 * Makefile.in (BMAKE_VERSION): bump to 20060301 4441 * Merge with NetBSD make, pick up: 4442 o make .WAIT apply recursively, document and test case - apb 4443 o allow variable modifiers in a variable appear anywhere in 4444 modifier list, document and test case - sjg 4445 44462006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 4447 4448 * Makefile.in (BMAKE_VERSION): bump to 20060222 4449 * Merge with NetBSD make, pick up: 4450 o improved job token handling - dsl 4451 o SIG_DFL the correct signal before exec - dsl 4452 o more debug info during parsing - dsl 4453 o allow variable modifiers to be specified via variable - sjg 4454 * boot-strap: explain why we died if no mksrc 4455 44562005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 4457 4458 * Makefile.in (BMAKE_VERSION): bump to 20051105 4459 * configure.in: always set default_sys_path 4460 default is ${prefix}/share/mk 4461 - remove prefix_sys_path, anyone wanting more than above 4462 needs to set it manually. 4463 44642005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4465 4466 * boot-strap: make this a bit easier for pkgsrc folk. 4467 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 4468 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 4469 44702005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 4471 4472 * Makefile.in (BMAKE_VERSION): bump to 20051102 4473 * job.c (JobFinish): fix likely ancient merge lossage 4474 fix from Todd Vierling. 4475 * boot-strap (srcdir): allow setting mksrc=none 4476 44772005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 4478 4479 * Makefile.in (BMAKE_VERSION): bump to 20051031 4480 * ranlib.h: skip on OSF too. 4481 (NetBSD PR 31864) 4482 44832005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 4484 4485 * Makefile.in (BMAKE_VERSION): bump to 20051002 4486 fix a silly typo 4487 44882005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4489 4490 * Makefile.in (BMAKE_VERSION): bump to 20051001 4491 support for UnixWare and some other systems, 4492 based on patches from pkgsrc/bootstrap 4493 44942005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4495 4496 * Makefile.in (BMAKE_VERSION): bump to 20050901 4497 * Merge with NetBSD make, pick up: 4498 o possible parse error causing us to wander off. 4499 45002005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 4501 4502 * Makefile.in (BMAKE_VERSION): bump to 20050606 4503 * Merge with NetBSD make, pick up: 4504 o :0x modifier for randomizing a list 4505 o fixes for a number of -Wuninitialized issues. 4506 45072005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 4508 4509 * Makefile.in (BMAKE_VERSION): bump to 20050530 4510 * Merge with NetBSD make, pick up: 4511 o Handle dependencies for .BEGIN, .END and .INTERRUPT 4512 4513 * README: was seriously out of date. 4514 45152005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4516 4517 * Important to use .MAKE rather than MAKE. 4518 45192005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4520 4521 * Makefile.in (BMAKE_VERSION): bump to 20050315 4522 * Merge with NetBSD make, pick up: 4523 o don't mistake .elsefoo for .else 4524 o use suffix-specific search path correctly 4525 o bunch of style nits 4526 45272004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4528 4529 * boot-strap: 4530 o ensure that args to --src and --with-mksrc 4531 are resolved before giving them to configure. 4532 o add -o "objdir" so that builder can control it, 4533 default is $OS as determined by os.sh 4534 o add -q to suppress all the install instructions. 4535 45362004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4537 4538 * Remove __IDSTRING() 4539 4540 * Makefile.in (BMAKE_VERSION): bump to 20040508 4541 * Merge with NetBSD make, pick up: 4542 o posix fixes 4543 - remove '-e' from compat mode 4544 - add support for '+' command-line prefix. 4545 o fix for handling '--' on command-line. 4546 o fix include in lst.lib/lstInt.h to simplify '-I's 4547 o we also picked up replacement of MAKE_BOOTSTRAP 4548 with !MAKE_NATIVE which is a noop, but possibly confusing. 4549 45502004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4551 4552 * Makefile.in (BMAKE_VERSION): bump to 20040414 4553 * Merge with NetBSD make, pick up: 4554 o allow quoted strings on lhs of conditionals 4555 o issue warning when extra .else is seen 4556 o print line numer when errors encountered during parsing from 4557 string. 4558 45592004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4560 4561 * Makefile.in (BMAKE_VERSION): bump to 20040220 4562 * Merge with NetBSD make, pick up: 4563 o fix for old :M parsing bug. 4564 o re-jigged unit-tests 4565 45662004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4567 4568 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4569 so that './bmake -f Makefile test' works. 4570 45712004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4572 4573 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4574 * Merge with NetBSD make, pick up: 4575 o search upwards for *.mk 4576 o fix for double free of var substitution buffers 4577 o use of getopt replaced with custom code, since the usage 4578 (re-scanning) isn't posix compatible. 4579 45802004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4581 4582 * arch.c: don't include ranlib.h on ELF systems 4583 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4584 45852004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4586 4587 * Makefile.in (BMAKE_VERSION): bump to 20040118 4588 4589 * boot-strap (while): export vars we assign to on cmdline 4590 * unit-test/Makefile.in: ternary is .PHONY 4591 45922004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4593 4594 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4595 * Merge with NetBSD make, pick up: 4596 o fix for ternary modifier 4597 45982004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4599 4600 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4601 * Merge with NetBSD make, pick up: 4602 o fix for cond.c to handle compound expressions better 4603 o variable expansion within sysV style replacements 4604 46052003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4606 4607 * Make portable snprintf safer - output to /dev/null first to 4608 check space needed. 4609 4610 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4611 * Merge with NetBSD make, pick up: 4612 o -dg3 to show input graph when things go wrong. 4613 o explicitly look for makefiles in objdir if not found in curdir so 4614 that errors in .depend etc will be reported accurarely. 4615 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4616 instead as it more accurately reflects the expected behavior and 4617 is more consistently implemented. 4618 o avoid use of asprintf. 4619 46202003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4621 4622 * util.c: Add asprintf and vasprintf. 4623 4624 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4625 * Merge with NetBSD make, pick up: 4626 :[] modifier - allows picking words from a variable. 4627 :tW modifier - allows treating value as one big word. 4628 W flag for :C and :S - allows treating value as one big word. 4629 46302003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4631 4632 * Merge with NetBSD make 4633 pick up -de flag to enable printing failed command. 4634 don't skip 1st two dir entries (normally . and ..) since 4635 coda does not have them. 4636 46372003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4638 4639 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4640 * Merge with NetBSD make, pick up: 4641 - changes for -V '${VAR}' to print fully expanded value 4642 cf. -V VAR 4643 - CompatRunCommand now prints the command that failed. 4644 - several files got updated 3 clause Berkeley license. 4645 46462003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4647 4648 * boot-strap: Allow setting configure args on command line. 4649 46502003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4651 4652 * configure.in: add --with-defshell to allow sh or ksh 4653 to be selected as default shell. 4654 4655 * Makefile.in: bump version to 20030731 4656 4657 * Merge with NetBSD make 4658 Pick up .SHELL spec for ksh and associate man page changes. 4659 Also compat mode now uses the same shell specs. 4660 46612003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4662 4663 * var.c (Var_Parse): ensure delim is initialized. 4664 4665 * unit-tests/Makefile.in: use single quotes to avoid problems from 4666 some shells. 4667 4668 * makefile.boot.in: 4669 Run the unit-tests as part of the bootstrap procedure. 4670 46712003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4672 4673 * unit-tests/Makefile.in: always force complaints from 4674 ${TEST_MAKE} to be from 'make'. 4675 4676 * configure.in: add check for 'diff -u' 4677 also fix some old autoconf'isms 4678 4679 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4680 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4681 4682 * Merge with NetBSD make 4683 Pick up fix for :ts parsing error in some cases. 4684 Pick unit-tests. 4685 46862003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4687 4688 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4689 4690 * var.c (Var_Parse): fix bug in :ts modifier, after const 4691 correctness fixes, must pass nstr to VarModify. 4692 46932003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4694 4695 * Makefile.in: BMAKE_VERSION switch to a date based version. 4696 We'll generally use the date of last import from NetBSD. 4697 4698 * Merge with NetBSD make 4699 Pick up fixes for const-correctness, now passes WARNS=3 on 4700 NetBSD. 4701 Pick up :ts modifier, allows controlling the separator used 4702 between words in variable expansion. 4703 47042003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4705 4706 * FILES: include boot-strap and os.sh 4707 4708 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4709 FreeBSD is known to be bad. 4710 4711 * makefile.boot.in (bootstrap): make this the default target. 4712 4713 * Makefile.in: bump version to 3.1.19 4714 4715 * machine.sh: avoid A-Z with tr as it is bound to lose. 4716 47172003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4718 4719 * Merge with NetBSD make 4720 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4721 Plus some doc fixes. 4722 47232003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4724 4725 * Merge with NetBSD make 4726 Pick up fix for PR/1523 - don't count a library as built, if there 4727 is no way to build it 4728 4729 * Bump version to 3.1.18 4730 47312003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4732 4733 * Merge with NetBSD make 4734 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4735 appears in src list. 4736 47372003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4738 4739 * Merge with NetBSD make (mmm 10th anniversary!) 4740 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4741 pick up -X which tells us to not export VAR=val via setenv if 4742 we are already doing so via MAKEFLAGS. This saves valuable env 4743 space on systems like Darwin. 4744 set MAKE_VERSION to 3.1.17 4745 4746 * parse.c: pix up fix for suffix rules 4747 47482003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4749 4750 * Merge with NetBSD make. 4751 pick up fix for propagating -B via MAKEFLAGS. 4752 set MAKE_VERSION to 3.1.16 4753 4754 * Apply some patches from pkgsrc-bootstrap/bmake 4755 Originally by Grant Beattie <grant@netbsd.org> 4756 I may have missed some - since they are based on bmake-3.1.12 4757 47582002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4759 4760 * makefile.boot.in (bmake): update install targets for those that 4761 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4762 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4763 4764 * bmake.cat1: update the pre-formatted man page! 4765 47662002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4767 4768 * Merge with NetBSD make. 4769 pick up fix for premature free of pointer used in call 4770 to Dir_InitCur(). 4771 set MAKE_VERSION to 3.1.15 4772 47732002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4774 4775 * configure.in: determine suitable value for MKSRC. 4776 override using --with-mksrc=PATH. 4777 4778 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4779 configs(8) will use 'sun4' as an alias for 'sparc'. 4780 47812002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4782 4783 * Merge with NetBSD make. 4784 pick up ${.PATH} 4785 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4786 set MAKE_VERSION to 3.1.14 4787 add configure checks for killpg and sys/socket.h 4788 47892002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4790 4791 * tag bmake-3-1-13 4792 4793 * makefile.boot.in (bmake): use install-mk 4794 Also setup ./mk before trying to invoke bmake.boot incase we 4795 needed install-mk to create a sys.mk for us. 4796 4797 * configure.in: If we need to add -I${srcdir}/missing, make it an 4798 absolute path so that it works for lst.lib too. 4799 4800 * make.h: always include sys/cdefs.h since we provide one if the 4801 host does not. 4802 4803 * Makefile.in (install-mk): 4804 use MKSRC/install-mk which will do the right thing. 4805 use uname -p for ARCH if possible. 4806 since install-mk will setup links bsd.prog.mk -> prog.mk if 4807 needed, just .include bsd.prog.mk 4808 4809 * Merge with NetBSD make (NetBSD-1.6) 4810 Code is ansi-C only now. 4811 Bug in handling of dotLast is fixed. 4812 Can now assign .OBJDIR and make will reset its notions of life. 4813 New modifiers :tu :tl for toUpper and toLower. 4814 4815Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4816 4817 * Merge with NetBSD make 4818 pick up fix for .END failure in compat mode. 4819 pick up fix for extra va_end() in ParseVErrorInternal. 4820 4821Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4822 4823 * configure.in: for systems that have sys/cdefs.h check if it is 4824 compatible. If not, include the one under missing, but tell it to 4825 include the native one too - necessary on Linux. 4826 4827 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4828 include_next (for gcc) to get the native sys/cdefs.h 4829 4830Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4831 4832 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4833 leaking descriptors when using -jN. 4834 4835 * job.c (JobPrintCommand): See if "curdir" exists before 4836 attempting to chdir(). Doing the chdir directly in make (when in 4837 compat mode) fails silently, so let the -jN version do the same. 4838 This can happen when building kernels in an object tree and 4839 playing clever games to reset .CURDIR. 4840 4841 * Merged with NetBSD make 4842 pick up .USEBEFORE 4843 4844Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4845 4846 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4847 4848Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4849 4850 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4851 us not to export the iterator variable when using VAR_CMD context. 4852 4853Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4854 4855 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4856 its the wrong "fix". 4857 4858Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4859 4860 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4861 We now simply append the variable names to .MAKEOVERRIDES, and 4862 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4863 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4864 Apart from fixing quoting bugs in previous version, this allows us 4865 to export vars to the environment by simply doing: 4866 .MAKEOVERRIDES+= PATH 4867 Merged again with NetBSD make, but the above is the only change. 4868 4869 * configure.in: added 4870 --disable-pwd-override disable $PWD overriding getcwd() 4871 --disable-check-make-chdir disable make trying to guess 4872 when it should automatically cd ${.CURDIR} 4873 4874 * Merge with NetBSD make, changes include: 4875 parse.c (ParseDoDependency): Spot that the syntax error is 4876 caused by an unresolved cvs/rcs conflict and say so. 4877 var.c: most of Var* functions now take a ctxt as 1st arg. 4878 now does variable substituion on rhs of sysv style modifiers. 4879 4880 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4881 is now done here. We append the name='value' to .MAKEOVERRIDES 4882 rather than directly into MAKEFLAGS as this allows a Makefile to 4883 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4884 very similar mechanism. Note that in adding name='value' to 4885 .MAKEOVERRIDES we do the moral equivalent of: 4886 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4887 4888Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4889 4890 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4891 4892 * Merged with NetBSD make 4893 make -dx can now be used to run commands via sh -x 4894 better error messages on exec failures. 4895 4896Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4897 4898 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4899 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4900 MACHINE etc otherwise they propagate from the previous bmake. 4901 4902 * configure.in (machine): allow --with-machine=generic to make 4903 configure use machine.sh to set MACHINE. 4904 4905 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4906 4907 * Makefile.in: mention in bmake.1 that we use autoconf. 4908 4909 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4910 4911Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4912 4913 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4914 as that rather defeats the usefulness of ${MAKEFILE}. 4915 4916 * main.c (MainParseArgs): append command line variable assignments 4917 to MAKEFLAGS so that they get propagated to child make's. 4918 Apparently this is required POSIX behaviour? Its useful anyway. 4919 4920Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4921 4922 * compat.c (CompatRunCommand): don't use perror() since stdio may 4923 cause problems in child of vfork(). 4924 4925 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4926 This routine prints out the .curdir where we stopped and will also 4927 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4928 4929 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4930 :@ expansion. 4931 4932 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4933 4934 * Added RCSid's for the files we've touched. 4935 4936Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4937 4938 * configure.in: Thanks to some clues from mdb@juniper.net, 4939 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4940 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4941 4942 --with-machine=MACHINE explicitly set MACHINE 4943 --with-force-machine=MACHINE set FORCE_MACHINE 4944 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4945 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4946 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4947 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4948 4949 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4950 4951 * makefile: added a pathetically simple makefile to drive 4952 bootstrapping. Running configure by hand is more useful. 4953 4954 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4955 dependent on NetBSD bsd.*.mk 4956 4957 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4958 _PATH_OBJDIRPREFIX for those that don't want a default. 4959 construct _PATH_DEFSYSPATH from the info we get from configure. 4960 4961 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4962 if MAKE_VERSION is defined. 4963 4964 * compat.c: when we bail, print out the .CURDIR we were in. 4965 4966Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4967 4968 * Merged with NetBSD make 4969 4970 * var.c: fixed a bug in the handling of the modifier :P 4971 if the node as found but the path was null, we segfault trying to 4972 duplicate it. 4973 4974Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4975 4976 * Merged with NetBSD make 4977 4978 * make.c: Make_OODate's test for a library out of date was using 4979 cmtime where it should have used mtime (my bug). 4980 4981 * compat.c: Use perror() to tell us what really went wrong when we 4982 cannot exec a command. 4983 4984Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4985 4986 * Merged with NetBSD make 4987 4988Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4989 4990 * Merged with NetBSD make 4991 4992Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4993 4994 * Merged with NetBSD make 4995 4996Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4997 4998 * Merged with NetBSD make 4999 5000Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5001 5002 * util.c: don't provide signal() since we use sigcompat.c 5003 5004 * Makefile.in: added a build target. 5005 5006 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 5007 These allow some quite clever magic. 5008 5009 * main.c (main): added support for getenv(MAKESYSPATH). 5010 5011Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5012 5013 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 5014 This avoids objdir having a different value depending on how a 5015 directory was reached (via command line, or subdir.mk). 5016 5017 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 5018 5019Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5020 5021 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 5022 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 5023 I've been testing this in NetBSD's make for some weeks. 5024 5025 * Turn Makefile into Makefile.in and make it useful. 5026 5027Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5028 5029 * Imported NetBSD's -current make(1) and resolve conflicts. 5030 5031 * Applied autoconf patches from bmake v2 5032 5033 * Imported clean code base from NetBSD-1.0 5034