12026-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20260704 4 52026-07-03 Simon J Gerraty <sjg@beast.crufty.net> 6 7 * VERSION (_MAKE_VERSION): 20260703 8 Merge with NetBSD make, pick up 9 o meta.c: do a better job of resolving relative paths 10 o var.c: add alternation support to :M 11 eg. :M*{Makefile*,.mk} matches any *Makefile* or *.mk 12 132026-07-02 Simon J Gerraty <sjg@beast.crufty.net> 14 15 * VERSION (_MAKE_VERSION): 20260702 16 Merge with NetBSD make, pick up 17 o meta.c: .MAKE.META.FILTER can be used to more generally filter 18 relevant content of .meta file in meta_oodate. 19 202026-06-19 Simon J Gerraty <sjg@beast.crufty.net> 21 22 * VERSION (_MAKE_VERSION): 20260619 23 Merge with NetBSD make, pick up 24 o make.1: fix description of .MADE it is a source not a target. 25 26 * update mk files 27 282026-06-10 Simon J Gerraty <sjg@beast.crufty.net> 29 30 * VERSION (_MAKE_VERSION): 20260609 31 Merge with NetBSD make, pick up 32 o parse.c: allow semicolons and parentheses in dependency line 33 expressions 34 352026-05-08 Simon J Gerraty <sjg@beast.crufty.net> 36 37 * VERSION (_MAKE_VERSION): 20260508 38 Merge with NetBSD make, pick up 39 o make.1: fix description of '-' handling in jobs-mod 40 by intenting it correctly. 41 422026-04-13 Simon J Gerraty <sjg@beast.crufty.net> 43 44 * VERSION (_MAKE_VERSION): 20260406 45 Merge with NetBSD make, pick up 46 o cleanup unnecessary parens 47 48 * configure.in: add --with-save-dollars to control default for 49 .MAKE.SAVE.DOLLARS - address FreeBSD PR 294436 50 512026-03-12 Simon J Gerraty <sjg@beast.crufty.net> 52 53 * VERSION (_MAKE_VERSION): 20260313 54 Merge with NetBSD make, pick up 55 o make: ensure .MAKE.SAVE_DOLLARS is initialized so makefiles like 56 sys.vars.mk can test its value to know how to deal with macros 57 that need to save '$' during ':='. 58 59 * Makefile: default MAKE_SAVE_DOLLARS_DEFAULT to "no" 60 for traditional behavior. 61 622026-03-10 Simon J Gerraty <sjg@beast.crufty.net> 63 64 * VERSION (_MAKE_VERSION): 20260310 65 Merge with NetBSD make, pick up 66 o unit-tests ensure TEST_MAKE is absolute path 67 and tests that make symlink for ${MAKE} can run in parallel. 68 692026-03-03 Simon J Gerraty <sjg@beast.crufty.net> 70 71 * VERSION (_MAKE_VERSION): 20260303 72 Merge with NetBSD make, pick up 73 o job.c: MaybeSubMake: Look for expansion of ${.MAKE} 74 and if necessary its basename, and only match if at start of line 75 or preceded by space. 76 772026-02-28 Simon J Gerraty <sjg@beast.crufty.net> 78 79 * Makefile: mark ${PROG} and ${OBJS} as .META 80 MaybeSubMake will otherwise mistake them for sub-makes 81 82 * VERSION (_MAKE_VERSION): 20260301 83 Merge with NetBSD make, pick up 84 o job.c: MaybeSubMake: skip control chars [@+-] at start of line 85 when checking for ${MAKE} 86 872026-02-22 Simon J Gerraty <sjg@beast.crufty.net> 88 89 * VERSION (_MAKE_VERSION): 20260222 90 o mk file update 91 922026-02-16 Simon J Gerraty <sjg@beast.crufty.net> 93 94 * VERSION (_MAKE_VERSION): 20260216 95 Merge with NetBSD make, pick up 96 o minor cleanups 97 982026-02-10 Simon J Gerraty <sjg@beast.crufty.net> 99 100 * VERSION (_MAKE_VERSION): 20260210 101 Merge with NetBSD make, pick up 102 o document that multiple variables can be set on command line. 103 o move MaybeSubMake to job.c so it can be called on expanded 104 commands for more accuracy and less overhead. 105 o main.c: set .MAKE.VERSION as read-only. 106 107 * unit-tests/opt-{chdir,where-am-i}.mk: use MAKEOBJDIRPREFIX=/ 108 to avoid tripping over an unreadable /usr/obj 109 1102026-02-04 Simon J Gerraty <sjg@beast.crufty.net> 111 112 * unit-tests/varname-make_stack_trace.mk: for 113 FreeBSD and similar set .MAKE.ALWAYS_PASS_JOB_QUEUE=no 114 to ensure we get the expected errors. 115 116 * VERSION (_MAKE_VERSION): 20260202 117 Merge with NetBSD make, pick up 118 o on error avoid duplicate stack trace to stderr 119 1202026-01-11 Simon J Gerraty <sjg@beast.crufty.net> 121 122 * VERSION (_MAKE_VERSION): 20260111 123 Merge with NetBSD make, pick up 124 o var.c: add explicit check for empty re as not all 125 regex libs throw an error as expected, in this case. 126 1272026-01-10 Simon J Gerraty <sjg@beast.crufty.net> 128 129 * VERSION (_MAKE_VERSION): 20260110 130 Merge with NetBSD make, pick up 131 o minor cleanups 132 1332025-11-15 Simon J Gerraty <sjg@beast.crufty.net> 134 135 * boot-strap: unset more things from env and save a copy 136 to env.out for debugging. 137 1382025-11-12 Simon J Gerraty <sjg@beast.crufty.net> 139 140 * VERSION (_MAKE_VERSION): 20251111 141 Merge with NetBSD make, pick up 142 o var.c: add :sh1 which only evaluates command on first reference. 143 1442025-11-11 Simon J Gerraty <sjg@beast.crufty.net> 145 146 * configure.in: Force filemon=no for Cygwin and MINGW64_NT 147 1482025-11-10 Simon J Gerraty <sjg@beast.crufty.net> 149 150 * unit-tests/Makefile: handle MINGW64_NT 151 mark some tests broken, filter others as per Cygwin. 152 1532025-10-23 Simon J Gerraty <sjg@beast.crufty.net> 154 155 * make.1: document MAKE_VERSION. 156 1572025-10-22 Simon J Gerraty <sjg@beast.crufty.net> 158 159 * VERSION (_MAKE_VERSION): 20251022 160 161 * configure.in: Add a check that lua is version 5.2 or later 162 if not we want to skip running check-expect.lua 163 1642025-09-16 Simon J Gerraty <sjg@beast.crufty.net> 165 166 * VERSION (_MAKE_VERSION): 20250916 167 Merge with NetBSD make, pick up 168 o var.c: avoid compiler warning from hexdigits 169 1702025-08-04 Simon J Gerraty <sjg@beast.crufty.net> 171 172 * VERSION (_MAKE_VERSION): 20250804 173 Merge with NetBSD make, pick up 174 o meta.c: allow printing only partial string to meta file 175 in jobs mode, otherwise we end up with duplicated output when 176 buffer does not end in newline. 177 Add a suitable unit test. 178 1792025-07-07 Simon J Gerraty <sjg@beast.crufty.net> 180 181 * VERSION (_MAKE_VERSION): 20250707 182 Merge with NetBSD make, pick up 183 o cond.c: improve debug log message for 'exists' function. 184 complain about unfinished escape sequences or string literals. 185 1862025-07-04 Simon J Gerraty <sjg@beast.crufty.net> 187 188 * VERSION (_MAKE_VERSION): 20250704 189 Merge with NetBSD make, pick up 190 o make.1: add a DIAGNOSTICS section for make to reference. 191 o main.c: simplify the warning for invalid -J by refering to 192 manual page. 193 1942025-06-30 Simon J Gerraty <sjg@beast.crufty.net> 195 196 * VERSION (_MAKE_VERSION): 20250630 197 Merge with NetBSD make, pick up 198 o consistently use double quotes in error messages 199 o cond.c: if a condition is erroneous, skip the whole .if/.endif 200 o make_malloc.c: in cleanup mode, initialize freshly allocated memory 201 o str.c: error out on an ":M" modifier whose pattern ends with 202 backslash 203 o var.c: fix parsing of modifier parts for :gmtime and :localtime 204 add POSIX $^ support 205 2062025-06-18 Simon J Gerraty <sjg@beast.crufty.net> 207 208 * VERSION (_MAKE_VERSION): 20250618 209 Merge with NetBSD make, pick up 210 o parse.c: in a warning without location information, 211 print the stack trace 212 2132025-06-15 Simon J Gerraty <sjg@beast.crufty.net> 214 215 * VERSION (_MAKE_VERSION): 20250615 216 Merge with NetBSD make, pick up 217 o add on-demand inter-process stack traces 218 o job.c,meta.c: do not discard empty lines in the output of a command 219 o job.c: add job prefix if necessary in non-default filtered mode 220 o parse.c,var.c: skip inter-process stack trace when 221 MAKE_STACK_TRACE=no 222 2232025-06-12 Simon J Gerraty <sjg@beast.crufty.net> 224 225 * VERSION (_MAKE_VERSION): 20250612 226 Merge with NetBSD make, pick up 227 o use a common style for unexpected error messages 228 o parse.c: add program name to stack traces from sub-makes 229 add quotes to "in directory" line in stack traces 230 o var.c: check variable names for invalid characters when there 231 are no modifiers to apply. This detects and warns about gmake 232 syntax like: $(addprefix -I, $(LIST)) 233 2342025-06-09 Simon J Gerraty <sjg@beast.crufty.net> 235 236 * VERSION (_MAKE_VERSION): 20250606 237 Merge with NetBSD make, pick up 238 o main.c: fix bug in handling of output of children in jobs mode 239 2402025-05-28 Simon J Gerraty <sjg@beast.crufty.net> 241 242 * VERSION (_MAKE_VERSION): 20250528 243 Merge with NetBSD make, pick up 244 o show contents of MAKEFLAGS in the stack trace. 245 o main.c: delay warning about bogus -J flag, if we end up in 246 compat mode before the call to InitMaxJobs, the warning isn't 247 necessary. 248 2492025-05-25 Simon J Gerraty <sjg@beast.crufty.net> 250 251 * VERSION (_MAKE_VERSION): 20250525 252 Merge with NetBSD make, pick up 253 o main.c: set .CURDIR earlier so it can be reported in some errors. 254 2552025-05-20 Simon J Gerraty <sjg@beast.crufty.net> 256 257 * VERSION (_MAKE_VERSION): 20250520 258 Merge with NetBSD make, pick up 259 o rename variables, remove now-redundant comments 260 o job.c: clean up building the shell commands in parallel mode 261 remove timeout for polling in parallel mode 262 o main.c: clean up error message for malformed internal -J option 263 2642025-05-11 Simon J Gerraty <sjg@beast.crufty.net> 265 266 * VERSION (_MAKE_VERSION): 20250511 267 Merge with NetBSD make, pick up 268 o job.c: rename token pool variables to be more descriptive 269 move ContinueJobs further up, to eliminate a forward declaration 270 error out if writing to an internal pipe fails 271 clean up constant names and function names 272 use uniform debug log messages for the token pool 273 in the debug log, replace magic numbers with identifiers 274 o main.c: clean up error message for malformed internal -J option 275 o make.c: replace bitset in trace output with descriptive node 276 attributes 277 o targ.c: add end marker for -dg1, -dg2 and -dg3 debug log 278 o var.c: fix order of error messages in the ":?" modifier 279 2802025-04-25 Simon J Gerraty <sjg@beast.crufty.net> 281 282 * VERSION (_MAKE_VERSION): 20250424 283 Merge with NetBSD make, pick up 284 o cleanup; replace unsigned int with just unsigned 285 Inline the TMPPAT macro, as it is only needed in a single place 286 o move struct Job from job.h to job.c 287 o job.c: group the code for handling the job token pool 288 avoid excessive values of -j 289 o make.c: fix grammar in debug log message 290 2912025-04-14 Simon J Gerraty <sjg@beast.crufty.net> 292 293 * VERSION (_MAKE_VERSION): 20250414 294 Merge with NetBSD make, pick up 295 o job.c: clean up job and output handling 296 o parse.c: after entering POSIX mode, don't leave it again 297 2982025-04-11 Simon J Gerraty <sjg@beast.crufty.net> 299 300 * VERSION (_MAKE_VERSION): 20250411 301 Merge with NetBSD make, pick up 302 o convert more messages to file:line: format 303 o for.c: condense code for parsing variable names in .for loops 304 3052025-04-10 Simon J Gerraty <sjg@beast.crufty.net> 306 307 * VERSION (_MAKE_VERSION): 20250410 308 Merge with NetBSD make, pick up 309 o cond.c: remove redundant error counter when parsing a condition 310 3112025-04-04 Simon J Gerraty <sjg@beast.crufty.net> 312 313 * VERSION (_MAKE_VERSION): 20250404 314 Merge with NetBSD make, pick up 315 o make.1: better document meta mode. 316 o var.c: fix error message for undefined variable in conditional. 317 3182025-03-30 Simon J Gerraty <sjg@beast.crufty.net> 319 320 * VERSION (_MAKE_VERSION): 20250330 321 Merge with NetBSD make, pick up 322 o in POSIX compatability mode, give preference to sysV style modifiers. 323 o in stack trace with details and includes, list the current file 324 o parse.c: report file location in more common file:line: format. 325 o var.c: simplify error handling for unknown modifiers 326 let the ":O" and ":t" modifiers fall back to the ":from=to" modifier 327 stop parsing after seeing an unknown modifier in an expression 328 fix error message for unclosed expression and invalid :[...] 329 add details to errors about ::= modifier 330 add details about indirect modifiers to the stack traces 331 in stack traces from target commands, add the command level 332 3332025-03-23 Simon J Gerraty <sjg@beast.crufty.net> 334 335 * VERSION (_MAKE_VERSION): 20250323 336 Merge with NetBSD make, pick up 337 o var.c: just ignore attempts to override a read-only global with 338 the same value. 339 3402025-03-08 Simon J Gerraty <sjg@beast.crufty.net> 341 342 * bsd.after-import.mk: by default generate makefiles 343 closer to BSD style. 344 345 * VERSION (_MAKE_VERSION): 20250308 346 Merge with NetBSD make, pick up 347 o clean up comments and code for parallel mode 348 o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. 349 3502025-02-27 Simon J Gerraty <sjg@beast.crufty.net> 351 352 * VERSION (_MAKE_VERSION): 20250225 353 Merge with NetBSD make, pick up 354 o job.c: reliably remove targets on interrupt, 355 by passing signal to children first. 356 3572025-01-25 Simon J Gerraty <sjg@beast.crufty.net> 358 359 * VERSION (_MAKE_VERSION): 20250125 360 Merge with NetBSD make, sync up below change. 361 362 * unit-tests/Makefile: remove $TMPDIR via .END 363 to avoid failure in test on NFS - since the temp file for the 364 target script is open and thus gets renamed by the server rather 365 than removed. 366 3672025-01-20 Simon J Gerraty <sjg@beast.crufty.net> 368 369 * VERSION (_MAKE_VERSION): 20250120 370 Merge with NetBSD make, pick up 371 o use FORK_FUNCTION so it can be forced to fork when doing coverage. 372 o main.c: avoid memory allocation in error path after exec failure. 373 3742025-01-16 Simon J Gerraty <sjg@beast.crufty.net> 375 376 * VERSION (_MAKE_VERSION): 20250116 377 Merge with NetBSD make, pick up 378 o clarify that undefined expressions are allowed in dependencies 379 o simplify code for evaluating the '!=' variable assignment 380 3812025-01-11 Simon J Gerraty <sjg@beast.crufty.net> 382 383 * VERSION (_MAKE_VERSION): 20250111 384 Merge with NetBSD make, pick up 385 o replace "Malformed conditional" with "Variable is undefined" 386 when appropriate 387 3882025-01-10 Simon J Gerraty <sjg@beast.crufty.net> 389 390 * VERSION (_MAKE_VERSION): 20250110 391 Merge with NetBSD make, pick up 392 o job.c: remove some unnecessary layers in job handling 393 o unit-tests: test expressions based on undefined variables 394 3952025-01-01 Simon J Gerraty <sjg@beast.crufty.net> 396 397 * VERSION (_MAKE_VERSION): 20250101 398 Merge with NetBSD make, pick up 399 o var.c: reduce pointer indirections when unexporting a variable 400 4012024-12-12 Simon J Gerraty <sjg@beast.crufty.net> 402 403 * VERSION (_MAKE_VERSION): 20241212 404 * mk/ updates 405 4062024-11-24 Simon J Gerraty <sjg@beast.crufty.net> 407 408 * VERSION (_MAKE_VERSION): 20241124 409 Merge with NetBSD make, pick up 410 o var.c: fix confusing error message when overriding a read-only 411 variable 412 4132024-11-22 Simon J Gerraty <sjg@beast.crufty.net> 414 415 * VERSION (_MAKE_VERSION): 20241122 416 Merge with NetBSD make, pick up 417 o unit-tests/Makefile: optimize running of tests skip extra cat 418 in 99% of cases. 419 4202024-11-15 Simon J Gerraty <sjg@beast.crufty.net> 421 422 * VERSION (_MAKE_VERSION): 20241114 423 Merge with NetBSD make, pick up 424 o make.1: note that MAKEOBJPREFIX should be absolute path 425 also that it can be set via makefile if suitable care taken. 426 4272024-11-10 Simon J Gerraty <sjg@beast.crufty.net> 428 429 * VERSION (_MAKE_VERSION): 20241110 430 Merge with NetBSD make, pick up 431 o make: allow .../ (search here and above) in 432 .MAKE.MAKEFILE_PREFERENCE and -f argument. 433 4342024-11-03 Simon J Gerraty <sjg@beast.crufty.net> 435 436 * VERSION (_MAKE_VERSION): 20241101 437 Merge with NetBSD make, pick up 438 o parse.c: report filename:linenumber in parse debug output 439 4402024-09-21 Simon J Gerraty <sjg@beast.crufty.net> 441 442 * VERSION (_MAKE_VERSION): 20240921 443 Merge with NetBSD make, pick up 444 o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. 445 446 * Makefile: use genfiles.mk to generate ${MAN} 447 so that it can be tuned for local site. 448 Ensure MAN is defined before including Makefile.inc 449 450 * Makefile: use MK_GEN_MAN to make it easier to control whether we 451 generate ${MAN} 452 4532024-09-16 Simon J Gerraty <sjg@beast.crufty.net> 454 455 * VERSION (_MAKE_VERSION): 20240909 456 457 * arch.c: fix NetBSD PR 58597 458 4592024-09-01 Simon J Gerraty <sjg@beast.crufty.net> 460 461 * Makefile: use SUBDIR.${MK_TESTS} so that we skip 462 unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS 463 464 * VERSION (_MAKE_VERSION): 20240901 465 Merge with NetBSD make, pick up 466 o reduce line length in error messages 467 o var.c: simplify printing of an evaluation stack element 468 4692024-08-29 Simon J Gerraty <sjg@beast.crufty.net> 470 471 * VERSION (_MAKE_VERSION): 20240828 472 Merge with NetBSD make, pick up 473 o add more context to error message about recursive variables 474 o treat recursive variables non-fatally - continue parsing to end 475 of makefile 476 4772024-08-12 Simon J Gerraty <sjg@beast.crufty.net> 478 479 * VERSION (_MAKE_VERSION): 20240808 480 Merge with NetBSD make, pick up 481 o improve some error messages for better clarify and readability 482 4832024-07-22 Simon J Gerraty <sjg@beast.crufty.net> 484 485 * VERSION (_MAKE_VERSION): 20240722 486 Merge with NetBSD make, pick up 487 o job.c: remove dead code 488 4892024-07-21 Simon J Gerraty <sjg@beast.crufty.net> 490 491 * VERSION (_MAKE_VERSION): 20240720 492 Merge with NetBSD make, pick up 493 o compat.c: do not run commands that have parse or evaluation errors. 494 o var.c: remove wrong error message about an undefined variable 495 4962024-07-13 Simon J Gerraty <sjg@beast.crufty.net> 497 498 * cleanup redundant differences from NetBSD make 499 o parse.c: no longer uses mmap 500 o var.c: check __STDC_VERSION__ not __STDC__ 501 5022024-07-12 Simon J Gerraty <sjg@beast.crufty.net> 503 504 * Apply some patches from NetBSD pkgsrc to reduce divergence 505 o meta.c: requires sys/select.h if available 506 o var.c: ensure SIZE_MAX has a value 507 o util.c: ensure SA_RESTART is defined 508 509 * configure.in: use *ksh* rather than just *ksh to match 510 ksh shell specification. 511 512 * unit-tests/Makefile: expand BROKEN_TESTS for ksh and 513 mksh in particular 514 5152024-07-11 Simon J Gerraty <sjg@beast.crufty.net> 516 517 * VERSION (_MAKE_VERSION): 20240711 518 Merge with NetBSD make, pick up 519 o compat.c: allow Compat_RunCommand to also handle very long 520 commands by writing to a temp file when needed. 521 o main.c: extract the temp file logic recently added to Cmd_Exec 522 to Cmd_Argv so it can be leveraged by Compat_RunCommand. 523 5242024-07-09 Simon J Gerraty <sjg@beast.crufty.net> 525 526 * VERSION (_MAKE_VERSION): 20240709 527 Merge with NetBSD make, pick up 528 o error out on parse/evaluation errors in shell commands 529 o var.c: error out on syntax errors in ':M' and ':N' modifiers 530 5312024-07-07 Simon J Gerraty <sjg@beast.crufty.net> 532 533 * VERSION (_MAKE_VERSION): 20240707 534 Merge with NetBSD make, pick up 535 o only generate code for cleanup functions in CLEANUP mode 536 o hash.c: don't track hash table chain lengths during lookup 537 unless debugging 538 o main.c: move initialization of variable scopes to targ.c 539 o var.c: remove Var_End as it is now unnecessary 540 5412024-07-06 Simon J Gerraty <sjg@beast.crufty.net> 542 543 * VERSION (_MAKE_VERSION): 20240706 544 Merge with NetBSD make, pick up 545 o reduce lint comments about ARGSUSED 546 o cond.c: error out on conditions containing the operators '&' and '|' 547 o str.c: error out on a matching malformed matching pattern '[[' 548 o var.c: in error messages, distinguish parsing from evaluating 549 in error messages for anonymous variables, log the value 550 error out on unclosed expressions during parse time 551 5522024-07-04 Simon J Gerraty <sjg@beast.crufty.net> 553 554 * VERSION (_MAKE_VERSION): 20240704 555 Merge with NetBSD make, pick up 556 o add more context information to error messages 557 o main.c: on error, print the targets to be made 558 add detailed exit status to message for failed sub-commands 559 o var.c: error out on the "Bad modifier" error message 560 5612024-07-01 Simon J Gerraty <sjg@beast.crufty.net> 562 563 * VERSION (_MAKE_VERSION): 20240701 564 Merge with NetBSD make, pick up 565 o var.c: add :tt for Title case 566 5672024-06-30 Simon J Gerraty <sjg@beast.crufty.net> 568 569 * configure.in: 20240630 further refine check for whether 570 TZ=Europe/Berlin works 571 572 * VERSION (_MAKE_VERSION): 20240630 573 Merge with NetBSD make, pick up 574 o job.c: reduce use of UNCONST 575 o main.c: add detailed exit status to message for failed sub-commands 576 o var.c: error out on some more syntax errors 577 add more context to "returned non-zero status" message 578 5792024-06-25 Simon J Gerraty <sjg@beast.crufty.net> 580 581 * VERSION (_MAKE_VERSION): 20240625 582 Merge with NetBSD make, pick up 583 o job.c: ensure shellPath is always duped, avoid upsetting free() 584 5852024-06-16 Simon J Gerraty <sjg@beast.crufty.net> 586 587 * VERSION (_MAKE_VERSION): 20240616 588 Merge with NetBSD make, pick up 589 o clean up collection of context information for error messages 590 o in warnings, move the word "warning" to the front 591 o var.c: throw an error on attempt to override an internal 592 read-only variable 593 5942024-06-10 Simon J Gerraty <sjg@beast.crufty.net> 595 596 * VERSION (_MAKE_VERSION): 20240610 597 Merge with NetBSD make, pick up 598 o for.c: remove redundant shortcut for building the .for loop body 599 6002024-06-02 Simon J Gerraty <sjg@beast.crufty.net> 601 602 * VERSION (_MAKE_VERSION): 20240602 603 Merge with NetBSD make, pick up 604 o rename some VarEvalMode constants to better match debug names. 605 o var.c: avoid out-of-bounds read when parsing indirect modifiers. 606 6072024-06-01 Simon J Gerraty <sjg@beast.crufty.net> 608 609 * VERSION (_MAKE_VERSION): 20240601 610 Merge with NetBSD make, pick up 611 o add .export-all rather than allow .export with no argument 612 which can happen accidentally. 613 o if lua is available, run check-expect.lua after unit-tests 614 o main.c: use snprintf rather than strncpy 615 fix memory leak when purging realpath cache. 616 6172024-05-28 Simon J Gerraty <sjg@beast.crufty.net> 618 619 * VERSION (_MAKE_VERSION): 20240528 620 Merge with NetBSD make, pick up 621 o fix a number of memory leaks 622 o replace magic numbers with POSIX FILENO constants 623 o hash.c: remove dead code from HashTable_DeleteEntry 624 o main.c: when complaining about unusable .OBJDIR 625 call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. 626 o parse.c: use fewer technical terms in debug message for dependency 627 6282024-05-20 Simon J Gerraty <sjg@beast.crufty.net> 629 630 * VERSION (_MAKE_VERSION): 631 Merge with NetBSD make, pick up 632 o dir.c: in FindFile restore last search of .CURDIR even for 633 includes, as a number of existing makefiles are broken otherwise. 634 6352024-05-19 Simon J Gerraty <sjg@beast.crufty.net> 636 637 * VERSION (_MAKE_VERSION): 20240519 638 Merge with NetBSD make, pick up 639 o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. 640 Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. 641 o main.c: no need to set .DOTLAST in sysIncPath 642 6432024-05-07 Simon J Gerraty <sjg@beast.crufty.net> 644 645 * VERSION (_MAKE_VERSION): 20240508 646 Merge with NetBSD make, pick up 647 o make: ensure variables set on command line get added to 648 .MAKEOVERRIDES (even if they start with '.') so they are passed to 649 sub-makes. 650 6512024-04-30 Simon J Gerraty <sjg@beast.crufty.net> 652 653 * VERSION (_MAKE_VERSION): 20240430 654 Merge with NetBSD make, pick up 655 o main.c: ensure '.include <makefile>' respects MAKESYSPATH. 656 Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 657 6582024-04-28 Simon J Gerraty <sjg@beast.crufty.net> 659 660 * VERSION (_MAKE_VERSION): 20240428 661 Merge with NetBSD make, pick up 662 o simplify freeing of lists 663 o arch.c: trim pointless comments 664 o var.c: delay variable assignments until actually needed 665 don't reallocate memory after evaluating an expression, result is 666 almost always short-lived. 667 6682024-04-26 Simon J Gerraty <sjg@beast.crufty.net> 669 670 * VERSION (_MAKE_VERSION): 20240426 671 Merge with NetBSD make, pick up 672 o job.c: in debug output, print the directory in which a job 673 failed at same time as failed target so it is more easily found in 674 build log. 675 6762024-04-24 Simon J Gerraty <sjg@beast.crufty.net> 677 678 * VERSION (_MAKE_VERSION): 20240424 679 Merge with NetBSD make, pick up 680 o clean up comments, code and tests 681 6822024-04-23 Simon J Gerraty <sjg@beast.crufty.net> 683 684 * VERSION (_MAKE_VERSION): 20240422 685 Merge with NetBSD make, pick up 686 o var.c: avoid LazyBuf for :*time modifiers. 687 LazyBuf's are not nul terminated so not suitable for passing to 688 functions that expect that. These modifiers are used sparingly so 689 an extra allocation is not a problem. 690 6912024-04-20 Simon J Gerraty <sjg@beast.crufty.net> 692 693 * VERSION (_MAKE_VERSION): 20240420 694 Merge with NetBSD make, pick up 695 o provide more context information for parse/evaluate errors 696 6972024-04-14 Simon J Gerraty <sjg@beast.crufty.net> 698 699 * VERSION (_MAKE_VERSION): 20240414 700 Merge with NetBSD make, pick up 701 o parse.c: print -dp debug info earlier so we see which 702 .if or .for line is being parsed. 703 7042024-04-04 Simon J Gerraty <sjg@beast.crufty.net> 705 706 * VERSION (_MAKE_VERSION): 20240404 707 Merge with NetBSD make, pick up 708 o fix some unit tests for Cygwin 709 o parse.c: exit immediately after reading a null byte from a makefile 710 711 * fix generation of bmake.cat1 712 7132024-03-19 Simon J Gerraty <sjg@beast.crufty.net> 714 715 * VERSION (_MAKE_VERSION): 20240314 716 Add/Improve support for Cygwin 717 o uname -s output isn't useful so allow configure to 718 set FORCE_MAKE_OS - to force the value of .MAKE.OS 719 and use Cygwin which matches uname -o 720 o fix some unit-tests for Cygwin 721 7222024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 723 724 * boot-strap: tests can take a long time; use a cookie to 725 skip them if bmake has not been updated since tests last 726 ran successfully. 727 728 * Makefile: Cygwin handles MANTARGET man 729 730 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 731 7322024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 733 734 * VERSION (_MAKE_VERSION): 20240309 735 Merge with NetBSD make, pick up 736 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 737 this allows a .ERROR target to ignore the case of 738 .ERROR_EXIT==6 which just means that the build actually 739 failed somewhere else. 740 7412024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 742 743 * VERSION (_MAKE_VERSION): 20240303 744 745 * var.c: on IRIX we need both inttypes.h and stdint.h 746 7472024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 748 749 * VERSION (_MAKE_VERSION): 20240301 750 Merge with NetBSD make, pick up 751 o export variables with value from target scope 752 when appropriate. 753 7542024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 755 756 * VERSION (_MAKE_VERSION): 20240212 757 Merge with NetBSD make, pick up 758 o remove unneeded conditional-compilation toggles 759 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 760 GMAKEEXPORT NO_REGEX and SUNSHCMD 761 762 * configure.in: add check for regex.h 763 764 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 765 7662024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 767 768 * VERSION (_MAKE_VERSION): 20240204 769 Merge with NetBSD make, pick up 770 o var.c: fix some lint (-dL) mode parsing issues 771 7722024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 773 774 * VERSION: (_MAKE_VERSION): 20240202 775 Merge with NetBSD make, pick up 776 o make.1: note that arg to :D and :U can be empty 777 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 778 7792024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 780 781 * VERSION (_MAKE_VERSION): 20240108 782 Merge with NetBSD make, pick up 783 o miscellaneous cleanups 784 7852024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 786 787 * VERSION (_MAKE_VERSION): 20240106 788 Merge with NetBSD make, pick up 789 o fix duplicate progname when reporting an unknown target 790 o unit tests for Cmd_Exec using temp file 791 7922024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 793 794 * VERSION (_MAKE_VERSION): 20240105 795 Merge with NetBSD make, pick up 796 o main.c: Cmd_Exec write cmd to a file if too big 797 avoid blowing commandline/env limits 798 7992024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 800 801 * VERSION (_MAKE_VERSION): 20240101 802 o util.c: flesh out more of strftime 803 * configure.in: add --with-bmake-strftime 804 it is not a full implementation but enough to pass all 805 the unit-tests. 806 * parse.c: LoadFile do not append \n to empty buffer. 807 8082023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 809 810 * VERSION (_MAKE_VERSION): 20231230 811 Merge with NetBSD make, pick up 812 o simplify memory allocation for string buffers 813 o fix declared types of list nodes 814 o suff.c: clean up freeing of suffixes 815 o var.c: simplify debug message for the ':@var@...@' modifier 816 clean up variable handling 817 8182023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 819 820 * VERSION (_MAKE_VERSION): 20231226 821 Merge with NetBSD make, pick up 822 o compat.c: ensure make's output is correctly ordered with that of 823 the target when not going to a tty 824 o main.c: check for shellPath whether to call Shell_Init() 825 8262023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 827 828 * VERSION (_MAKE_VERSION): 20231224 829 Merge with NetBSD make, pick up 830 o compat.c: check for shellPath whether to call Shell_Init() 831 tweak the unit test to detect the bug thus fixed. 832 o make.1: do not claim .SHELL is only used by jobs mode. 833 8342023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 835 836 * VERSION (_MAKE_VERSION): 20231220 837 Merge with NetBSD make, pick up 838 o str.c: speed up pattern matching in the ':M' modifier 839 o var.c: fix confusing debug logging when deleting a variable 840 use consistent debug messages style when ignoring variables 841 8422023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 843 844 * VERSION (_MAKE_VERSION): 20231210 845 Merge with NetBSD make, pick up 846 o var.c: avoid segfault on empty :C match expression 847 explain in debug log why variable assignment is ignored. 848 8492023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 850 851 * VERSION (_MAKE_VERSION): 20231208 852 Merge with NetBSD make, pick up 853 o var.c: ensure fromCmd is set correctly for variables set on 854 command line. 855 8562023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 857 858 * configure.in: disable generation of 'makefile' for 859 Darwin by default. 860 861 * boot-strap: docuement --without-makefile 862 8632023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 864 865 * VERSION (_MAKE_VERSION): 20231124 866 Merge with NetBSD make, pick up 867 o main.c: cleanup processing of -j 868 fix lint warning about strchr 869 o var.c: more accurate error message for invalid ':mtime' argument 870 cleanup :[...] modifier 871 avoid reading beyond substring when comparing 872 o unit-tests cover all cases of :mtime, test and explain exporting 873 of variables 874 o cleanup comments 875 8762023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 877 878 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 879 $FreeBSD$ tag, so avoid adding it. 880 8812023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 882 883 * VERSION (_MAKE_VERSION): 20230909 884 Merge with NetBSD make, pick up 885 o main.c: allow -j to compute a multiple of ncpu 886 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 887 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 888 _SC_NPROCESSORS_ONLN 889 .MAKE.JOBS.C will be "yes" if -jC is supported 890 8912023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 892 893 * VERSION (_MAKE_VERSION): 20230820 894 Merge with NetBSD make, pick up 895 o make.1: note that :localtime is better for %s 896 o parse.c: improve error messages for invalid input. 897 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 898 correct result, it is still better to use %s:L:localtime. 899 9002023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 901 902 * VERSION (_MAKE_VERSION): 20230818 903 Merge with NetBSD make, pick up 904 o meta.c: meta_ignore - check raw path against metaIgnorePaths 905 to potentially skip call to realpath. 906 o var.c: be strict when parsing the argument of the ':mtime' modifier 907 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 908 should be used to get an equivalent value to time(3). 909 9102023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 911 912 * VERSION (_MAKE_VERSION): 20230816 913 Merge with NetBSD make, pick up 914 o cond.c: clean up multiple-inclusion guards 915 9162023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 917 918 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 919 if configure cannot work out how to control TZ. 920 Remove varmod-localtime from BROKEN_TESTS for IRIX* 921 9222023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 923 924 * VERSION (_MAKE_VERSION): 20230723 925 926 * configure.in: fix the test for wether TZ=Europe/Berlin works. 927 Depending on the time of year, if run between 22:00 and 00:00 UTC 928 the check in configure would fail incorrectly. 929 Take the day into account as well. 930 9312023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 932 933 * VERSION (_MAKE_VERSION): 20230711 934 Merge with NetBSD make, pick up 935 o make.1: clean up wording, clarify scope of '!' in conditions 936 9372023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 938 939 * make-bootstrap.sh.in: set prefix 940 If configure is run using ksh we get unexpanded ${prefix} in 941 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 942 correct result. 943 9442023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 945 946 * VERSION (_MAKE_VERSION): 20230711 947 bump version for IRIX tweaks 948 949 * make.h: undef OP_NONE if defined 950 951 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 952 953 * configure.in: override INSTALL on IRIX 954 9552023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 956 957 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 958 9592023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 960 961 * VERSION (_MAKE_VERSION): 20230622 962 Merge with NetBSD make, pick up 963 o optimize string matching for ':M' and ':N' 964 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 965 9662023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 967 968 * VERSION (_MAKE_VERSION): 20230621 969 Merge with NetBSD make, pick up 970 o more extensive tests for include guards 971 o parse.c: if a guard is already defined a file that uses the same 972 guard is still guarded by it. 973 9742023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 975 976 * VERSION (_MAKE_VERSION): 20230620 977 Merge with NetBSD make, pick up 978 o allow guards to be targets as well as variables 979 The guard targets may include variable references like 980 __${.PARSEDIR:tA}/${.PARSEFILE}__ 981 9822023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 983 984 * VERSION (_MAKE_VERSION): 20230619 985 Merge with NetBSD make, pick up 986 o unit test for .undef of readOnly vars 987 o optimization for makefiles protected from multiple-inclusion 988 skip even opening the file after first include. 989 Initially this only handles makefiles guarded by a variable 990 target guards are next. 991 9922023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 993 994 * VERSION (_MAKE_VERSION): 20230616 995 Merge with NetBSD make, pick up 996 o var.c: do not allow delete of readOnly variable 997 9982023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 999 1000 * VERSION (_MAKE_VERSION): 20230601 1001 Merge with NetBSD make, pick up 1002 o parse.c: .break takes no args 1003 o lots of unit test updates 1004 10052023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 1006 1007 * unit-tests/Makefile: skip tests that require /dev/filemon 1008 if it does not exists - issue a warning. 1009 10102023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 1011 1012 * VERSION (_MAKE_VERSION): 20230522 1013 Fix building on darwin ppc 1014 1015 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 1016 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 1017 10182023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 1019 1020 * VERSION (_MAKE_VERSION): 20230515 1021 1022 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 1023 compile filemon_ktrace.c 1024 10252023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 1026 1027 * VERSION (_MAKE_VERSION): 20230512 1028 o sys.dirdeps.mk - broke after-import target 1029 10302023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 1031 1032 * VERSION (_MAKE_VERSION): 20230510 1033 Merge with NetBSD make, pick up 1034 o parse.c: don't print null filename in stack traces 1035 o var.c: :mtime operate on each word in variable value 1036 10372023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 1038 1039 * VERSION (_MAKE_VERSION): 20230509 1040 Merge with NetBSD make, pick up 1041 o for.c: skip syntactically wrong .for loops 1042 o var.c: allow for :gmtime=${mtime} 1043 add :mtime[=timestamp] where timestamp is used if stat(2) 1044 fails, if :mtime=error stat(2) failure causes error. 1045 10462023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 1047 1048 * VERSION (_MAKE_VERSION): 20230504 1049 Merge with NetBSD make, pick up 1050 o compat.c: fix compile on NetBSD 7.2 1051 o make.1: fix documentation of .PREFIX to match reality and POSIX 1052 o unit-tests: improved var-scope-local 1053 10542023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 1055 1056 * VERSION (_MAKE_VERSION): 20230414 1057 Merge with NetBSD make, pick up 1058 o minor cleanup 1059 10602023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 1061 1062 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 1063 unlimited results in an insane number (0x7fffffffffffffff). 1064 If BMAKE_NOFILE_MAX is defined, use that instead. 1065 10662023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 1067 1068 * VERSION (_MAKE_VERSION): 20230321 1069 Merge with NetBSD make, pick up 1070 * make.1: document seemingly unexplained Error code 6. 1071 10722023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 1073 1074 * VERSION (_MAKE_VERSION): 20230317 1075 Merge with NetBSD make, pick up 1076 o compat.c: CompatDeleteTarget skip .PHONY targets to be 1077 consistent with JobDeleteTarget. 1078 o job.c: fix memory leak in handling sysv :from=to modifiers 1079 10802023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 1081 1082 * VERSION (_MAKE_VERSION): 20230303 1083 Merge with NetBSD make, pick up 1084 o several updated unit-tests 1085 10862023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 1087 1088 * VERSION (_MAKE_VERSION): 20230222 1089 Merge with NetBSD make, pick up 1090 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 1091 10922023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 1093 1094 * VERSION (_MAKE_VERSION): 20230218 1095 Merge with NetBSD make, pick up 1096 o var.c: fix parsing of unevaluated subexpressions with 1097 unbalanced '{}' 1098 10992023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 1100 1101 * VERSION (_MAKE_VERSION): 20230215 1102 Merge with NetBSD make, pick up 1103 o inline macros for some variable names 1104 o cond.c: reduce complexity of evaluating expressions 1105 11062023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1107 1108 * VERSION (_MAKE_VERSION): 20230208 1109 Merge with NetBSD make, pick up 1110 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 1111 when it has been used within conditional expressions 1112 11132023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 1114 1115 * VERSION (_MAKE_VERSION): 20230127 1116 1117 * install-sh: if making directories ensure umask is set 1118 to match mode. 1119 1120 * Makefile: use DIRMODE for directories and 1121 NONBINMODE for man pages and mk files 1122 11232023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1124 1125 * VERSION (_MAKE_VERSION): 20230126 1126 Merge with NetBSD make, pick up 1127 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 1128 should be read-only. 1129 11302023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1131 1132 * VERSION (_MAKE_VERSION): 20230123 1133 Merge with NetBSD make, pick up 1134 o .[NO]READONLY: for control of read-only variables 1135 o .SYSPATH: for controlling the path searched for makefiles 1136 11372023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1138 1139 * VERSION (_MAKE_VERSION): 20230120 1140 Merge with NetBSD make, pick up 1141 o allow for white-space between command specifiers @+- 1142 o add more details to warning 'Extra targets ignored' 1143 11442023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1145 1146 * machine.sh: leverage os.sh rather than duplicate 1147 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 1148 for that purpose for the past decade or so. 1149 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 1150 11512023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 1152 1153 * VERSION (_MAKE_VERSION): 20230101 1154 Merge with NetBSD make, pick up 1155 o cleanup comments, inline some LazyBuf_ methods 1156 o unit-tests/ add/improve comments in tests 1157 o make.1: sync list of built-in variables with reality 1158 sort list of built-in variables 1159 reduce indentation of the long list of variable names 1160 use consistent markup for boolean flags 1161 move description of .MAKE.MODE below the .MAKE.META block 1162 clarify in which case an expression may omit braces 1163 11642022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 1165 1166 * VERSION (_MAKE_VERSION): 20221024 1167 Merge with NetBSD make, pick up 1168 o change return type of unlink_file back to int 1169 11702022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 1171 1172 * Makefile: Darwin and Linux can handle MANTARGET=man 1173 11742022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 1175 1176 * VERSION (_MAKE_VERSION): 20220928 1177 Merge with NetBSD make, pick up 1178 o fix more ignored returns from snprintf 1179 o compile with higher warnings 1180 11812022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 1182 1183 * main.c meta.c: do not ignore return from snprintf 1184 1185 * meta.c strlcpy.c: we need prototype for strlcpy 1186 1187 * sigcompat.c: fix unused function warnings 1188 11892022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 1190 1191 * VERSION (_MAKE_VERSION): 20220924 1192 Merge with NetBSD make, pick up 1193 o fix bug in .break reset of conditional depth 1194 o overhaul and simplify tracking of conditional depth 1195 11962022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 1197 1198 * VERSION (_MAKE_VERSION): 20220912 1199 Merge with NetBSD make, pick up 1200 o man page updates 1201 12022022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 1203 1204 * VERSION (_MAKE_VERSION): 20220909 1205 Merge with NetBSD make, pick up 1206 o update unit-tests to handle deprecation of egrep 1207 o cond.c: add more details to error message for numeric comparison 1208 1209 * configure.in: allow for deprecation of egrep 1210 1211 * Makefile: Linux can handle MANTARGET=man 1212 12132022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 1214 1215 * VERSION (_MAKE_VERSION): 20220903 1216 Merge with NetBSD make, pick up 1217 o job.c: fix handling of null bytes in output 1218 12192022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1220 1221 * VERSION (_MAKE_VERSION): 20220902 1222 Merge with NetBSD make, pick up 1223 o Allow .break to terminate a .for loop early 1224 12252022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1226 1227 * VERSION (_MAKE_VERSION): 20220901 1228 Merge with NetBSD make, pick up 1229 o var.c: fix out-of-bounds errors when parsing 1230 12312022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1232 1233 * VERSION (_MAKE_VERSION): 20220824 1234 Merge with NetBSD make, pick up 1235 o var.c: revert change to modifier parsing that breaks 1236 shell variable references within ':@var@body@' 1237 o adjust unit-tests 1238 12392022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 1240 1241 * VERSION (_MAKE_VERSION): 20220818 1242 Merge with NetBSD make, pick up 1243 o fix exit status for '-q' (since 1994) 1244 12452022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1246 1247 * VERSION (_MAKE_VERSION): 20220808 1248 Merge with NetBSD make, pick up 1249 o var.c: fix parsing of modifiers containing unbalanced subexpressions 1250 extract parsing of ':D' and ':U' modifiers into separate function 1251 12522022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1253 1254 * VERSION (_MAKE_VERSION): 20220726 1255 1256 * Auto-create objdir for bmake/unit-tests if appropriate 1257 12582022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 1259 1260 * VERSION (_MAKE_VERSION): 20220724 1261 Merge with NetBSD make, pick up 1262 o make.1: describe variable assignment and evaluation more precisely 1263 o parse.c: fix out-of-bounds read when parsing an invalid line 1264 o var.c: simplify return type of IsShortVarnameValid 1265 12662022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 1267 1268 * VERSION (_MAKE_VERSION): 20220612 1269 Merge with NetBSD make, pick up 1270 o allow to randomize build order of targets 1271 .MAKE.MODE += randomize-targets can help uncover dependency bugs 1272 within a makefile. 1273 o compat.c: rename Compat_Run to Compat_MakeAll 1274 o make.c: inline MakeBuildParent 1275 inline make_abort, improve error details 1276 o parse.c: reorganize Parse_Error 1277 fix memory leak in wildcard targets and sources 1278 separate cases in HandleDependencyTargetMundane 1279 extract HandleSingleDependencyTargetMundane 1280 rename loadfile to LoadFile 1281 split IncludeFile into separate functions 1282 condense code for searching a file in the paths 1283 fix off-by-one error in buffer for .WAIT nodes 1284 o str.c: condense Str_Match 1285 make code for string matching syntactically more consistent 1286 12872022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1288 1289 * VERSION (_MAKE_VERSION): 20220418 1290 Merge with NetBSD make, pick up 1291 o ignore '.POSIX:' if not in first non-comment line 1292 of Makefile as specified by POSIX. 1293 add unit-tests for above. 1294 o meta.c: make it easier to find usage of identifiers 1295 o targ.c: add .USEBEFORE to Targ_PrintType 1296 12972022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 1298 1299 * VERSION (_MAKE_VERSION): 20220414 1300 1301 * unit-tests/Makefile: simplify checks for shells with 1302 BROKEN_TESTS, this helps with other Linux distros that 1303 use dash. 1304 13052022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1306 1307 * VERSION (_MAKE_VERSION): 20220330 1308 Merge with NetBSD make, pick up 1309 o var.c: fix spacing, and a typo in a test 1310 13112022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 1312 1313 * VERSION (_MAKE_VERSION): 20220326 1314 Merge with NetBSD make, pick up 1315 o parse.c: try to include 'posix.mk' the first time 1316 .POSIX: is encountered, to allow for beter POSIX compliance. 1317 o var.c: make debug logs more readable 1318 prefer 'long long' over 'long' on 32-bit C99 platforms 1319 fix crash on .undef of an environment variable 1320 13212022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 1322 1323 * VERSION (_MAKE_VERSION): 20220303 1324 Merge with NetBSD make, pick up 1325 o tell meta mode unit tests not to expect filemon 1326 o cond.c: make debug logging for comparisons less technical 1327 o lst.c: fix mem leak in Lst_Remove 1328 o str.c: make code for string matching syntactically more consistent 1329 o var.c: simplify ParseModifier_Match 1330 13312022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 1332 1333 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 1334 1335 * VERSION (_MAKE_VERSION): 20220214 1336 Merge with NetBSD make, pick up 1337 o cond.c: simplify control flow in CondParser_Comparison 1338 o job.c: fix echoing of command with '-' in silent target in jobs mode 1339 o main.c: prefix the warning about read-only .OBJDIR with a colon 1340 o parse.c: remove redundant conditions 1341 o var.c: simplify control flow in ModifyWord_SysVSubst 1342 13432022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1344 1345 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 1346 is any chance we have dash as .SHELL 1347 1348 * VERSION (_MAKE_VERSION): 20220208 1349 Merge with NetBSD make, pick up 1350 o more unit tests 1351 o meta.c: use a variable to hold command line to be filtered 1352 to avoid any side effects from content of command line. 1353 13542022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 1355 1356 * VERSION (_MAKE_VERSION): 20220204 1357 Merge with NetBSD make, pick up 1358 o use unsigned consistently for line numbers, avoid the need for %z 1359 o parse.c: do not step off end of input in Parse_IsVar 1360 when checking for target local variable assignments 1361 13622022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 1363 1364 * VERSION (_MAKE_VERSION): 20220202 1365 Merge with NetBSD make, pick up 1366 o remove redundant declaration of HashIter_Init 1367 o make DEBUG0 simpler 1368 13692022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1370 1371 * cast gn->lineno to avoid %z 1372 1373 * VERSION (_MAKE_VERSION): 20220130 1374 Merge with NetBSD make, pick up 1375 o more unit tests 1376 o make GNode lineno unsigned to please lint 1377 o print location of recursive variable references in commands 1378 o print "stack trace" (makefile includes) on fatal errors 1379 o make.1: refine documentation for target local assignments 1380 13812022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 1382 1383 * VERSION (_MAKE_VERSION): 20220128 1384 Merge with NetBSD make, pick up 1385 o inline functions called only once 1386 o for.c: clean up AddEscape for building the body of a .for loop 1387 o hash.c: merge duplicate code for finding an entry in a hash table 1388 replace HashEntry_KeyEquals with strncmp 1389 o make.1: document quirks of target local variable assignments. 1390 o parse.c: cleanup white-space 1391 13922022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1393 1394 * VERSION (_MAKE_VERSION): 20220126 1395 Merge with NetBSD make, pick up 1396 o allow setting target local variables 1397 o more unit tests 1398 o add missing newline after "cannot continue" message 1399 o meta.c: clean up eat_dots 1400 o parse.c: fix filename in warning about duplicate script 1401 o var.c: when expanding nested variables, check simple things first 1402 14032022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 1404 1405 * VERSION (_MAKE_VERSION): 20220116 1406 Merge with NetBSD make, pick up 1407 o fix for unit-tests/varname-makeflags on non-BSD systems 1408 o use Var_Exists rather than Var_Value where appropriate 1409 o remove unnecessary functions for expanding variable names 1410 o cond.c: inline EvalBare 1411 o main.c: lint cleanup 1412 o parse.c: condense code in Parse_IsVar 1413 use islower for parsing directives (none have upper case) 1414 14152022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1416 1417 * VERSION (_MAKE_VERSION): 20220112 1418 Merge with NetBSD make, pick up 1419 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 1420 comparion, rarely needed but useful when it is. 1421 14222022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1423 1424 * VERSION (_MAKE_VERSION): 20220110 1425 Merge with NetBSD make, pick up 1426 o inline Buf_Clear 1427 o remove redundant braces 1428 o rename and inline Targ_Precious 1429 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 1430 o for.c: clean up handling of .for loops 1431 fix reported line numbers of continuation lines 1432 add details about .for loop variables to stack traces 1433 o job.c: reduce code for initializing error handling in shell 1434 o main.c: in Cmd_Exec, return error message instead of format string 1435 have as few statements as possible between va_start and va_end 1436 add debug logging for capturing the output of external commands 1437 o make.c: use consistent variable names for varargs 1438 o make_malloc.c: remove duplicate code from bmake_strdup 1439 o parse.c: add missing printflike annotations 1440 remove redundant lines from stack traces 1441 fix stack traces in -dp mode 1442 reduce confusing code in ParseForLoop 1443 fix line number in debug log after returning from a file 1444 rename IFile and its fields to match their actual content 1445 clean up ParseDependencySources 1446 o var.c: shorten ApplyModifier_Assign 1447 rename is_shell_metachar, fix character conversion warning 1448 merge calls to ApplyModifier_Time 1449 merge duplicate code for modifiers 'gmtime' and 'localtime' 1450 14512022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 1452 1453 * parse.c: loadfile restore extra byte in buffer. 1454 14552022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1456 1457 * VERSION (_MAKE_VERSION): 20220101 1458 Merge with NetBSD make, pick up 1459 o more unit-tests 1460 o remove unnecessary words from command line options in CmdOpts 1461 o rename eunlink to unlink_file 1462 o cond.c: make ParseWord in condition parser simpler 1463 internally return false for irrelevant leaves in conditions 1464 replace table for function lookup in conditions with simple code 1465 merge duplicate types CondEvalResult and CondResult 1466 o for.c: clean up handling of .for loops and .include directives 1467 o main.c: constify cached_realpath 1468 clean up Cmd_Exec 1469 o parse.c: sync API documentation 1470 fix error message when reading more than 1 GB from stdin 1471 clean up parsing of makefiles 1472 fix line number in error message about open conditionals 1473 unexport types VarAssignOp and VarAssign 1474 clean up function names 1475 remove redundant parameters in dependency parsing functions 1476 reduce scope of the list of wildcard target names 1477 extract OP_NOTARGET into separate function 1478 clean up variable names for parsing dependency lines 1479 make debug logging a bit more human-friendly 1480 o var.c: condense code in ApplyModifier_Assign 1481 14822021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1483 1484 * VERSION (_MAKE_VERSION): 20211221 1485 Merge with NetBSD make, pick up 1486 o more unit-tests 1487 o style cleanup 1488 o in CLEANUP mode, free interned strings at the very end 1489 o fix memory leak for filenames in .for loops 1490 o buf.c: avoid memory leak 1491 o cond.c: condense CondParser_ComparisonOp 1492 o hash.c: change return type of HashTable_Set to void 1493 o job.c: change return type of Compat_RunCommand from int to bool 1494 o main.c: remove bmake_free 1495 o parse.c: condense repetetive code in ParseDirective 1496 remove dead code for handling traditional include directives 1497 clean up parsing of variable assignments 1498 remove unreachable code for parsing the dependency operator 1499 clean up loading of files 1500 fix memory leak in IncludeFile 1501 o var.c: fix memory leak when parsing a variable name 1502 fix memory leak from ${.SUFFIXES} 1503 reduce memory allocation in modifier ':?' and ':C' 1504 condense RegexReplace for the modifier ':C' and avoid strlen 1505 merge duplicate code for memory handling in Var_Parse 1506 distinguish between short-lived and environment variables 1507 rename VarFreeEnv to VarFreeShortLived 1508 15092021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 1510 1511 * cond.c: fix mem leak in CondParser_Leaf 1512 15132021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1514 1515 * VERSION (_MAKE_VERSION): 20211212 1516 Merge with NetBSD make, pick up 1517 o rename Parse_SetInput to Parse_PushInput 1518 o remove remove period from end of error messages and warnings 1519 to be more consistent 1520 o arch.c: use simpler memory management for parsing archive members 1521 o cond.c: rework and reduce recursion 1522 o for.c: rename some functions to better reflect purpose 1523 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 1524 o var.c: in parse errors, mark whitespace more clearly 1525 inline ParseEmptyArg into CondParser_FuncCallEmpty 1526 minimize calls to LazyBuf_Get in ParseVarnameLong 1527 treat .SUFFIXES as a read-only variable 1528 15292021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 1530 1531 * VERSION (_MAKE_VERSION): 20211207 1532 Merge with NetBSD make, pick up 1533 o inline HashIter_Init 1534 o parse.c: inline common subexpression in ParseRawLine 1535 o var.c: merge branches for modifiers ':D' and ':U' 1536 extract common code into Expr_Words 1537 extract common code into Expr_Str 1538 move low-level implementation details out of Var_Parse 1539 15402021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1541 1542 * VERSION (_MAKE_VERSION): 20211206 1543 Merge with NetBSD make, pick up 1544 o add unit-tests/varmod-loop-delete 1545 o for.c: inline Str_Words - reduce memory allocation 1546 o parse.c: do not try to expand fixed variable names 1547 only allocate the name of an included file if necessary 1548 clean up ParseInclude 1549 o var.c: fix use-after-free in modifier ':@' 1550 save a memory allocation in each modifier ':O' and ':u' 1551 save a memory allocation in the modifier ':[...]' 1552 in UnexportVars, replace Str_Words with Substring_Words to 1553 reduce allocations and copying. 1554 15552021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 1556 1557 * VERSION (_MAKE_VERSION): 20211204 1558 Merge with NetBSD make, pick up 1559 o flesh out a number of tests 1560 o replace enums with bitfields, this simplifies a lot of code. 1561 o var.c: refactor ParseModifierPartSubst 1562 15632021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 1564 1565 * VERSION (_MAKE_VERSION): 20211024 1566 Merge with NetBSD make, pick up 1567 o Punt on write errors - ENOSPC etc. 1568 15692021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1570 1571 * configure.in: use_defshell, set both DEFSHELL_INDEX 1572 and defshell_path if appropriate. 1573 This makes it easier to use say the KSH specification with 1574 and alternate path for the shell. 1575 1576 * configure.in compat.c: for SCO we need to force UseShell 1577 1578 * configure.in: SCO /bin/sh is not usable, provide a list of 1579 alternatives for use as .SHELL. 1580 We still have to mark some tests as broken, plus more if we end up 1581 with ksh as .SHELL. 1582 Issue a warning about skipped tests. 1583 1584 * boot-strap: leave TOOL_DIFF to configure 1585 1586 * configure.in: on SCO native cc is not usable, 1587 gcc is to be found in /usr/gnu/bin 1588 and while ancient is at least able to compile bmake. 1589 Thus we add /usr/gnu/bin to PATH if it exists, and later 1590 check if $CC would have been found via $PATH. 1591 If not we set CC to the full path of $CC. 1592 Also gnu diff is known to support -u, so if it exists use it. 1593 1594 * configure.in: move getopt to AC_REPLACE_FUNCS 1595 also add AC_C_INLINE - in an attempt to compile using 1596 native cc on SCO. 1597 1598 * configure.in: check for stresep as well as strsep, since we 1599 define the later to the former if necessary, and if we have to 1600 provide stresep we also need to provide a prototype. 1601 1602 * configure.in: we no longer need to worry about 1603 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 1604 1605 * make.h: make sure we have __RCSID 1606 1607 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 1608 can control it. 1609 16102021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 1611 1612 * VERSION: 20211020 1613 Merge with NetBSD make, pick up 1614 o confirm sync of unit-tests 1615 16162021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1617 1618 * configure.in: check if timezone Europe/Berlin is supported 1619 if not try UTC-1 1620 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 1621 symlink unit-tests -> ../unit-tests/obj so that 1622 unit-tests/Makefile.config is put in the right place. 1623 * refine filtering of .OBJDIR in unit-tests 1624 16252021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 1626 1627 * Fix unit-tests on Minix 3.2.0 1628 o job.c: do not punt if read of token pipe fails for EAGAIN. 1629 On Minix at least, we are not ready to read the childExitJob pipe 1630 when poll says we are. 1631 There should actually be no reason for this pipe to be 1632 non-blocking, but while that works fine on {Net,Free}BSD it 1633 breaks another test case on Minix. 1634 o unit-tests/Makefile: deal with variants of error messages 1635 and use of obj as .OBJDIR 1636 16372021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 1638 1639 * configure.in: add sigaction to AC_REPLACE_FUNCS 1640 we also need to check for sigaddset etc just for the benefit of 1641 sigact.c 1642 1643 * Add sigact.c as sigaction.c so this "just works". 1644 This should have been done back when bmake_signal started using 1645 sigaction (I only just noticed that sigact.c wasn't here ;-) 1646 Note: I no longer have access to any system where this would matter. 1647 16482021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 1649 1650 * VERSION (_MAKE_VERSION): 20211011 1651 1652 * Makefile: cleanup a little 1653 1654 * configure.in: check for sigsetmask 1655 16562021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1657 1658 * VERSION (_MAKE_VERSION): 20211001 1659 Merge with NetBSD make, pick up 1660 o reduce locations reducing text size 1661 o remove unnecessary const 1662 o cond.c: fix lint warning on i386 1663 do not allow unquoted 'left == right' after modifier ':?' 1664 o hash.c: fix build for DEBUG_HASH_LOOKUP 1665 o var.c: fix memory leak in error case of the ':?' modifier 1666 16672021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1668 1669 * VERSION (_MAKE_VERSION): 20210911 1670 Merge with NetBSD make, pick up 1671 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 1672 16732021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 1674 1675 * VERSION (_MAKE_VERSION): 20210906 1676 Merge with NetBSD make, pick up 1677 o more unit tests 1678 o lint cleanup 1679 o rename some functions to better fit purpose 1680 o for.c: cleanup - remove unnecessary optimization 1681 fix embedded newlines 1682 o parse.c: correct case for CVS/RCS 1683 16842021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 1685 1686 * VERSION (_MAKE_VERSION): 20210808 1687 Merge with NetBSD make, pick up 1688 o var.c: remove redundant initialization in ApplyModifier_Order 1689 1690 * mk/options.mk: issue warning for incorrect usage 1691 16922021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1693 1694 * var.c: use long for :On if we don't have a 64bit int type 1695 1696 * VERSION (_MAKE_VERSION): 20210803 1697 Merge with NetBSD make, pick up 1698 o rework varmod-order tests to avoid qsort instability 1699 o make.1: clarify :On entry 1700 17012021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1702 1703 * VERSION (_MAKE_VERSION): 20210731 1704 Merge with NetBSD make, pick up 1705 o fix some lint issues 1706 o more unit tests 1707 o var.c: rework of ApplyModifier_Order 1708 17092021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1710 1711 * util.c: add strto*l if HAVE_STRTO*L not defined 1712 1713 * VERSION (_MAKE_VERSION): 20210730 1714 Merge with NetBSD make, pick up 1715 o var.c: add :On and :Orn for numeric sort 1716 disabled if no 64bit type available. 1717 o _strtol.h: to implement strto*l functions 1718 17192021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1720 1721 * VERSION (_MAKE_VERSION): 20210704 1722 Merge with NetBSD make, pick up 1723 o unit-tests: fix some tests to be more portable 1724 - job-output-null not all shells do the same number of write calls 1725 - objdir-writable if TMPDIR is set; /tmp may not be usable 1726 17272021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1728 1729 * VERSION (_MAKE_VERSION): 20210701 1730 Merge with NetBSD make, pick up 1731 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1732 some tests just cannot work in some environments. 1733 o buf.c: simpler upper bound for length in Buf_AddInt 1734 o cond.c: fix grammar in error message for malformed conditional 1735 o for.c: prevent newline injection (from ${.newline}) in .for loops 1736 o var.c: use more practical data type in RegexReplace 1737 (avoid need for %zu) 1738 extract RegexReplace from ModifyWord_SubstRegex 1739 17402021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1741 1742 * VERSION (_MAKE_VERSION): 20210621 1743 Merge with NetBSD make, pick up 1744 o var.c: only report error for unmatched regex subexpression 1745 when linting (-dL) since we cannot tell when an unmatched 1746 subexpression is an expected result. 1747 o move unmatched regex subexpression tests to 1748 varmod-subst-regex.mk and enable strict (lint) mode 1749 17502021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1751 1752 * VERSION (_MAKE_VERSION): 20210616 1753 Merge with NetBSD make, pick up 1754 o more unit tests 1755 o cond.c: rename If_Eval to EvalBare 1756 improve function names for parsing conditions 1757 o job.c: fix error handling of targets that cannot be made 1758 o var.c: uncompress code in ApplyModifier_Unique 1759 17602021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1761 1762 * VERSION (_MAKE_VERSION): 20210518 1763 Merge with NetBSD make, pick up 1764 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1765 o job.c: Print -de error information when running multiple jobs 1766 17672021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1768 1769 * VERSION (_MAKE_VERSION): 20210420 1770 Merge with NetBSD make, pick up 1771 o use C99 bool type 1772 o convert VarEvalFlags back into an enum 1773 o cond.c: do not complain when skipping the condition 'no >= 10' 1774 o hash.c: avoid allocating memory for simple variable names 1775 o job.c: use distinct wording for writing to the shell commands file 1776 remove type name for the abort status in job handling 1777 rename PrintOutput to PrintFilteredOutput to avoid confusion 1778 o main.c: avoid double slash in name of temporary directory 1779 o var.c: use straight quotes for error 'Bad conditional expression' 1780 reduce memory allocations in the modifiers ':D' and ':U' 1781 rename members of ModifyWord_LoopArgs 1782 clean up pattern flags for the modifiers ':S' and ':C' 1783 reduce memory allocation and strlen calls in modifier ':from=to' 1784 in the ':Q' modifier, only allocate memory if necessary 1785 improve performance for LazyBuf 1786 remove redundant parameter from ParseVarnameLong 1787 migrate ParseModifierPart to use Substring 1788 avoid unnecessary calls to strlen when evaluating modifiers 1789 migrate ModifyWord functions to use Substring 1790 migrate handling of the modifier ':S,from,to,' to Substring 1791 reduce debug logging and memory allocation for ${:U...} 1792 reduce verbosity of the -dv debug logging for standard cases 1793 clean up debug logging for ':M' and ':N' 1794 disallow '$' in the variable name of the modifier ':@' 1795 simplify access to the name of an expression during evaluation 1796 17972021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1798 1799 * VERSION (_MAKE_VERSION): 20210330 1800 Merge with NetBSD make, pick up 1801 o replace enum bit-field with struct bit-field for VarEvalFlags 1802 o rename VARE_NONE to VARE_PARSE_ONLY 1803 o var.c: rename ApplyModifiersState to ModChain 1804 fix double varname expansion in the variable modifier '::=' 1805 change debug log for variable evaluation flags to lowercase 1806 18072021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1808 1809 * VERSION (_MAKE_VERSION): 20210314 1810 Merge with NetBSD make, pick up 1811 o var.c: avoid evaluating many modifiers in parse only mode 1812 in strict mode (-dL) many variable references are parsed twice, 1813 the first time just to report parse errors early, so we want to 1814 avoid side effects and wasted effort to the extent possible. 1815 18162021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1817 1818 * VERSION (_MAKE_VERSION): 20210226 1819 Merge with NetBSD make, pick up 1820 o remove freestanding freeIt variables 1821 link via FStr 1822 o var.c: restructure code in ParseVarname to target human readers 1823 improve error message for; 1824 bad modifier in variable expression 1825 unclosed modifier 1826 unknown modifier 1827 remove redundant parameter of ApplySingleModifier 1828 explain non-obvious code around indirect variable modifiers 1829 quote ':S' in error message about missing delimiter 1830 extract ParseModifier_Match into separate function 1831 add context information to error message about ':range' modifier 1832 add quotes around variable name in an error message 1833 reorder code in ModifyWords 1834 use more common parameter order for VarSelectWords 1835 make ModifyWord_Subst a little easier to understand 1836 do not expand variable name from the command line twice 1837 extract ExistsInCmdline from Var_SetWithFlags 1838 save a hash map lookup when defining a cmdline variable 1839 clean up VarAdd, Var_Delete, Var_ReexportVars 1840 use bit-shift expressions for VarFlags constants 1841 rename constants for VarFlags 1842 rename ExprDefined constants for debug logging 1843 rename ExprStatus to ExprDefined 1844 split parameters for evaluating variable expressions 1845 reduce redundant code around ModifyWords 1846 print error about failed shell command before overwriting variable 1847 clean up ValidShortVarname, ParseVarnameShort 1848 rename VarExprStatus to ExprStatus 1849 add functions for assigning the value of an expression 1850 rename ApplyModifiersState_Define to Expr_Define 1851 condense the code for parsing :S and :C modifiers 1852 18532021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1854 1855 * VERSION (_MAKE_VERSION): 20210206 1856 Merge with NetBSD make, pick up 1857 o unit-tests: use private TMPDIR to avoid errors from other users 1858 18592021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1860 1861 * VERSION (_MAKE_VERSION): 20210205 1862 Merge with NetBSD make, pick up 1863 o avoid strdup in mkTempFile 1864 o always use vfork 1865 o rename context and ctxt to scope 1866 o rename some VAR constants to SCOPE 1867 o Var_ functions, move the scope to the front 1868 o use shortcut functions Global_Set and Global_Append 1869 o add shortcut Global_Delete for deleting a global variable 1870 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1871 o compat.c: when exiting due to an error, print graph information 1872 o enum.c: remove overengineered Enum_ValueToString 1873 o make.c: remove unused INTERNAL flag 1874 remove unused return type of MakeBuildParent 1875 o parse.c: replace parse error "Need an operator" with better message 1876 o var.c: improve documentation about variable scopes 1877 rename Var_ValueDirect to GNode_ValueDirect 1878 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1879 merge SetVar into Var_SetWithFlags 1880 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1881 split Var_Append into Var_Append and Var_AppendExpand 1882 replace enum bit-set with bit-field 1883 o unit-tests/var-op-shell: use kill rather than kill -14 1884 which broke on darwin with recent update. 1885 18862021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1887 1888 * configure.in: check for sig_atomic_t and define it as 'int' 1889 if missing. 1890 1891 * VERSION (_MAKE_VERSION): 20210201 1892 Merge with NetBSD make, pick up 1893 o use sig_atomic_t for caught_sigchld 1894 18952021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1896 1897 * VERSION (_MAKE_VERSION): 20210130 1898 Merge with NetBSD make, pick up 1899 o more unit tests 1900 o convert SearchPath to struct 1901 o split Buf_Destroy into Buf_Done and Buf_DoneData 1902 o for.c: split For_Eval into separate functions 1903 rename struct For to struct ForLoop 1904 o job.c: do not create empty shell files in jobs mode 1905 rename JobOpenTmpFile to JobWriteShellCommands 1906 reduce unnecessary calls to waitpid 1907 o parse.c: in -dp mode, print stack trace with each diagnostic 1908 19092021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1910 1911 * VERSION (_MAKE_VERSION): 20210123 1912 Merge with NetBSD make, pick up 1913 o rename Dir_Expand to SearchPath_Expand 1914 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1915 o cond.c: fix debug output for comparison operators in conditionals 1916 o dir.c: split Dir_FindFile into separate functions 1917 19182021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1919 1920 * VERSION (_MAKE_VERSION): 20210120 1921 Merge with NetBSD make, pick up 1922 o fix some more lint nits 1923 o refine some unit tests for portability 1924 o cond.c: rework parsing 1925 19262021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1927 1928 * VERSION (_MAKE_VERSION): 20210110 1929 Merge with NetBSD make, pick up 1930 o fix lint warnings 1931 o consistently use boolean expressions in conditions 1932 19332021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1934 1935 * VERSION (_MAKE_VERSION): 20210108 1936 Merge with NetBSD make, pick up 1937 o job.c: back to polling token pipe if we want a token 1938 o main.c: always print 'stopped in' on first call 1939 The execption is if we bail because of an abort token 1940 in which case just exit 6. 1941 19422021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1943 1944 * VERSION (_MAKE_VERSION): 20210101 1945 Merge with NetBSD make, pick up 1946 o Happy New Year! 1947 o rename CmdOpts.lint to strict 1948 o exit 2 on technical errors 1949 o replace pointers in controlling conditions with booleans 1950 o replace global preserveUndefined with VARE_KEEP_UNDEF 1951 o compat.c: re-export variables from the actual make process 1952 if using vfork this is the effect anyway 1953 o cond.c: clean up VarParseResult constants 1954 o for.c: fix undefined behavior in SubstVarLong 1955 make control flow in SubstVarLong of .for loops more obvious 1956 clean up SubstVarShort in .for loops 1957 extract ForSubstBody from ForReadMore 1958 clean up ForReadMore 1959 simplify termination condition for .for loop 1960 add error handling for .for loop items 1961 job.c: re-export variables from the actual make process 1962 parse.c: remove mmap for loading files, only allow files < 1 GiB 1963 fix edge case in := with undefined in variable name 1964 skip variable expansion in ParseDependencyTargetWord 1965 var.c: split ExportVar into separate functions 1966 clean up code in extracted ExportVar functions 1967 remove dead code from ApplyModifiersIndirect 1968 split Var_Subst into easily understandable functions 1969 clean up VarParseResult constants 1970 19712020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1972 1973 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1974 19752020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1976 1977 * VERSION (_MAKE_VERSION): 20201222 1978 Merge with NetBSD make, pick up 1979 o make DEBUG macro return boolean 1980 o parse.c: fix assertion failure for files without trailing newline 1981 o var.c: allow .undef to undefine multiple variables at once 1982 remove excess newline from parse errors 1983 19842020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1985 1986 * VERSION (_MAKE_VERSION): 20201221 1987 Merge with NetBSD make, pick up 1988 o some unit-test updates 1989 19902020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1991 1992 * VERSION (_MAKE_VERSION): 20201220 1993 Merge with NetBSD make, pick up 1994 o more unit tests 1995 o return FStr from Var_Parse and Var_Value 1996 o spell nonexistent consistently 1997 o add str_basename to reduce duplicate code 1998 o compat.c: fix .ERROR_TARGET in compat -k mode 1999 extract InitSignals from Compat_Run 2000 extract UseShell from Compat_RunCommand 2001 o cond.c: error out if an '.endif' or '.else' contain extraneous text 2002 o for.c: rename ForIterate to ForReadMore 2003 o hash.c: clean up hash function for HashTable 2004 o lst.c: rename Vector.priv_cap to cap 2005 o main.c: remove constant parameter from MakeMode 2006 o make.c: use symbolic time for 0 in Make_Recheck 2007 extract MakeChildren from MakeStartJobs 2008 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 2009 fix error message for .info/.warning/.error without argument 2010 extract Var_Undef from ParseDirective 2011 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 2012 rename mode constants for ParseGetLine to be more expressive 2013 reduce debugging details in Parse_SetInput 2014 fix line numbers in .for loops 2015 split ParseGetLine into separate functions 2016 fix garbled output for failed shell command 2017 var.c: remove redundant assignment in ApplyModifier_SysV 2018 error out on unknown variable modifiers at parse time 2019 remove wrong error message for indirect modifier in lint mode 2020 extract ApplySingleModifier from ApplyModifiers 2021 use FStr for memory management in Var_SetWithFlags 2022 extract SetVar from Var_SetWithFlags 2023 use FStr in VarNew 2024 extract string functions from ApplyModifier_To 2025 error out if .undef has not exactly 1 argument 2026 extract Var_DeleteVar from Var_Delete 2027 extract Var_Undef from ParseDirective 2028 clean up memory management for expanding variable expressions 2029 20302020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 2031 2032 * avoid %zu 2033 2034 * lst.c: avoid anonymous union 2035 2036 * VERSION (_MAKE_VERSION): 20201212 2037 Merge with NetBSD make, pick up 2038 o more unit tests 2039 o inline Targ_Ignore and Targ_Silent 2040 o split JobFlags into separate fields 2041 o remove const from function parameters (left overs from refactoring) 2042 o eliminate boolean argument of Var_Export 2043 o make API of Buf_Init simpler 2044 o rename ParseRunOptions to ParseCommandFlags 2045 o replace *line with line[0] 2046 o compat.c: fix wrong exit status for multiple failed main targets 2047 refactor Compat_Run to show the error condition more clearly 2048 don't make .END if the main targets already failed (-k mode) 2049 fix exit status in -k mode if a dependency fails 2050 o for.c: clean up Buf_AddEscaped in .for loops 2051 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 2052 make Job_Touch simpler 2053 refactor JobFinish 2054 rename Shell.exitFlag to errFlag 2055 move Job.xtraced to ShellWriter 2056 make printing of shell commands independent from the job 2057 rename shell flags in struct Shell 2058 extract JobOpenTmpFile from JobStart 2059 rename RunFlags to CommandFlags 2060 split various Job.* into separate fields 2061 rename commandShell to shell 2062 extract InitShellNameAndPath from Shell_Init 2063 replace signal handling macros with local functions 2064 replace macro MESSAGE with local function 2065 parse.c: error out on null bytes in makefiles 2066 error out on misspelled directives 2067 rename IFile.nextbuf to readMore 2068 fix undefined behavior in ParseEOF 2069 str.c: remove redundant call to strlen in Str_Words 2070 var.c: error out on misspelled .unexport-env 2071 error out on misspelled .export directives 2072 extract ExportVars from Var_Export 2073 extract ExportVarsExpand from Var_Export 2074 eliminate boolean argument of Var_Export 2075 fix undefined behavior when exporting ${:U } 2076 rename Var_ExportVars to Var_ReexportVars 2077 rename Var_Export1 to ExportVar 2078 20792020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 2080 2081 * VERSION (_MAKE_VERSION): 20201206 2082 Merge with NetBSD make, pick up 2083 o more unit tests 2084 o inline macros for debug logging 2085 o use consistent variable names for list nodes 2086 o define constants for enum zero-values 2087 o dir.c: use fixed format for debug output of the directory cache 2088 remove Dir_InitDir 2089 o lst.c: inline Lst_Enqueue, Vector_Done 2090 o meta.c: remove unused parameter from meta_needed 2091 o parse.c: rename parse functions 2092 o suff.c: extract ExpandChildrenRegular from ExpandChildren 2093 o targ.c: don't concatenate identifiers in Targ_PrintType 2094 o var.c: remove comment decoration 2095 extract UnexportVars from Var_UnExport 2096 extract GetVarnamesToUnexport from Var_UnExport 2097 extract UnexportEnv from Var_UnExport 2098 extract UnexportVar from Var_UnExport 2099 move CleanEnv to UnexportVars 2100 replace pointer comparisons with enum 2101 add FStr to var.c to make memory handling simpler 2102 use FStr in Var_UnExport 2103 move type definitions in var.c to the top 2104 extract FreeEnvVar from Var_Parse 2105 extract ShuffleStrings from ApplyModifier_Order 2106 21072020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 2108 2109 * VERSION (_MAKE_VERSION): 20201130 2110 Merge with NetBSD make, pick up 2111 o add unit tests for META MODE 2112 o reduce memory allocation for dirSearchPath, GNode.parents, 2113 GNode.children, OpenDirs 2114 o reduce pointer indirection for GNode.cohorts and 2115 GNode.implicitParents 2116 o remove pointer indirection from GNode.commands 2117 o inline Lst_ForEachUntil in meta mode 2118 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 2119 clean up memory management for CachedDirs 2120 fix the reference count of dotLast going negative 2121 add debug logging for OpenDirs_Done 2122 extract CacheNewDir from Dir_AddDir 2123 add debug logging for reference counting of CachedDir 2124 rename some Dir functions to SearchPath 2125 o job.c: rename some global variables 2126 o main.c: reduce memory allocation in ReadBuiltinRules 2127 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 2128 CmdOpts.makefiles 2129 Add .MAKE.UID and .MAKE.GID 2130 o make.c: reduce memory allocation for/in toBeMade, 2131 Make_ProcessWait, Make_ExpandUse 2132 o meta.c: reduce memory allocation in meta_oodate 2133 o parse.c: reduce memory allocations for parsing dependencies and 2134 targets 2135 o suff.c: reduce memory allocation in suffix handling 2136 21372020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 2138 2139 * VERSION (_MAKE_VERSION): 20201124 2140 Merge with NetBSD make, pick up 2141 o .MAKE.{UID,GID} represent uid and gid running make. 2142 o fix error handling for .BEGIN and .END dependency in -k mode 2143 o fix missing "Stop." after failed .END node in -k mode 2144 o use properly typed comparisons in boolean contexts 2145 o replace a few HashTable_CreateEntry with HashTable_Set 2146 o add HashSet type 2147 o compat.c: split Compat_Make into smaller functions 2148 extract DebugFailedTarget from Compat_RunCommand 2149 o dir.c: refactor Dir_UpdateMTime 2150 migrate CachedDir.files from HashTable to HashSet 2151 o make.c: add high-level API for GNode.made 2152 21532020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 2154 2155 * VERSION (_MAKE_VERSION): 20201122 2156 Merge with NetBSD make, pick up 2157 o rename GNode.context to vars 2158 o suff.c: cleanup and refactor 2159 rename some functions and vars to better reflect usage 2160 add high-level API for CandidateSearcher 2161 o targ.c: add more debug logging for suffix handling 2162 o more unit tests 2163 o add debug logging for setting and resetting the main target 2164 21652020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 2166 2167 * VERSION (_MAKE_VERSION): 20201117 2168 Merge with NetBSD make, pick up 2169 o fix some unit-tests when .SHELL is dash 2170 o rename Targ_NewGN to GNode_New 2171 o make some GNode functions const 2172 o main.c: call Targ_Init before Var_Init 2173 cleanup PrintOnError, getTmpdir and ParseBoolean 2174 o var.c: fix error message of failed :!cmd! modifier 2175 21762020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 2177 2178 * VERSION (_MAKE_VERSION): 20201114 2179 Merge with NetBSD make, pick up 2180 o replace a few HashTable_CreateEntry with HashTable_Set 2181 o clean up cached_stats 2182 o rename DEFAULT to defaultNode 2183 o remove redundant struct make_stat 2184 o cond.c: in lint mode, check for ".else <cond>" 2185 use bitset for IfState 2186 replace large switch with if-else in Cond_EvalLine 2187 o job.c: clean up JobExec, JobStart, JobDoOutput 2188 use stderr for error message about failed touch 2189 clean up Job_Touch 2190 replace macro DBPRINTF with JobPrintln 2191 rename JobState to JobStatus 2192 main.c: switch cache for realpath from GNode to HashTable 2193 clean up Fatal 2194 clean up InitDefSysIncPath 2195 use progname instead of hard-coded 'make' in warning 2196 rename Main_SetVarObjdir to SetVarObjdir 2197 make.1: document the -S option 2198 make.c: fix debug output for GNode details 2199 use symbolic names in debug output of GNodes 2200 22012020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 2202 2203 * configure.in: fix --with-force-machine-arch 2204 2205 * VERSION (_MAKE_VERSION): 20201112 2206 Merge with NetBSD make, pick up 2207 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 2208 checks in InitObjdir. Explicit .OBJDIR target always allows 2209 read-only directory. 2210 o cond.c: clean up Cond_EvalLine 2211 22122020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 2213 2214 * VERSION (_MAKE_VERSION): 20201111 2215 Merge with NetBSD make, pick up 2216 o more unit-tests 2217 o style cleanup 2218 remove redundant parentheses from sizeof operator 2219 replace character literal 0 with '\0'. 2220 replace pointer literal 0 with NULL. 2221 remove redundant parentheses. 2222 replace (expr & mask) == 0 with !(expr & mask). 2223 use strict typing in conditions of the form !var 2224 o rename Make_OODate to GNode_IsOODate 2225 o rename Make_TimeStamp to GNode_UpdateYoungestChild 2226 o rename Var_Set_with_flags to Var_SetWithFlags 2227 o rename dieQuietly to shouldDieQuietly 2228 o buf.c: make API of Buf_Init simpler 2229 o compat.c: clean up Compat_Make, Compat_RunCommand, 2230 CompatDeleteTarget and CompatInterrupt 2231 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 2232 clean up CondParser_Comparison 2233 o main.c: rename getBoolean and s2Boolean 2234 rename MAKEFILE_PREFERENCE for consistency 2235 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 2236 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 2237 replace emptyString with allocated empty string 2238 error out on unclosed expressions after the colon 2239 22402020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 2241 2242 * VERSION (_MAKE_VERSION): 20201101 2243 Merge with NetBSD make, pick up 2244 o negate NoExecute to GNode_ShouldExecute 2245 o job.c: rename JobMatchShell to FindShellByName 2246 extract EscapeShellDblQuot from JobPrintCommand 2247 extract ParseRunOptions from JobPrintCommand 2248 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 2249 treat malformed :range, :ts and :[...] as errors 2250 add tests for the variable modifiers :[words] and :range 2251 22522020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 2253 2254 * VERSION (_MAKE_VERSION): 20201031 2255 Merge with NetBSD make, pick up 2256 o format #include directives consistently 2257 o do not look up local variables like .TARGET anywhere else 2258 o main.c: Main_SetObjdir is first called for curdir which may be 2259 readonly 2260 reduce the scope where recursive expressions are detected 2261 remove redundant :tl from getBoolean 2262 clean up mkTempFile 2263 o meta.c: simplify memory allocation in meta_create and meta_oodate 2264 o parse.c: extract loadedfile_mmap from loadfile 2265 o trace.c: document possible undefined behavior with .CURDIR 2266 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 2267 rename ismeta to is_shell_metachar 2268 remove debug logging for the :Q variable modifier 2269 rename VarIsDynamic to VarnameIsDynamic 2270 use consistent parameter order in varname parsing functions 2271 extract ParseVarnameLong from Var_Parse 2272 extract ParseVarnameShort from Var_Parse 2273 fix type of ParseModifierPart parameter delim 2274 extract IsEscapedModifierPart from ParseModifierPart 2275 clean up ModifyWords 2276 add test for combining the :@ and :? variable modifiers 2277 22782020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 2279 2280 * VERSION (_MAKE_VERSION): 20201030 2281 Merge with NetBSD make, pick up 2282 o change char * to void * in Var_Value 2283 o make iterating over HashTable simpler 2284 o rename VAR_CMD to VAR_CMDLINE 2285 o cond.c: clean up is_separator 2286 fix parse error in string literal in conditional 2287 o main.c: do not use objdir that is not writable 2288 in lint mode, exit with error status on errors 2289 o parse.c: clean up StrContainsWord 2290 fix out-of-bounds pointer in ParseTrackInput 2291 o var.c: rename Str_SYSVMatch and its parameters 2292 remove unsatisfiable conditions in Var_Set_with_flags 2293 document where the variable name is expanded 2294 fix documentation for VARP_SUB_ONE 2295 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 2296 document VAR_READONLY 2297 prevent appending to read-only variables 2298 extract MayExport from Var_Export1 2299 remove redundant evaluations in VarFind 2300 replace VarFindFlags with a simple Boolean 2301 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 2302 23032020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 2304 2305 * VERSION (_MAKE_VERSION): 20201028 2306 Merge with NetBSD make, pick up 2307 o rename defIncPath to defSysIncPath 2308 o initialize all CmdOpts fields 2309 o lst.c: inline Vector_Get 2310 o main.c: refactor main extract 2311 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 2312 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 2313 InitDefIncPath,CmdOpts_Init,UnlimitFiles 2314 o parse.c: merge curFile into includes 2315 rename predecessor to order_pred 2316 sort ParseSpecial alphabetically 2317 remove unused, undocumented .NOEXPORT 2318 rename ParseSpecial enum values consistently 2319 rename some fields of struct IFile 2320 23212020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 2322 2323 * VERSION (_MAKE_VERSION): 20201026 2324 Merge with NetBSD make, pick up 2325 o group the command line options and arguments into a struct 2326 o rename GNode.cmgn to youngestChild 2327 o rename hash functions to identify the type name 2328 o negate OP_NOP and rename it to GNode_IsTarget 2329 o add GNode_Path to access the path of a GNode 2330 o remove macros MIN and MAX 2331 o remove unused Lst_Find and Lst_FindFrom 2332 o arch.c: and make Arch_FindLib simpler 2333 clean up code layout 2334 make Arch_ParseArchive simpler 2335 o cond.c: inline CondFindStrMatch into FuncMake 2336 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 2337 omit trailing space in debug output for expanding file patterns 2338 refactor DirMatchFiles 2339 document that the SearchPath of Dir_FindFile may be NULL 2340 remove UNCONST from Dir_Expand 2341 inline DirFindName 2342 o for.c: clean up code for handling .for loops 2343 o hash.c: print hash in debug log with fixed width 2344 clean up hash table functions 2345 reduce amount of string hashing 2346 o job.c: refactor JobDeleteTarget 2347 use proper enum constants for aborting 2348 convert result of JobStart from macros to enum 2349 convert abort reason macros to enum 2350 rework Job_CheckCommands to reduce indentation 2351 rename Shell fields 2352 add field names in declaration of DEFSHELL_CUSTOM 2353 convert JobState and JobFlags to enum types 2354 move handling of the "..." command to JobPrintCommands 2355 o lst.c: clean up 2356 refactor LstNodeNew 2357 remove Lst_Open, Lst_Next, Lst_Close 2358 remove code for circular lists from Lst_Next 2359 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 2360 /dev/null or anything starting with "no" 2361 convert macros for debug flags into enum 2362 o make.c: inline Lst_Copy in Make_ExpandUse 2363 o meta.c: inline Lst_Find in meta_oodate 2364 make Lst_RemoveIf simpler in meta_oodate 2365 o parse.c: convert error level for Parse_Error to an enum 2366 o suff.c: properly terminate debug output with newline 2367 add more details to DEBUG_SRC log 2368 replace Dir_CopyDir with Dir_CopyDirSearchPath 2369 don't modify GNode name while rebuilding the suffix graph 2370 o var.c: reduce duplicate code in VarFind 2371 23722020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 2373 2374 * VERSION (_MAKE_VERSION): 20201022 2375 Merge with NetBSD make, pick up 2376 o more refactoring and simplification to reduce code size 2377 o var.c: extract CanonicalVarname from VarFind 2378 o make.c: extract UpdateImplicitParentsVars from Make_Update 2379 o main.c: extract PrintVar from doPrintVars 2380 extract HandlePWD from main 2381 o lst.c: inline simple Lst getters 2382 remove unused Lst_ForEach 2383 o job.c: move struct Shell from job.h to job.c 2384 o more unit tests 2385 23862020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 2387 2388 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 2389 23902020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 2391 2392 * VERSION (_MAKE_VERSION): 20201018 2393 Merge with NetBSD make, pick up 2394 o remove USE_IOVEC 2395 o rename some Hash_* apis to Hash* 2396 o replace execError with execDie 2397 o rename Lst_Init to Lst_New 2398 o add tags to enum types 2399 o rename Stack to Vector 2400 o parse.c: more refactoring 2401 o unit-tests: make some tests use line buffered stdout 2402 o unit-tests/Makefile: in meta mode do not make all tests depend on 2403 Makefile, it isn't necessary. 2404 24052020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 2406 2407 * main.c: check for CTL_HW being defined. 2408 * unit-tests/Makefile: ensure export tests output are POSIX compliant 2409 disable opt-debug-jobs test until it works on ubuntu 2410 2411 * VERSION (_MAKE_VERSION): 20201010 2412 Merge with NetBSD make, pick up 2413 o dir.c: remove pathname limit for Dir_FindHereOrAbove 2414 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 2415 o main.c: extract init_machine and init_machine_arch from main 2416 allow to disable debug logging options 2417 o parse.c: enable format string truncation warnings 2418 extract parsing of sources from ParseDoDependency 2419 split ParseDoSrc into smaller functions 2420 hide implementation details from Parse_DoVar 2421 clean up parsing of variable assignments 2422 split Parse_DoVar into manageable pieces 2423 don't modify the given line during Parse_DoVar 2424 fix out-of-bounds memory access in Parse_DoVar 2425 fix parsing of the :sh assignment modifier 2426 o var.c: rework memory allocation for the name of variables 2427 extract ApplyModifier_Literal into separate function 2428 in lint mode, reject modifiers without delimiter 2429 do not export variable names starting with '-' 2430 o fix double-free bug in -DCLEANUP mode 2431 o more cleanup to enable higher warnings level 2432 o more unit tests 2433 24342020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 2435 2436 * VERSION (_MAKE_VERSION): 20201002 2437 Merge with NetBSD make, pick up 2438 o dir.c: use hash table for looking up open directories by name 2439 o main.c: clean up option handling 2440 o parse.c: add missing const for Parse_AddIncludeDir 2441 o var.c: ApplyModifier_To, update pp in each branch 2442 o remove redundant function prototypes 2443 o more unit tests 2444 24452020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 2446 2447 * VERSION (_MAKE_VERSION): 20201001 2448 Merge with NetBSD make, pick up 2449 o compat.c: comment about "..." 2450 24512020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 2452 2453 * VERSION (_MAKE_VERSION): 20200930 2454 Merge with NetBSD make, pick up 2455 o job.c: split Job.jobPipe into 2 separate fields 2456 replace Lst_Open with direct iteration 2457 o lst.c: remove redundant assertions 2458 o targ.c: replace Lst_Open with direct iteration 2459 o var.c: fix bug in evaluation of indirect variable modifiers 2460 extract ApplyModifier_Quote into separate function 2461 o make debug logging simpler 2462 24632020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 2464 2465 * VERSION (_MAKE_VERSION): 20200927 2466 Merge with NetBSD make, pick up 2467 o parse.c: ensure parse errors result in 'stopped in' message. 2468 o compat.c: make parameter of Compat_RunCommand const 2469 o main.c: extract InitVarTarget from main 2470 o parse.c: rename ParseFinishLine to FinishDependencyGroup 2471 refactor ParseDoDependency 2472 o var.c: Var_Subst no longer returns string result 2473 rename Var_ParsePP back to Var_Parse 2474 in lint mode, improve error handling for undefined variables 2475 extract ParseVarname from Var_Parse 2476 o rename Lst_ForEach to Lst_ForEachUntil 2477 o inline Lst_ForEachUntil in several cases 2478 o clean up API for finding and creating GNodes 2479 o fix assertion failure in -j mode with .END node 2480 o inline and remove LstNode_Prev and LstNode_Next 2481 o use fine-grained type names for lists and their nodes 2482 o more unit tests 2483 24842020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 2485 2486 * VERSION (_MAKE_VERSION): 20200911 2487 Merge with NetBSD make, pick up 2488 o cond.c: split EvalComparison into smaller functions 2489 reorder parameters of condition parsing functions 2490 reduce code size in CondParser_Eval 2491 rename CondGetString to CondParser_String 2492 add CondLexer_SkipWhitespace 2493 group the condition parsing state into a struct 2494 in CondGetString, replace repeated Buf_Add with Buf_AddStr 2495 o migrate Var_Parse to Var_ParsePP 2496 o add wrappers around ctype.h functions 2497 o lst.c: use a stack instead of a list for the nested include path 2498 o more unit tests 2499 25002020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 2501 2502 * make-bootstrap.sh.in: adjust object list 2503 25042020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 2505 2506 * VERSION (_MAKE_VERSION): 20200902 2507 Merge with NetBSD make, pick up 2508 o use make_stat to ensure no confusion over valid fields 2509 returned by cached_stat 2510 o var.c: make VarQuote const-correct 2511 o add unit tests for .for 2512 25132020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 2514 2515 * VERSION (_MAKE_VERSION): 20200901 2516 Merge with NetBSD make, pick up 2517 o rename Hash_Table fields 2518 o make data types in Dir_HasWildcards more precise 2519 25202020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 2521 2522 * VERSION (_MAKE_VERSION): 20200831 2523 Merge with NetBSD make, pick up 2524 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 2525 o lst.c: Lst_Open renable assert that list isn't open 2526 o unit test for .TARGET dependent flags 2527 o var.c: fix aliasing bug in VarUniq 2528 o more unit tests for :u 2529 25302020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 2531 2532 * VERSION (_MAKE_VERSION): 20200830 2533 Merge with NetBSD make, pick up 2534 o allow for strict type checking for Boolean 2535 o Var_Parse never returns NULL 2536 o Var_Subst never returns NULL 2537 o Lst_Find now takes boolean match function 2538 o rename Lst_Memeber to Lst_FindDatum 2539 o rename LstNode functions to match their type 2540 o rename GNode.iParents to implicitParents 2541 o fix assertion failure for .SUFFIXES in archives 2542 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 2543 remove unreachable code from CompatRunCommand 2544 o main.c: simplify getBoolean 2545 o stc.c: replace brk_string with simpler Str_Words 2546 o suff.c: add debug macros 2547 25482020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 2549 2550 * VERSION (_MAKE_VERSION): 20200828 2551 Merge with NetBSD make, pick up 2552 o lst.c: inline LstIsValid and LstNodeIsValid 2553 o remove trailing S from Lst function names after migration complete 2554 o more comment cleanup/clarification 2555 o suff.c: clean up suffix handling 2556 o more unit tests 2557 25582020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 2559 2560 * VERSION (_MAKE_VERSION): 20200826 2561 Merge with NetBSD make, pick up 2562 o enum.c: distinguish between bitsets containing flags and 2563 ordinary enums 2564 o var.c: fix error message for ::!= modifier with shell error 2565 o fix bugs in -DCLEANUP mode 2566 25672020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 2568 2569 * VERSION (_MAKE_VERSION): 20200824 2570 Merge with NetBSD make, pick up 2571 o in debug mode, print GNode details in symbols 2572 25732020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 2574 2575 * VERSION (_MAKE_VERSION): 20200823 2576 Merge with NetBSD make, pick up 2577 o lst.c: more asserts, 2578 make args to Lst_Find match others. 2579 o var.c: pass flags to VarAdd 2580 o arch.c: use Buffer 2581 o str.c: brk_string return size_t for nwords 2582 o more unit tests 2583 25842020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 2585 2586 * VERSION (_MAKE_VERSION): 2587 Merge with NetBSD make, pick up 2588 o var.c: support for read-only variables eg .SHELL 2589 being the shell used to run scripts. 2590 o lst.c: more simplification 2591 o more documentation and style cleanup 2592 o more unit tests 2593 o ensure unit-test/Makefile is run by TEST_MAKE 2594 o reduce duplication of header inclusion 2595 25962020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 2597 2598 * VERSION (_MAKE_VERSION): 20200821 2599 Merge with NetBSD make, pick up 2600 o lst.c: revert invalid assertion - but document it 2601 o dir.c: split Dir_Init into two functions 2602 26032020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 2604 2605 * lst.c: needs inttypes.h on Linux 2606 2607 * VERSION (_MAKE_VERSION): 20200820 2608 Merge with NetBSD make, pick up 2609 o make.1: clarify some passages 2610 o var.c: more cleanup, clarify comments 2611 o make_malloc.c: remove unreachable code 2612 o cond.c: make CondGetString easier to debug 2613 o simplify list usage 2614 o unit-tests: more 2615 26162020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 2617 2618 * VERSION (_MAKE_VERSION): 20200816 2619 Merge with NetBSD make, pick up 2620 o refactor unit-tests to be more fine grained 2621 not all tests moved yet 2622 26232020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 2624 2625 * VERSION (_MAKE_VERSION): 20200814 2626 Merge with NetBSD make, pick up 2627 o more str_concat variants 2628 o more enums for flags 2629 o var.c: cleanup for higher warnings level 2630 26312020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 2632 2633 * VERSION (_MAKE_VERSION): 20200810 2634 Merge with NetBSD make, pick up 2635 o more unit tests 2636 o general comment and style cleanup 2637 26382020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 2639 2640 * VERSION (_MAKE_VERSION): 20200808 2641 Merge with NetBSD make, pick up 2642 o enum.[ch]: streamline, enums for use in flags and debug output 2643 o cond.c: cleanup 2644 o var.c: reduce duplicate code for modifiers 2645 debug logging for Var_Parse 2646 more detailed debug output 2647 o more unit tests 2648 26492020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 2650 2651 * unit-tests/Makefile: -r for recursive and include Makefile.inc 2652 so I can run tests in meta mode 2653 supress extra noise if in meta mode 2654 2655 * VERSION (_MAKE_VERSION): 20200806 2656 Merge with NetBSD make, pick up 2657 o parse.c: remove VARE_WANTRES for LINT 2658 we just want to check parsing (for now). 2659 26602020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 2661 2662 * VERSION (_MAKE_VERSION): 20200805 2663 Merge with NetBSD make, pick up 2664 o make.1: Rework the description of dependence operators 2665 26662020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 2667 2668 * VERSION (_MAKE_VERSION): 20200803 2669 Merge with NetBSD make, pick up 2670 o revert some C99 usage, for max portability 2671 o unit-tests/lint 2672 26732020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 2674 2675 * VERSION (_MAKE_VERSION): 20200802 2676 Merge with NetBSD make, pick up 2677 o more unit tests 2678 26792020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 2680 2681 * Remove NetBSD specific plumbing from unit-tests/Makefile 2682 2683 * VERSION (_MAKE_VERSION): 20200801 2684 Merge with NetBSD make, pick up 2685 o make Var_Value return const 2686 o size_t for buf sizes 2687 o optimize some buffer operations - avoid strlen 2688 26892020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 2690 2691 * VERSION (_MAKE_VERSION): 20200731 2692 Merge with NetBSD make, pick up 2693 o var.c: fix undefinded behavior for incomplete :t modifier 2694 fixes unit-test/moderrs on Ubuntu 2695 o parse.c: When parsing variable assignments other than := 2696 if DEBUG(LINT) test substition of value, so we get a file and 2697 line number in the resulting error. 2698 o dir.c: fix parsing of nested braces in dependency lines 2699 add unit-tests 2700 27012020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 2702 2703 * VERSION (_MAKE_VERSION): 20200730 2704 Merge with NetBSD make, pick up 2705 o var.c: minor cleanup 2706 o unit-tests: more tests to improve code coverage 2707 27082020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 2709 2710 * VERSION (_MAKE_VERSION): 20200728 2711 Merge with NetBSD make, pick up 2712 o var.c: more optimizations 2713 27142020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 2715 2716 * VERSION (_MAKE_VERSION): 20200726 2717 Merge with NetBSD make, pick up 2718 o collapse lsd.lib into lst.c - reduce code size and allow inlining 2719 o lots of function comment updates 2720 o var.c: more optimizations 2721 o make return of Var_Parse const 2722 27232020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2724 2725 * VERSION (_MAKE_VERSION): 20200720 2726 Merge with NetBSD make, pick up 2727 o DEBUG_HASH report stats at end and tone down the noise 2728 o var.c: each flag type gets its own prefix. 2729 move SysV string matching to var.c 2730 make ampersand in ${VAR:from=to&} an ordinary character 2731 cleanup and simplify implementation of modifiers 2732 o make.1: move documentation for assignment modifiers 2733 27342020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2735 2736 * VERSION (_MAKE_VERSION): 20200718 2737 Merge with NetBSD make, pick up 2738 o DEBUG_HASH to see how well the hash tables are working 2739 27402020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2741 2742 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2743 27442020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2745 2746 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2747 2748 * VERSION (_MAKE_VERSION): 20200710 2749 Merge with NetBSD make, pick up 2750 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2751 o meta.c: target flagged .META is out-of-date if meta file missing 2752 27532020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2754 2755 * VERSION (_MAKE_VERSION): 20200709 2756 Merge with NetBSD make, pick up 2757 o cond.c: fix for compare_expression when doEval=0 2758 o unit-tests/Makefile: rework 2759 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2760 27612020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2762 2763 * VERSION (_MAKE_VERSION): 20200704 2764 Merge with NetBSD make, pick up 2765 (most of this by rillig@) 2766 o lots of style and white-space cleanup 2767 o lots more unit tests for variable modifiers 2768 o simplified description of some functions 2769 o str.c: refactor Str_Match 2770 o var.c: debugging output for :@ 2771 constify VarModify parameter 2772 fix :hash modifier on 16-bit platforms 2773 remove unnecessary forward declarations 2774 refactor ApplyModifier_SysV to have less indentation 2775 simplify code for :E and :R 2776 clean up code for :H and :T 2777 refactor ApplyModifiers 2778 2779 * var.c: we need stdint.h on some platforms to get uint32_t 2780 * unit-test/Makefile: we need to supress the specific error 2781 for RE substitution error in modmisc, since it varies accross 2782 different OS. 2783 27842020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2785 2786 * VERSION (_MAKE_VERSION): 20200702 2787 Merge with NetBSD make, pick up 2788 o var.c: more improvements to avoiding unnecessary evaluation 2789 use enums for flags 2790 o remove flags arg to Var_Set which outside of var.c is always 0 2791 27922020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2793 2794 * VERSION (_MAKE_VERSION): 20200701 2795 Merge with NetBSD make, pick up 2796 o var.c: with change to cond.c; ensure that nested variables 2797 within a variable name are expanded. 2798 o unit-tests/varmisc.mk: test for nested varname 2799 28002020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2801 2802 * VERSION (_MAKE_VERSION): 20200629 2803 Merge with NetBSD make, pick up 2804 o cond.c: do not eval unnecessary terms of conditionals. 2805 28062020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2807 2808 * VERSION (_MAKE_VERSION): 20200625 2809 Merge with NetBSD make, pick up 2810 o meta.c: report error if lseek in filemon_read fails 2811 28122020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2813 2814 * VERSION (_MAKE_VERSION): 20200622 2815 Merge with NetBSD make, pick up 2816 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2817 28182020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2819 2820 * VERSION (_MAKE_VERSION): 20200619 2821 Merge with NetBSD make, pick up 2822 o str.c: performance improvement for Str_Match for multiple '*' 2823 o dieQuietly: supress the failure output from make 2824 when failing node is a sub-make or a sibling failed. 2825 This cuts down greatly on unhelpful noise at the end of 2826 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2827 28282020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2829 2830 * FILES: add LICENSE to appease some packagers. 2831 This is an attempt to fairly represent the license on almost 2832 200 files, which are almost all BSD-3-Clause 2833 The few exceptions being more liberal. 2834 2835 * VERSION (_MAKE_VERSION): 20200610 2836 Merge with NetBSD make, pick up 2837 o unit test for :Or 2838 28392020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2840 2841 * VERSION (_MAKE_VERSION): 20200606 2842 Merge with NetBSD make, pick up 2843 o make.1: cleanup 2844 2845 * Makefile: fix depends for main.o which broke MAKE_VERSION 2846 28472020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2848 2849 * VERSION (_MAKE_VERSION): 20200605 2850 Merge with NetBSD make, pick up 2851 o dir.c: cached_stats - don't confuse stat and lstat results. 2852 o var.c: add :Or for reverse sort. 2853 28542020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2855 2856 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2857 also if --with-filemon= specifies path to filemon.h 2858 set use_filemon=dev 2859 * dirname.c: remove include of namespace.h 2860 28612020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2862 2863 * VERSION (_MAKE_VERSION): 20200517 2864 Merge with NetBSD make, pick up 2865 o modified dollar tests to avoid shell dependencies 2866 o new tests for .INCLUDEFROM 2867 28682020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2869 2870 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2871 to not depend so much on shell behavior 2872 28732020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2874 2875 * VERSION (_MAKE_VERSION): 20200510 2876 Merge with NetBSD make, pick up 2877 o unit test for dollar handling 2878 28792020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2880 2881 * VERSION (_MAKE_VERSION): 20200506 2882 Merge with NetBSD make, pick up 2883 o str.c: empty string does not match % pattern 2884 plus unit-test changes 2885 28862020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2887 2888 * VERSION (_MAKE_VERSION): 20200504 2889 May the 4th be with you 2890 Merge with NetBSD make, pick up 2891 o var.c: import handling of old sysV style modifier using '%' 2892 o str.c: refactor brk_string 2893 o unit-tests: add test case for lazy conditions 2894 28952020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2896 2897 * VERSION (_MAKE_VERSION): 20200418 2898 2899 * configure.in: use_makefile=no for Cygwin et al. 2900 case insensitive filesystems just don't work if both 2901 makefile and Makefile exist. 2902 NOTE: bmake does not support Cygwin and likely never will, 2903 but if brave souls want to try it - help them out. 2904 29052020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2906 2907 * VERSION (_MAKE_VERSION): 20200402 2908 Merge with NetBSD make, pick up 2909 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2910 a blank command is perfectly valid. 2911 29122020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2913 2914 * VERSION (_MAKE_VERSION): 20200330 2915 Merge with NetBSD make, pick up 2916 o make.h: extern debug_file 2917 29182020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2919 2920 * VERSION (_MAKE_VERSION): 20200318 2921 Merge with NetBSD make, pick up 2922 o meta.c: meta_oodate, check for corrupted meta file 2923 earlier and more often. 2924 29252020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2926 2927 * VERSION (_MAKE_VERSION): 20200220 2928 29292020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2930 2931 * boot-strap: unset MAKEFLAGS 2932 29332020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2934 2935 * VERSION (_MAKE_VERSION): 20200212 2936 * meta.c: meta_compat_parent check for USE_FILEMON 2937 patch from Soeren Tempel 2938 29392020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2940 2941 * VERSION: 20200205 2942 Merge with NetBSD make, pick up 2943 o meta.c: fix compat mode, need to call meta_job_output() 2944 o job.c: extra fds for meta mode not needed if using filemon_dev 2945 29462020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2947 2948 * VERSION: 20200122 2949 Merge with NetBSD make, pick up 2950 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2951 returns FALSE. 2952 29532020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2954 2955 * VERSION: 20200121 2956 Merge with NetBSD make, pick up 2957 o filemon/filemon_{dev,ktrace}.c: allow selection of 2958 filemon implementation. filemon_dev.c uses the kernel module 2959 while filemon_ktrace.c leverages the fktrace api available in 2960 NetBSD. filemon_ktrace.c can hopefully form the basis for 2961 adding support for other tracing mechanisms such as strace on 2962 Linux. 2963 o meta.c: when target is out-of-date per normal make rules 2964 record value of .OODATE in meta file. 2965 29662019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2967 2968 * VERSION: 20190926 2969 Merge with NetBSD make, pick up 2970 o parse.c: don't pass NULL to realpath(3) 2971 some versions cannot handle it. 2972 29732019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2974 2975 * VERSION: 20190409 2976 Merge with NetBSD make, pick up 2977 o parse.c: ParseDoDependency: free paths rather than assert 2978 29792018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2980 2981 * VERSION: 20181222 2982 2983 * configure.in: add --without-makefile to avoid generating 2984 makefile and make-bootstrap.sh 2985 2986 * include Makefile.inc if it exists 2987 2988 * Use Makefile and Makefile.config.in in unit-tests 2989 so we can use just: make obj && make && make test 2990 when bmake is already available. 2991 We add --without-makefile to CONFIGURE_ARGS in this case. 2992 2993 * tweak bsd.after-import.mk (captures Makefile.config etc 2994 after import to FreeBSD for example) to cope with all the above. 2995 29962018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2997 2998 * VERSION: 20181221 2999 Merge with NetBSD make, pick up 3000 o parse.c: ParseVErrorInternal use .PARSEDIR 3001 and apply if relative, and then use .PARSEFILE 3002 for consistent result. 3003 30042018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 3005 3006 * VERSION: 20181220 3007 Merge with NetBSD make, pick up 3008 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 3009 is relative 3010 o var.c: avoid SEGFAULT in .unexport-env 3011 when MAKELEVEL is not set 3012 30132018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 3014 3015 * VERSION: 20181216 3016 Merge with NetBSD make, pick up 3017 o fix for unit-tests/varquote.mk on Debian 3018 30192018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 3020 3021 * VERSION: 20180919 3022 Merge with NetBSD make, pick up 3023 o var.c: add :q 3024 o dir.c: cleanup caching of stats 3025 30262018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 3027 3028 * Makefile.config.in: use += where it makes sense. 3029 30302018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 3031 3032 * VERSION: 20180512 3033 Merge with NetBSD make, pick up 3034 o job.c: skip polling job token pipe 3035 30362018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3037 3038 * VERSION: 20180405 3039 Merge with NetBSD make, pick up 3040 o parse.c: be more cautious about detecting depenency line 3041 rather than sysV style include. 3042 30432018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 3044 3045 * VERSION: 20180222 3046 Merge with NetBSD make, pick up 3047 o parse.c: avoid calling sysconf for every call to loadfile 3048 30492018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3050 3051 * VERSION: 20180218 3052 Merge with NetBSD make, pick up 3053 o var.c: Var_Set handle NULL value anytime. 3054 30552018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 3056 3057 * VERSION: 20180212 3058 Merge with NetBSD make, pick up 3059 o parse.c: do not treat .info as warning with -W 3060 30612017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 3062 3063 * VERSION: 20171207 3064 Merge with NetBSD make, pick up 3065 o var.c: Var_Append use Var_Set if var not previously set 3066 so that VAR_CMD is handled correctly. 3067 Add a suitable unit-test. 3068 30692017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3070 3071 * VERSION (_MAKE_VERSION): 20171126 3072 3073 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 3074 since AC_TRY_COMPILE puts input inside main() 3075 which upsets modern compilers. 3076 30772017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 3078 3079 * VERSION: 20171118 3080 Merge with NetBSD make, pick up 3081 o var.c: do not append to variable set on command line 3082 add unit-test to catch this. 3083 30842017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 3085 3086 * VERSION: 20171028 3087 Merge with NetBSD make, pick up 3088 o main.c: ignore empty MAKEOBJDIR 3089 3090 * Makefile.config.in: 3091 make @prefix@ @machine*@ and @default_sys_path@ defaults. 3092 30932017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 3094 3095 * VERSION: 20171005 3096 3097 * unit-tests/dotwait.mk: redirect stderr through pipe for more 3098 consistent result on some platforms. 3099 31002017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 3101 3102 * machine.sh: entry for AIX 3103 31042017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 3105 3106 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 3107 to a file that can be included by configure as well as make. 3108 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 3109 31102017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 3111 3112 * Makefile (_MAKE_VERSION): 20170810 3113 Merge with NetBSD make, pick up 3114 o meta.c: if target is in subdir we only need subdir name in 3115 meta_name. 3116 31172017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 3118 3119 * Makefile (_MAKE_VERSION): 20170720 3120 Merge with NetBSD make, pick up 3121 o compat.c: pass SIGINT etc onto child and wait for it to exit 3122 before we self-terminate. 3123 31242017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 3125 3126 * Makefile (_MAKE_VERSION): 20170711 3127 forgot to update after merge on 20170708 ;-) 3128 o main.c: refactor to reduce size of main function. 3129 add -v option to always fully expand values. 3130 o meta.c: ensure command output in meta file has ending newline 3131 even when filemon not being used. 3132 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 3133 pathname via ':L' since any ':' in pathname breaks that. 3134 Instead set a '${.p.}' to pathname in the target context and 3135 use that. 3136 31372017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3138 3139 * Makefile (_MAKE_VERSION): 20170510 3140 Merge with NetBSD make, pick up 3141 o main.c: Main_SetObjdir: ensure buf2 is in scope 3142 31432017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 3144 3145 * Makefile (_MAKE_VERSION): 20170505 3146 see mk/ChangeLog 3147 31482017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3149 3150 * parse.c: not everyone has stdint.h 3151 31522017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 3153 3154 * Makefile (_MAKE_VERSION): 20170501 3155 see mk/ChangeLog 3156 31572017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3158 3159 * Makefile (_MAKE_VERSION): 20170421 3160 Merge with NetBSD make, pick up 3161 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 3162 31632017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3164 3165 * Makefile (_MAKE_VERSION): 20170420 3166 Merge with NetBSD make, pick up 3167 o main.c: only use -C arg "as is" if it contains no 3168 relative component. 3169 31702017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3171 3172 * Makefile (_MAKE_VERSION): 20170418 3173 Merge with NetBSD make, pick up 3174 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 3175 31762017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 3177 3178 * Makefile (_MAKE_VERSION): 20170417 3179 Merge with NetBSD make, pick up 3180 o fixes a number of coverity complaints 3181 - check return value of fseek, fcntl 3182 - plug memory leak in Dir_FindFile, Var_LoopExpand, 3183 JobPrintCommand, ParseTraditionalInclude 3184 - use bmake_malloc() where NULL is not tollerated 3185 - use MAKE_ATTR_UNUSED rather that kludges like 3186 return(unused ? 0 : 0) 3187 - use purge_cached_realpaths() rather than abuse cached_realpath() 3188 31892017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 3190 3191 * Makefile (_MAKE_VERSION): 20170413 3192 Merge with NetBSD make, pick up 3193 o main.c: when setting .OBJDIR ignore '$' in paths. 3194 3195 * job.c: use MALLOC_OPTIONS to set malloc_options. 3196 31972017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3198 3199 * Makefile (_MAKE_VERSION): 20170411 3200 Merge with NetBSD make, pick up 3201 o str.c: Str_Match: allow [^a-z] to behave as expected. 3202 32032017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3204 3205 * Makefile (_MAKE_VERSION): 20170326 3206 Merge with NetBSD make, pick up 3207 o main.c: purge relative paths from realpath cache when .OBJDIR 3208 is changed. 3209 32102017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 3211 3212 * Makefile (_MAKE_VERSION): 20170311 3213 Merge with NetBSD make, pick up 3214 o main.c: only use -C arg "as is" if it starts with '/'. 3215 32162017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 3217 3218 * Makefile (_MAKE_VERSION): 20170301 3219 Merge with NetBSD make, pick up 3220 o main.c: use -C arg "as is" rather than getcwd() 3221 if they identify the same directory. 3222 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 3223 32242017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 3225 3226 * Makefile (_MAKE_VERSION): 20170201 3227 Merge with NetBSD make, pick up 3228 o var.c: allow :_=var and avoid use of special context. 3229 32302017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 3231 3232 * Makefile (_MAKE_VERSION): 20170130 3233 Merge with NetBSD make, pick up 3234 o var.c: add :range and :_ 3235 o main.c: partially initialize Dir_* before MainParseArgs() 3236 can be called. 3237 If -V, skip Main_ExportMAKEFLAGS() 3238 32392017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 3240 3241 * Makefile (_MAKE_VERSION): 20170114 3242 Merge with NetBSD make, pick up 3243 o var.c: allow specifying the utc value used by :{gm,local}time 3244 32452016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3246 3247 * Makefile (_MAKE_VERSION): 20161212 3248 Merge with NetBSD make, pick up 3249 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 3250 32512016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 3252 3253 * Makefile (_MAKE_VERSION): 20161209 3254 Merge with NetBSD make, pick up 3255 o main.c: cleanup setting of .OBJDIR 3256 o parse.c: avoid coredump from (var)=val 3257 32582016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3259 3260 * Makefile (_MAKE_VERSION): 20161126 3261 Merge with NetBSD make, pick up 3262 o make.c: Make_OODate: report src node name if path not set 3263 32642016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3265 3266 * Makefile (_MAKE_VERSION): 20160926 3267 Merge with NetBSD make, pick up 3268 o support for .DELETE_ON_ERROR: (remove targets that fail) 3269 32702016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3271 3272 * Makefile MAN: tweak .Dt to match ${PROG} 3273 32742016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3275 3276 * Makefile (_MAKE_VERSION): 20160818 3277 its a neater number; pick up whitespace fixes to man page. 3278 32792016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 3280 3281 * Makefile (_MAKE_VERSION): 20160817 3282 Merge with NetBSD make, pick up 3283 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 3284 so we can call it before adding entries to missingFiles. 3285 Thus we do not track files we have been told to ignore. 3286 32872016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 3288 3289 * Makefile (_MAKE_VERSION): 20160815 3290 Merge with NetBSD make, pick up 3291 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 3292 pathnames, and skip if the expansion is empty. 3293 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 3294 32952016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 3296 3297 * Makefile (_MAKE_VERSION): 20160812 3298 Merge with NetBSD make, pick up 3299 o meta.c: remove all missingFiles entries that match a deleted 3300 dir. 3301 o main.c: set .ERROR_CMD if possible. 3302 33032016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3304 3305 * Makefile (_MAKE_VERSION): 20160606 3306 Merge with NetBSD make, pick up 3307 o dir.c: extend mtimes cache to others via cached_stat() 3308 33092016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3310 3311 * Makefile (_MAKE_VERSION): 20160604 3312 Merge with NetBSD make, pick up 3313 o meta.c: missing filemon data is only relevant if we read a 3314 meta file. 3315 Also do not return oodate for a missing metafile if gn->path 3316 points to .CURDIR 3317 33182016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3319 3320 * Makefile (_MAKE_VERSION): 20160602 3321 Merge with NetBSD make, pick up 3322 o cached_realpath(): avoid hitting filesystem more than necessary. 3323 o meta.c: refactor need_meta decision, add knobs for 3324 missing meta file and filemon data wrt out-of-datedness. 3325 33262016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3327 3328 * Makefile (_MAKE_VERSION): 20160528 3329 3330 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 3331 33322016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 3333 3334 * Makefile (_MAKE_VERSION): 20160512 3335 Merge with NetBSD make, pick up 3336 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 3337 this is useful for gcov builds. 3338 o propagate errors from filemon(4). 3339 33402016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 3341 3342 * Makefile (_MAKE_VERSION): 20160509 3343 Merge with NetBSD make, pick up 3344 o remove use of non-standard types u_int etc. 3345 o meta.c: apply realpath() before matching against metaIgnorePaths 3346 33472016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 3348 3349 * Makefile (_MAKE_VERSION): 20160404 3350 Merge with NetBSD make, pick up 3351 o allow makefile to set .MAKE.JOBS 3352 3353 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 3354 33552016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 3356 3357 * Makefile (_MAKE_VERSION): 20160315 3358 Merge with NetBSD make, pick up 3359 o fix handling of archive members 3360 33612016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3362 3363 * Makefile (_MAKE_VERSION): rename variable to avoid interference 3364 with checks for ${MAKE_VERSION} 3365 33662016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 3367 3368 * Makefile (MAKE_VERSION): 20160310 3369 Merge with NetBSD make, pick up 3370 o meta.c: treat missing Read file same as Write, incase we Delete it. 3371 33722016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 3373 3374 * Makefile (MAKE_VERSION): 20160307 3375 Merge with NetBSD make, pick up 3376 o var.c: fix :ts\nnn to be octal by default. 3377 o meta.c: meta_finish() to cleanup memory. 3378 33792016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 3380 3381 * Makefile (MAKE_VERSION): 20160226 3382 Merge with NetBSD make, pick up 3383 o meta.c: allow meta file for makeDepend if makefiles want it. 3384 33852016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 3386 3387 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 3388 for backwards compatability. 3389 3390 * Makefile (MAKE_VERSION): 20160220 3391 Merge with NetBSD make, pick up 3392 o var.c: add knob to control handling of '$$' in := 3393 33942016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3395 3396 * Makefile (MAKE_VERSION): 20160218 3397 Merge with NetBSD make, pick up 3398 o var.c: add .export-literal allows us to fix sys.clean-env.mk 3399 post the changes to Var_Subst. 3400 Var_Subst now takes flags, and does not consume '$$' in := 3401 34022016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 3403 3404 * Makefile (MAKE_VERSION): 20160217 3405 Merge with NetBSD make, pick up 3406 o var.c: preserve '$$' in := 3407 o parse.c: add .dinclude for handling included 3408 makefile like .depend 3409 34102015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 3411 3412 * Makefile (MAKE_VERSION): 20151220 3413 Merge with NetBSD make, pick up 3414 o suff.c: re-initialize suffNull when clearing suffixes. 3415 34162015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 3417 3418 * Makefile (MAKE_VERSION): 20151201 3419 Merge with NetBSD make, pick up 3420 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 3421 o meta.c: meta_oodate: use lstat(2) for checking link target 3422 in case it is a symlink. 3423 o var.c: avoid calling brk_string and Var_Export1 with empty 3424 strings. 3425 34262015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3427 3428 * Makefile (MAKE_VERSION): 20151126 3429 Merge with NetBSD make, pick up 3430 o parse.c: ParseTrackInput don't access beyond 3431 end of old value. 3432 34332015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 3434 3435 * Makefile (MAKE_VERSION): 20151022 3436 3437 * Add support for BSD/OS which lacks inttypes.h 3438 and really needs sys/param.h for sys/sysctl.h 3439 also 'type' is not a shell builtin. 3440 3441 * var.c: eliminate uint32_t and need for inttypes.h 3442 3443 * main.c: PrintOnError flush stdout before run .ERROR 3444 3445 * parse.c: cope with _SC_PAGESIZE not being defined. 3446 3447 34482015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 3449 3450 * Makefile (MAKE_VERSION): 20151020 3451 Merge with NetBSD make, pick up 3452 o var.c: fix uninitialized var 3453 34542015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 3455 3456 * var.c: the conditional expressions used with ':?' can be 3457 expensive, if already discarding do not evaluate or expand 3458 anything. 3459 34602015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3461 3462 * Makefile (MAKE_VERSION): 20151010 3463 Merge with NetBSD make, pick up 3464 o Add Boolean wantit flag to Var_Subst and Var_Parse 3465 when FALSE we know we are discarding the result and can 3466 skip operations like Cmd_Exec. 3467 34682015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3469 3470 * Makefile (MAKE_VERSION): 20151009 3471 Merge with NetBSD make, pick up 3472 o var.c: don't check for NULL before free() 3473 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 3474 34752015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3476 3477 * Makefile (MAKE_VERSION): 20150910 3478 Merge with NetBSD make, pick up 3479 o main.c: with -w print Enter/Leaving messages for objdir too 3480 if necessary. 3481 o centralize shell metachar handling 3482 3483 * FILES: add metachar.[ch] 3484 34852015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3486 3487 * Makefile (MAKE_VERSION): 20150606 3488 Merge with NetBSD make, pick up 3489 o make.1: document .OBJDIR target 3490 34912015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3492 3493 * Makefile (MAKE_VERSION): 20150505 3494 Merge with NetBSD make, pick up 3495 o cond.c: be strict about lhs of comparison when evaluating .if 3496 but less so when called from variable expansion. 3497 o unit-tests/cond2.mk: test various error conditions 3498 34992015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 3500 3501 * machine.sh (MACHINE): Add Bitrig 3502 patch from joerg@netbsd.org 3503 35042015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3505 3506 * Makefile (MAKE_VERSION): 20150418 3507 Merge with NetBSD make, pick up 3508 o job.c: use memmove() rather than memcpy() 3509 3510 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 3511 case, so skip it. 3512 35132015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3514 3515 * Makefile (MAKE_VERSION): 20150411 3516 bump version - only mk/ changes. 3517 35182015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3519 3520 * Makefile (MAKE_VERSION): 20150410 3521 Merge with NetBSD make, pick up 3522 o document different handling of '-' in jobs mode vs compat 3523 o fix jobs mode so that '-' only applies to whole job 3524 when shell lacks hasErrCtl 3525 o meta.c: use separate vars to track lcwd and latestdir (read) 3526 per process 3527 35282015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 3529 3530 * Makefile (MAKE_VERSION): 20150401 3531 Merge with NetBSD make, pick up 3532 o meta.c: close meta file in child 3533 3534 * Makefile: use BINDIR.bmake if set. 3535 Same for MANDIR and SHAREDIR 3536 Handy for testing release candidates 3537 in various environments. 3538 35392015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3540 3541 * move initialization of savederr to block where it is used 3542 to avoid spurious warning from gcc5 3543 35442014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3545 3546 * Makefile (MAKE_VERSION): 20141111 3547 just a cooler number 3548 35492014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 3550 3551 * Makefile (MAKE_VERSION): 20141105 3552 Merge with NetBSD make, pick up 3553 o revert major overhaul of suffix handling 3554 and POSIX compliance - too much breakage 3555 and impossible to make backwards compatible. 3556 o we still have the new unit test structure which is ok. 3557 o meta.c ensure "-- filemon" is at start of line. 3558 35592014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 3560 3561 * configure.in: test that result of getconf PATH_MAX is numeric 3562 and discard if not. Apparently needed for Hurd. 3563 35642014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3565 3566 * Makefile (MAKE_VERSION): 20140830 3567 Merge with NetBSD make, pick up 3568 o major overhaul of suffix handling 3569 o improved POSIX compliance 3570 o overhauled unit-tests 3571 35722014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3573 3574 * Makefile (MAKE_VERSION): 20140620 3575 Merge with NetBSD make, pick up 3576 o var.c return varNoError rather than var_Error for ::= modifiers. 3577 35782014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 3579 3580 * Makefile (MAKE_VERSION): 20140522 3581 Merge with NetBSD make, pick up 3582 o var.c detect some parse errors. 3583 35842014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3585 3586 * Fix spelling errors - patch from Pedro Giffuni 3587 35882014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 3589 3590 * Makefile (MAKE_VERSION): 20140214 3591 Merge with NetBSD make, pick up 3592 o .INCLUDEFROM* 3593 o use Var_Value to get MAKEOBJDIR[PREFIX] 3594 o reduced realloc'ign in brk_string. 3595 * configure.in: add a check for compiler supporting __func__ 3596 35972014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3598 3599 * boot-strap: ignore mksrc=none 3600 36012014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 3602 3603 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 3604 36052014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3606 3607 * Makefile (MAKE_VERSION): 20140101 3608 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 3609 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 3610 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 3611 Hurd) 3612 * configure.in: Add AC_PREREQ and check for 3613 sysctl; patch from Andrew Shadura andrewsh at debian.org 3614 36152013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3616 3617 * Makefile (MAKE_VERSION): 20131010 3618 * lose the const from arg to systcl to avoid problems on older BSDs. 3619 36202013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3621 3622 * Makefile (MAKE_VERSION): 20131001 3623 Merge with NetBSD make, pick up 3624 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 3625 hw.machine_arch if necessary. 3626 o meta.c: meta_oodate - need to look at src of Link and target 3627 of Move as well. 3628 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 3629 provide __arraycount() if needed. 3630 36312013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 3632 3633 * Makefile (MAKE_VERSION): 20130904 3634 Merge with NetBSD make, pick up 3635 o Add VAR_INTERNAL context, so that internal setting of 3636 MAKEFILE does not override value set by makefiles. 3637 36382013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 3639 3640 * Makefile (MAKE_VERSION): 20130902 3641 Merge with NetBSD make, pick up 3642 o CompatRunCommand: only apply shellErrFlag when errCheck is true 3643 36442013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3645 3646 * Makefile (MAKE_VERSION): 20130828 3647 Merge with NetBSD make, pick up 3648 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 3649 o Call Job_SetPrefix() from Job_Init() so makefiles have 3650 opportunity to set .MAKE.JOB.PREFIX 3651 36522013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 3653 3654 * Makefile (MAKE_VERSION): 20130730 3655 Merge with NetBSD make, pick up 3656 o Allow suppression of --- job -- tokens by setting 3657 .MAKE.JOB.PREFIX empty. 3658 36592013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 3660 3661 * Makefile (MAKE_VERSION): 20130716 3662 Merge with NetBSD make, pick up 3663 o number of gmake compatibility tweaks 3664 -w for gmake style entering/leaving messages 3665 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 3666 handle MAKEFLAGS containing only letters. 3667 o when overriding a GLOBAL variable on the command line, 3668 delete it from GLOBAL context so -V doesn't show the wrong 3669 value. 3670 36712013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 3672 3673 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 3674 3675 * Makefile (MAKE_VERSION): 20130706 3676 Merge with NetBSD make, pick up 3677 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 3678 true so that CompatRunCommand() can use it, to ensure 3679 consistent behavior with jobs mode. 3680 o use MAKE_LEVEL_ENV to define the variable to propagate 3681 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 3682 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 3683 paths to ignore. 3684 36852013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3686 3687 * Makefile (MAKE_VERSION): 20130604 3688 Merge with NetBSD make, pick up 3689 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 3690 to avoid leaking descriptors. 3691 36922013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3693 3694 * Makefile (MAKE_VERSION): 20130528 3695 Merge with NetBSD make, pick up 3696 o var.c: cleanup some left-overs in VarHash() 3697 36982013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3699 3700 * Makefile (MAKE_VERSION): 20130520 3701 generate manifest from component FILES rather than have to 3702 update FILES when mk/FILES changes. 3703 37042013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3705 3706 * Makefile (MAKE_VERSION): 20130518 3707 Merge with NetBSD make, pick up 3708 o suff.c: don't skip all processsing for .PHONY targets 3709 else wildcard srcs do not get expanded. 3710 o var.c: expand name of variable to delete if necessary. 3711 37122013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3713 3714 * Makefile (MAKE_VERSION): 20130330 3715 Merge with NetBSD make, pick up 3716 o meta.c: refine the handling of .OODATE in commands. 3717 Rather than suppress command comparison for the entire script 3718 as though .NOMETA_CMP had been used, only suppress it for the 3719 one command line. 3720 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3721 suppress comparison of a command without otherwise affecting it. 3722 o make.1: document that 3723 37242013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3725 3726 * Makefile (MAKE_VERSION): 20130321 3727 yes, not quite right but its a cooler number. 3728 Merge with NetBSD make, pick up 3729 o parse.c: fix ParseGmakeExport to be portable 3730 and add a unit-test. 3731 * meta.c: call meta_init() before makefiles are read and if built 3732 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3733 this let's makefiles test for support. 3734 Call meta_mode_init() to process .MAKE.MODE. 3735 37362013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3737 3738 * Makefile (MAKE_VERSION): 20130305 3739 Merge with NetBSD make, pick up 3740 o run .STALE: target when a dependency from .depend is missing. 3741 o job.c: add Job_RunTarget() for the above and .BEGIN 3742 37432013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3744 3745 * Makefile (MAKE_VERSION): 20130303 3746 Merge with NetBSD make, pick up 3747 o main.c: set .MAKE.OS to utsname.sysname 3748 o job.c: more checks for read and poll errors 3749 o var.c: lose VarChangeCase() saves 4% time 3750 37512013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3752 3753 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3754 want to use MAKEOBJDIR 3755 37562013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3757 3758 * Merge with NetBSD make, pick up 3759 o make.1: more info on how shell commands are handled. 3760 o job.c,main.c: detect write errors to job pipes. 3761 37622013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3763 3764 * Makefile (MAKE_VERSION): 20130123 3765 Merge with NetBSD make, pick up 3766 o meta.c: if script uses .OODATE and meta_oodate() decides 3767 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3768 o var.c: in debug output indicate which variabale modifiers 3769 apply to. 3770 o remove Check_Cwd logic the makefiles have been fixed. 3771 37722012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3773 3774 * makefile.in: add a simple makefile for folk who insist on 3775 ./configure; make; make install 3776 it just runs boot-strap 3777 * include mk/* to accommodate the above 3778 * boot-strap: re-work to accommodate the above 3779 mksrc defaults to $Mydir/mk 3780 allow op={configure,build,install,clean,all} 3781 add options to facilitate install 3782 * Makefile.config.in: just the bits set by configure 3783 * Makefile: bump version to 20121212 3784 abandon Makefile.in (NetBSD Makefile) 3785 leverage mk/* instead 3786 * configure.in: ensure srcdir is absolute 3787 37882012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3789 3790 * Makefile.in (MAKE_VERSION): 20121111 3791 fix generation of bmake.cat1 3792 37932012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3794 3795 * Makefile.in (MAKE_VERSION): 20121109 3796 Merge with NetBSD make, pick up 3797 o make.c: MakeBuildChild: return 0 so search continues if a 3798 .ORDER dependency is detected. 3799 o unit-tests/order: test the above 3800 38012012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3802 3803 * Makefile.in (MAKE_VERSION): 20121102 3804 Merge with NetBSD make, pick up 3805 o cond.c: allow cond_state[] to grow. 3806 In meta mode with a very large tree, we can hit the limit 3807 while processing dirdeps. 3808 38092012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3810 3811 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3812 38132012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3814 3815 * Makefile.in (MAKE_VERSION): 20121010 3816 o protect syntax that only bmake parses correctly. 3817 o remove auto setting of FORCE_MACHINE, use configure's 3818 --with-force-machine=whatever if that is desired. 3819 38202012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3821 3822 * Makefile.in: do not lose history from make.1 when generating bmake.1 3823 38242012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3825 3826 * Makefile.in (MAKE_VERSION): 20121007 3827 Merge with NetBSD make, pick up 3828 o compat.c: ignore empty commands - same as jobs mode. 3829 o make.1: document meta chars that cause use of shell 3830 38312012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3832 3833 * Makefile.in (MAKE_VERSION): bump version to 20120911 3834 * bsd.after-import.mk: include Makefile.inc early and allow it to 3835 override PROG 3836 38372012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3838 3839 * Makefile.in (MAKE_VERSION): bump version to 20120831 3840 Merge with NetBSD make, pick up 3841 o cast sizeof() to int for comparison 3842 o minor make.1 tweak 3843 38442012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3845 3846 * Makefile.in (MAKE_VERSION): bump version to 20120830 3847 Merge with NetBSD make, pick up 3848 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3849 o debug flag -dV causes -V to show raw value regardless. 3850 38512012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3852 3853 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3854 gets SRCTOP set. 3855 38562012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3857 3858 * Makefile.in (MAKE_VERSION): bump version to 20120704 3859 Merge with NetBSD make, pick up 3860 o Job_ParseShell should call Shell_Init if it has been 3861 previously called. 3862 * Makefile.in: set USE_META based on configure result. 3863 also .PARSEDIR is safer indicator of bmake. 3864 38652012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3866 3867 * Makefile.in: bump version to 20120626 3868 ensure CPPFLAGS is in CFLAGS 3869 * meta.c: avoid nested externs 3870 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3871 38722012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3873 3874 * Makefile.in (MAKE_VERSION): bump version to 20120620 3875 Merge with NetBSD make, pick up 3876 o make_malloc.c: avoid including make_malloc.h again 3877 3878 * Makefile.in: avoid bmake only syntax or protect with 3879 .if defined(.MAKE.LEVEL) 3880 * bsd.after-import.mk: replace .-include with .sinclude 3881 ensure? SRCTOP gets a value 3882 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3883 38842012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3885 3886 * Makefile.in (MAKE_VERSION): bump version to 20120612 3887 Merge with NetBSD make, pick up 3888 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3889 for greater portability. 3890 o unit-tests/forloop: check that .for works as expected wrt 3891 number of times and with "quoted strings". 3892 38932012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3894 3895 * Makefile.in (MAKE_VERSION): bump version to 20120606 3896 Merge with NetBSD make, pick up 3897 o compat.c: use kill(2) rather than raise(3). 3898 * configure.in: look for sys/dev/filemon 3899 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3900 and pass BOOTSTRAP_XTRAS to boot-strap. 3901 39022012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3903 3904 * Makefile.in (MAKE_VERSION): bump version to 20120604 3905 Merge with NetBSD make, pick up 3906 o util.c and var.c share same var for tracking if environ 3907 has been reallocated. 3908 o util.c provide getenv with setenv. 3909 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3910 when the shell actively strips .MAKE.* from the environment. 3911 We still refer to the variable always as .MAKE.LEVEL 3912 * util.c fix bug in findenv() was finding prefix of name. 3913 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3914 results in more reliable termination of all activity on many 3915 platforms. 3916 39172012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3918 3919 * Makefile.in (MAKE_VERSION): bump version to 20120602 3920 Merge with NetBSD make, pick up 3921 o for.c: handle quoted items in .for list 3922 39232012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3924 3925 * Makefile.in (MAKE_VERSION): bump version to 20120530 3926 Merge with NetBSD make, pick up 3927 o compat.c: ignore empty command. 3928 39292012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3930 3931 * Makefile.in (MAKE_VERSION): bump version to 20120524 3932 * FILES: add bsd.after-import.mk: 3933 A simple means of integrating bmake into a BSD build system. 3934 39352012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3936 3937 * Makefile.in (MAKE_VERSION): bump version to 20120520 3938 Merge with NetBSD make, pick up 3939 o increased limit for nested conditionals. 3940 39412012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3942 3943 * Makefile.in (MAKE_VERSION): bump version to 20120518 3944 Merge with NetBSD make, pick up 3945 o use _exit(2) in signal hanlder 3946 o Don't use the [dir] cache when building nodes that might have 3947 changed since the last exec. 3948 o Avoid nested extern declaration warnings. 3949 39502012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3951 3952 * meta.c (fgetLine): avoid %z - not portable. 3953 * parse.c: Since we moved include of sys/mman.h 3954 and def's of MAP_COPY etc. we got dups from a merge. 3955 39562012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3957 3958 * Makefile.in (MAKE_VERSION): bump version to 20120420 3959 Merge with NetBSD make, pick up 3960 o restore duplicate supression in .MAKE.MAKEFILES 3961 runtime saving can be significant. 3962 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3963 consumption up to 20%. 3964 39652012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3966 3967 * Makefile.in (MAKE_VERSION): bump version to 20120420 3968 Merge with NetBSD make, pick up 3969 o remove duplicate supression in .MAKE.MAKEFILES 3970 o improved dir cache behavior 3971 o gmake'ish export command 3972 39732012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3974 3975 * Makefile.in (MAKE_VERSION): bump version to 20120325 3976 Merge with NetBSD make, pick up 3977 o fix parsing of :[#] in conditionals. 3978 39792012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3980 3981 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3982 since some systems cannot cope with .Nx <version> 3983 39842011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3985 3986 * Makefile.in (MAKE_VERSION): bump version to 20111111 3987 Merge with NetBSD make, pick up 3988 o debug output for .PARSEDIR and .PARSEFILE 3989 39902011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3991 3992 * Makefile.in (MAKE_VERSION): bump version to 20111010 3993 39942011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3995 3996 * boot-strap: check for an expected file in the dirs we look for. 3997 * make-bootstrap.sh: pass on LDSTATIC 3998 39992011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 4000 4001 * Makefile.in (MAKE_VERSION): bump version to 20111001 4002 Merge with NetBSD make, pick up 4003 o ensure .PREFIX is set for .PHONY 4004 and .TARGET set for .PHONY run via .END 4005 o __dead used consistently 4006 40072011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 4008 4009 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 4010 40112011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 4012 4013 * Makefile.in (MAKE_VERSION): bump version to 20110905 4014 Merge with NetBSD make, pick up 4015 o meta_oodate: ignore makeDependfile 4016 40172011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 4018 4019 * Makefile.in (MAKE_VERSION): bump version to 20110828 4020 Merge with NetBSD make, pick up 4021 o silent=yes in .MAKE.MODE causes meta mode to mark targets 4022 as SILENT if a .meta file is created 4023 40242011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 4025 4026 * Makefile.in (MAKE_VERSION): bump version to 20110818 4027 Merge with NetBSD make, pick up 4028 o in meta mode, if target flagged .META a missing .meta file 4029 means target is out-of-date 4030 o fixes for gcc 4.5 warnings 4031 o simplify job printing code 4032 40332011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 4034 4035 * Makefile.in (MAKE_VERSION): bump version to 20110808 4036 Merge with NetBSD make, pick up 4037 o do not touch OP_SPECIAL targets when doing make -t 4038 40392011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 4040 4041 * Makefile.in (MAKE_VERSION): bump version to 20110622 4042 Merge with NetBSD make, pick up 4043 o meta_oodate detect corrupted .meta file and declare oodate. 4044 * configure.in: add check for setsid 4045 40462011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 4047 4048 * Merge with NetBSD make, pick up 4049 o unit-tests/modts now works on MirBSD 4050 40512011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 4052 4053 * Makefile.in (MAKE_VERSION): bump version to 20110606 4054 Merge with NetBSD make, pick up 4055 o ApplyModifiers: when we parse a variable which is not 4056 the entire modifier string, or not followed by ':', do not 4057 consider it as containing modifiers. 4058 o loadfile: ensure newline at end of mapped file. 4059 40602011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 4061 4062 * Makefile.in (MAKE_VERSION): bump version to 20110505 4063 Merge with NetBSD make, pick up 4064 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 4065 of make's control. In meta mode, any generated file within 4066 said bailiwick, which is found to be missing, causes current 4067 target to be out-of-date. 4068 40692011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 4070 4071 * Makefile.in (MAKE_VERSION): bump version to 20110411 4072 Merge with NetBSD make, pick up 4073 o when long modifiers fail to match, check sysV style. 4074 - add a test case 4075 40762011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 4077 4078 * Makefile.in (MAKE_VERSION): bump version to 20110410 4079 Merge with NetBSD make, pick up 4080 o :hash - cheap 32bit hash of value 4081 o :localtime, :gmtime - use value as format string for strftime. 4082 40832011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 4084 4085 * Makefile.in (MAKE_VERSION): bump version to 20110330 4086 mostly because its a cooler version. 4087 Merge with NetBSD make, pick up 4088 o NetBSD tags for meta.[ch] 4089 o job.c call meta_job_finish() after meta_job_error(). 4090 o meta_job_error() should call meta_job_finish() to ensure 4091 .meta file is closed, and safe to copy - if .ERROR target wants. 4092 meta_job_finish() is safe to call repeatedly. 4093 40942011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 4095 4096 * unit-tests/modts: use printf if it is a builtin, 4097 to save us from MirBSD 4098 4099 * Makefile.in (MAKE_VERSION): bump version to 20110329 4100 Merge with NetBSD make, pick up 4101 o fix for use after free() in CondDoExists(). 4102 o meta_oodate() report extra commands and return earlier. 4103 41042011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 4105 4106 * Makefile.in (MAKE_VERSION): bump version to 20110327 4107 Merge with NetBSD make, pick up 4108 o meta.c, if .MAKE.MODE contains curdirOk=yes 4109 allow creating .meta files in .CURDIR 4110 * boot-strap (TOOL_DIFF): aparently at least on linux distro 4111 formats the output of 'type' differently - so eat any "()" 4112 41132011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 4114 4115 * Makefile.in (MAKE_VERSION): bump version to 20110306 4116 Merge with NetBSD make, pick up 4117 o meta.c, only do getcwd() once 4118 41192011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 4120 4121 * Makefile.in (MAKE_VERSION): bump version to 20110305 4122 Merge with NetBSD make, pick up 4123 o correct sysV substitution handling of empty lhs and variable 4124 o correct exists() check for dir with trailing / 4125 o correct handling of modifiers for non-existant variables 4126 during evaluation of conditionals. 4127 o ensure MAP_FILE is defined. 4128 o meta.c use curdir[] now exported by main.c 4129 41302011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 4131 4132 * Makefile.in (MAKE_VERSION): bump version to 20110225 4133 Merge with NetBSD make, pick up 4134 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 4135 makefiles have been read. 4136 o fix example of :? modifier in man page. 4137 41382011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 4139 4140 * Makefile.in (MAKE_VERSION): bump version to 20110214 4141 Merge with NetBSD make, pick up 4142 o meta.c handle realpath() failing when generating meta file 4143 name. 4144 4145 * sigcompat.c: convert to ansi so we can use higher warning levels. 4146 4147 41482011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 4149 4150 * Makefile.in (MAKE_VERSION): bump version to 20110207 4151 Merge with NetBSD make, pick up 4152 o fix for bug in meta mode. 4153 41542011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 4155 4156 * parse.c: SunOS 5.8 at least does not have MAP_FILE 4157 41582011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 4159 4160 * Makefile.in (MAKE_VERSION): bump version to 20110101 4161 Merge with NetBSD make, pick up 4162 o use mmap(2) if available, for reading makefiles 4163 41642010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 4165 4166 * Makefile.in (MAKE_VERSION): bump version to 20101215 4167 Merge with NetBSD make, pick up 4168 o ensure meta_job_error() does not report a previous .meta file 4169 as being culprit. 4170 41712010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 4172 4173 * Makefile.in (MAKE_VERSION): bump version to 20101210 4174 Merge with NetBSD make, pick up 4175 o meta_oodate: track cwd per process, and only consider target 4176 out-of-date if missing file is outside make's CWD. 4177 Ignore files in /tmp/ etc. 4178 o to ensure unit-tests results match, need to control LC_ALL 4179 as well as LANG. 4180 o fix for parsing bug in var.c 4181 41822010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 4183 4184 * Makefile.in (MAKE_VERSION): bump version to 20101126 4185 Merge with NetBSD make, pick up 4186 o if stale dependency is an IMPSRC, search via .PATH 4187 o meta_oodate: if a referenced file is missing, target is 4188 out-of-date. 4189 o meta_oodate: if a target uses .OODATE in its commands, 4190 it (.OODATE) needs to be recomputed. 4191 o keep a pointer to youngest child node, rather than just its 4192 mtime. 4193 41942010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 4195 4196 * Makefile.in (MAKE_VERSION): bump version to 20101101 4197 41982010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 4199 4200 * machine.sh: like os.sh, 4201 allow for uname -p producing useless drivel 4202 42032010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 4204 4205 * boot-strap: document configure knobs for meta and filemon. 4206 4207 * Makefile.in (MAKE_VERSION): bump version to 20100911 4208 Merge with NetBSD make, pick up 4209 o meta.c - meta mode 4210 4211 * make-bootstrap.sh.in: handle meta.c 4212 * configure.in: add knobs for use_meta and filemon_h 4213 also, look for dirname, str[e]sep and strlcpy 4214 * util.c: add simple err[x] and warn[x] 4215 42162010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 4217 4218 * boot-strap (TOOL_DIFF): set this to ensure tests use 4219 the same version of diff that configure tested 4220 4221 * Makefile.in (MAKE_VERSION): bump version to 20100808 4222 Merge with NetBSD make, pick up 4223 o in jobs mode, when we discover we cannot make something, 4224 call PrintOnError before exit. 4225 42262010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 4227 4228 * Makefile.in (MAKE_VERSION): bump version to 20100806 4229 Merge with NetBSD make, pick up 4230 o formatting fixes for ignored errors 4231 o ensure jobs are cleaned up regardless of where wait() was called. 4232 42332010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 4234 4235 * Makefile.in (MAKE_VERSION): bump version to 20100618 4236 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 4237 42382010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 4239 4240 * Makefile.in (MAKE_VERSION): bump version to 20100616 4241 Merge with NetBSD make, pick up 4242 o man page update 4243 o call PrintOnError from JobFinish when we detect an error we 4244 are not ignoring. 4245 42462010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 4247 4248 * Makefile.in (MAKE_VERSION): bump version to 20100606 4249 Merge with NetBSD make, pick up 4250 o man page update 4251 42522010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 4253 4254 * Makefile.in (MAKE_VERSION): bump version to 20100605 4255 Merge with NetBSD make, pick up 4256 o use bmake_signal() which is a wrapper around sigaction() 4257 in place of signal() 4258 o add .export-env to allow exporting variables to environment 4259 without tracking (so no re-export when the internal value is 4260 changed). 4261 42622010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 4263 4264 * Makefile.in (MAKE_VERSION): bump version to 20100524 4265 Merge with NetBSD make, pick up 4266 o fix for .info et al being greedy. 4267 42682010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 4269 4270 * Makefile.in (MAKE_VERSION): bump version to 20100520 4271 Merge with NetBSD make, pick up 4272 o back to using realpath on argv[0] 4273 but only if contains '/' and does not start with '/'. 4274 42752010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 4276 4277 * boot-strap: use absolute path for bmake when running tests. 4278 4279 * Makefile.in (MAKE_VERSION): bump version to 20100510 4280 Merge with NetBSD make, pick up 4281 o revert use of realpath on argv[0] 4282 too many corner cases. 4283 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 4284 42852010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 4286 4287 * Makefile.in (MAKE_VERSION): bump version to 20100505 4288 Merge with NetBSD make, pick up 4289 o fix for missed SIGCHLD when compiled with SunPRO 4290 actually for bmake, defining FORCE_POSIX_SIGNALS would have 4291 done the job. 4292 42932010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 4294 4295 * Makefile.in (MAKE_VERSION): bump version to 20100430 4296 Merge with NetBSD make, pick up 4297 o fflush stdout before writing to stdout 4298 42992010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 4300 4301 * Makefile.in (MAKE_VERSION): bump version to 20100423 4302 Merge with NetBSD make, pick up 4303 o updated unit tests for Haiku (this time for sure). 4304 * boot-strap: based on patch from joerg 4305 honor --with-default-sys-path better. 4306 * boot-strap: remove mention of --with-prefix-sys-path 4307 43082010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 4309 4310 * Makefile.in (MAKE_VERSION): bump version to 20100422 4311 * Merge with NetBSD make, pick up 4312 o fix for vfork() on Darwin. 4313 o fix for bogus $TMPDIR. 4314 o set .MAKE.MODE=compat for -B 4315 o set .MAKE.JOBS=max_jobs for -j max_jobs 4316 o allow unit-tests to run without any *.mk 4317 o unit-tests/modmisc be more conservative in dirs presumed to exist. 4318 * boot-strap: ignore /usr/share/mk except on NetBSD. 4319 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 4320 ensure sort(1) behaves as expected. 4321 43222010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 4323 4324 * boot-strap: add FindHereOrAbove so we can use -m .../mk 4325 43262010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 4327 4328 * Makefile.in (MAKE_VERSION): bump version to 20100420 4329 * Merge with NetBSD make, pick up 4330 o fix for variable realpath() behavior. 4331 we have to stat(2) the result to be sure. 4332 o fix for .export (all) when nested vars use :sh 4333 43342010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 4335 4336 * Makefile.in (MAKE_VERSION): bump version to 20100414 4337 * Merge with NetBSD make, pick up 4338 o use realpath to resolve argv[0] (for .MAKE) if needed. 4339 o add realpath from libc. 4340 o add :tA to resolve variable via realpath(3) if possible. 4341 43422010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 4343 4344 * Makefile.in (MAKE_VERSION): bump version to 20100408 4345 * Merge with NetBSD make, pick up 4346 o unit tests for .ERROR, .error 4347 o fix for .ERROR to ensure it cannot be default target. 4348 43492010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 4350 4351 * Makefile.in (MAKE_VERSION): bump version to 20100406 4352 * Merge with NetBSD make, pick up 4353 o fix for compat mode "Error code" going to debug_file. 4354 o fix for .ALLSRC being populated twice. 4355 o support for .info, .warning and .error directives 4356 o .MAKE.MODE to control make's operational mode 4357 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 4358 name(s). 4359 o .MAKE.DEPENDFILE to control the name of the depend file 4360 o .ERROR target - run on failure. 4361 43622010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 4363 4364 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 4365 4366 * os.sh,arch.c: patch for Haiku from joerg at netbsd 4367 43682010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 4369 4370 * Makefile.in (MAKE_VERSION): bump version to 20100222 4371 * Merge with NetBSD make, pick up 4372 o better error msg for .for with mutiple inter vars 4373 4374 * boot-strap: 4375 o use make-bootstrap.sh from joerg at netbsd 4376 to avoid the need for a native make when bootstrapping. 4377 o add "" everywhere ;-) 4378 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 4379 otherwise the pre-formated version. 4380 43812010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 4382 4383 * Makefile.in (MAKE_VERSION): bump version to 20100102 4384 * Merge with NetBSD make, pick up: 4385 o fix for -m .../ 4386 43872009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 4388 4389 * Makefile.in (MAKE_VERSION): bump version to 20091118 4390 * Merge with NetBSD make, pick up: 4391 o .unexport 4392 o report lines that start with '.' and should have ':' 4393 (catch typo's of .el*if). 4394 43952009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4396 4397 * configure.in: Ensure that srcdir and mksrc are absolute paths. 4398 43992009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4400 4401 * Makefile.in (MAKE_VERSION): fix version to 20091007 4402 44032009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 4404 4405 * Makefile.in (MAKE_VERSION): bump version to 200910007 4406 * Merge with NetBSD make, pick up: 4407 o fix for parsing of :S;...;...; applied to .for loop iterator 4408 appearing in a dependency line. 4409 44102009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4411 4412 * Makefile.in (MAKE_VERSION): bump version to 20090909 4413 * Merge with NetBSD make, pick up: 4414 o fix for -C, .CURDIR and .OBJDIR 4415 * boot-strap: 4416 o allow share_dir to be set independent of prefix. 4417 o select default share_dir better when prefix ends in $HOST_TARGET 4418 o if FORCE_BSD_MK etc were set, include them in the suggested 4419 install-mk command. 4420 44212009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 4422 4423 * Makefile.in (MAKE_VERSION): bump version to 20090908 4424 * Merge with NetBSD make, pick up: 4425 o .MAKE.LEVEL for recursion tracking 4426 o fix for :M scanning \: 4427 44282009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4429 4430 * configure.in: Don't -D__EXTENSIONS__ if 4431 AC_USE_SYSTEM_EXTENSIONS says "no". 4432 44332009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 4434 4435 * Makefile.in (MAKE_VERSION): bump version to 20090826 4436 Simplify MAKE_VERSION to just the bare date. 4437 * Merge with NetBSD make, pick up: 4438 o -C directory support. 4439 o support for SIGINFO 4440 o use $TMPDIR for temp files. 4441 o child of vfork should be careful about modifying parent's state. 4442 4443 44442009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 4445 4446 * Appy some patches for MiNT from David Brownlee 4447 44482009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 4449 4450 * Makefile.in (BMAKE_VERSION): bump version to 20090222 4451 * Merge with NetBSD make, pick up: 4452 o Possible null pointer de-ref in Var_Set. 4453 44542009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 4455 4456 * Makefile.in (BMAKE_VERSION): bump version to 20090204 4457 * Merge with NetBSD make, pick up: 4458 o bmake_malloc et al moved to their own .c 4459 o Count both () and {} when looking for the end of a :M pattern 4460 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 4461 o strlist.c - functions for processing extendable arrays of pointers to strings. 4462 o ClientData replaced with void *, so const void * can be used. 4463 o New debug flag C for DEBUG_CWD 4464 44652008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 4466 4467 * Makefile.in (BMAKE_VERSION): bump version to 20081111 4468 Apply patch from Joerg Sonnenberge to 4469 configure.in: 4470 o remove some redundant checks 4471 o check for emlloc etc only in libutil and require the whole family. 4472 util.c: 4473 o remove [v]asprintf which is no longer used. 4474 44752008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4476 4477 * Makefile.in (BMAKE_VERSION): bump version to 20081101 4478 * Merge with NetBSD make, pick up: 4479 o util.c: avoid use of putenv() - christos 4480 44812008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4482 4483 * Makefile.in (BMAKE_VERSION): bump version to 20081030 4484 pick up man page tweaks. 4485 44862008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 4487 4488 * Makefile.in: move processing of LIBOBJS to after is definition! 4489 thus we'll have getenv.c in SRCS only if needed. 4490 4491 * make.1: add examples of how to use :? 4492 4493 * Makefile.in (BMAKE_VERSION): bump version to 20081029 4494 * Merge with NetBSD make, pick up: 4495 o fix for .END processing with -j 4496 o segfault from Parse_Error when no makefile is open 4497 o handle numeric expressions in any variable expansion 4498 o debug output now defaults to stderr, -dF to change it - apb 4499 o make now uses bmake_malloc etc so that it can build natively 4500 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 4501 45022008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 4503 4504 * Makefile.in (BMAKE_VERSION): bump version to 20080808 4505 * Merge with NetBSD make, pick up: 4506 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 4507 long lines in Makefiles 4508 o optimizations for VarQuote by joerg 4509 o fix for PR/38756: dominik: make dumps core on invalid makefile 4510 45112008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 4512 4513 * Makefile.in (BMAKE_VERSION): bump version to 20080515 4514 * Merge with NetBSD make, pick up: 4515 o fix skip setting vars in VAR_GLOBAL context, to handle 4516 cases where VAR_CMD is used for other than command line vars. 4517 45182008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 4519 4520 * boot-strap (make_version): we may need to look in 4521 $prefix/share/mk for sys.mk 4522 4523 * Makefile.in (BMAKE_VERSION): bump version to 20080514 4524 * Merge with NetBSD make, pick up: 4525 o skip setting vars in VAR_GLOBAL context, when already set in 4526 VAR_CMD which takes precedence. 4527 45282008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 4529 4530 * Makefile.in (BMAKE_VERSION): bump version to 20080330 4531 * Merge with NetBSD make, pick up: 4532 o fix for ?= when LHS contains variable reference. 4533 45342008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4535 4536 * merge some patches from NetBSD pkgsrc. 4537 4538 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 4539 the MAKSYSPATH used during bootstrap. 4540 4541 * Makefile.in (BMAKE_VERSION): bump version to 20080215 4542 * Merge with NetBSD make, pick up: 4543 o warn if non-space chars follow 'empty' in a conditional. 4544 45452008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4546 4547 * Makefile.in (BMAKE_VERSION): bump version to 20080118 4548 * Merge with NetBSD make, pick up: 4549 o consider dependencies read from .depend as optional - dsl 4550 o remember when buffer for reading makefile grows - dsl 4551 o add -dl (aka LOUD) - David O'Brien 4552 45532007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 4554 4555 * Makefile.in (BMAKE_VERSION): bump version to 20071022 4556 * Merge with NetBSD make, pick up: 4557 o Allow .PATH<suffix> to be used for .include "" 4558 4559 * boot-strap: source default settings from .bmake-boot-strap.rc 4560 45612007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 4562 4563 * Makefile.in: fix maninstall on various systems 4564 provided that our man.mk is used. 4565 For non-BSD systems we install the preformatted page 4566 into $MANDIR/cat1 4567 45682007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 4569 4570 * boot-strap: make bmake.1 too, so maninstall works. 4571 45722007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 4573 4574 * Makefile.in (BMAKE_VERSION): bump version to 20071014 4575 * Merge with NetBSD make, pick up: 4576 o revamped handling of defshell - configure no longer needs to 4577 know the content of the shells array - apb 4578 o stop Var_Subst modifying its input - apb 4579 o avoid calling ParseTrackInput too often - dsl 4580 45812007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 4582 4583 * Makefile.in (BMAKE_VERSION): bump version to 20071011 4584 * Merge with NetBSD make, pick up: 4585 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 4586 4587 * sigcompat.c: some tweaks for HP-UX 11.x based on 4588 patch from Tobias Nygren 4589 4590 * configure.in: update handling of --with-defshell to match 4591 new make behavior. --with-defshell=/usr/xpg4/bin/sh 4592 will now do what one might hope - provided the chosen shell 4593 behaves enough like sh. 4594 45952007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 4596 4597 * Makefile.in (BMAKE_VERSION): bump to 20071008 4598 * Merge with NetBSD make, pick up: 4599 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 4600 o .export/.MAKE.EXPORTED - export of variables - sjg 4601 o .MAKE.MAKEFILES - track all makefiles read - sjg 4602 o performance improvements - dsl 4603 o revamp parallel job scheduling - dsl 4604 46052006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4606 4607 * Makefile.in (BMAKE_VERSION): bump to 20060728 4608 * Merge with NetBSD make, pick up: 4609 o extra debug info during variable and cond processing - sjg 4610 o shell definition now covers newline - rillig 4611 o minor mem leak in PrintOnError - sjg 4612 46132006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4614 4615 * Makefile.in (BMAKE_VERSION): bump to 20060511 4616 * Merge with NetBSD make, pick up: 4617 o more memory leaks - coverity 4618 o possible overflow in ArchFindMember - coverity 4619 o extract variable modifier code out of Var_Parse() 4620 so it can be called recursively - sjg 4621 o unit-tests/moderrs - sjg 4622 46232006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 4624 4625 * Makefile.in (BMAKE_VERSION): bump to 20060412 4626 * Merge with NetBSD make, pick up: 4627 o fixes for some memory leaks - coverity 4628 o only read first sys.mk etc when searching sysIncPath - sjg 4629 4630 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 4631 setting ${MAKEFILE} - OBATA Akio 4632 46332006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 4634 4635 * Makefile.in (BMAKE_VERSION): bump to 20060318 4636 * Merge with NetBSD make, pick up: 4637 o cleanup of job.c to remove remote handling, distcc is more 4638 useful and this code was likely bit-rotting - dsl 4639 o fix for :P modifier - sjg 4640 * boot-strap: set default prefix to something reasonable 4641 (for me anyway). 4642 46432006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 4644 4645 * Makefile.in (BMAKE_VERSION): bump to 20060301 4646 * Merge with NetBSD make, pick up: 4647 o make .WAIT apply recursively, document and test case - apb 4648 o allow variable modifiers in a variable appear anywhere in 4649 modifier list, document and test case - sjg 4650 46512006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 4652 4653 * Makefile.in (BMAKE_VERSION): bump to 20060222 4654 * Merge with NetBSD make, pick up: 4655 o improved job token handling - dsl 4656 o SIG_DFL the correct signal before exec - dsl 4657 o more debug info during parsing - dsl 4658 o allow variable modifiers to be specified via variable - sjg 4659 * boot-strap: explain why we died if no mksrc 4660 46612005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 4662 4663 * Makefile.in (BMAKE_VERSION): bump to 20051105 4664 * configure.in: always set default_sys_path 4665 default is ${prefix}/share/mk 4666 - remove prefix_sys_path, anyone wanting more than above 4667 needs to set it manually. 4668 46692005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4670 4671 * boot-strap: make this a bit easier for pkgsrc folk. 4672 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 4673 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 4674 46752005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 4676 4677 * Makefile.in (BMAKE_VERSION): bump to 20051102 4678 * job.c (JobFinish): fix likely ancient merge lossage 4679 fix from Todd Vierling. 4680 * boot-strap (srcdir): allow setting mksrc=none 4681 46822005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 4683 4684 * Makefile.in (BMAKE_VERSION): bump to 20051031 4685 * ranlib.h: skip on OSF too. 4686 (NetBSD PR 31864) 4687 46882005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 4689 4690 * Makefile.in (BMAKE_VERSION): bump to 20051002 4691 fix a silly typo 4692 46932005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4694 4695 * Makefile.in (BMAKE_VERSION): bump to 20051001 4696 support for UnixWare and some other systems, 4697 based on patches from pkgsrc/bootstrap 4698 46992005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4700 4701 * Makefile.in (BMAKE_VERSION): bump to 20050901 4702 * Merge with NetBSD make, pick up: 4703 o possible parse error causing us to wander off. 4704 47052005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 4706 4707 * Makefile.in (BMAKE_VERSION): bump to 20050606 4708 * Merge with NetBSD make, pick up: 4709 o :0x modifier for randomizing a list 4710 o fixes for a number of -Wuninitialized issues. 4711 47122005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 4713 4714 * Makefile.in (BMAKE_VERSION): bump to 20050530 4715 * Merge with NetBSD make, pick up: 4716 o Handle dependencies for .BEGIN, .END and .INTERRUPT 4717 4718 * README: was seriously out of date. 4719 47202005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4721 4722 * Important to use .MAKE rather than MAKE. 4723 47242005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4725 4726 * Makefile.in (BMAKE_VERSION): bump to 20050315 4727 * Merge with NetBSD make, pick up: 4728 o don't mistake .elsefoo for .else 4729 o use suffix-specific search path correctly 4730 o bunch of style nits 4731 47322004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4733 4734 * boot-strap: 4735 o ensure that args to --src and --with-mksrc 4736 are resolved before giving them to configure. 4737 o add -o "objdir" so that builder can control it, 4738 default is $OS as determined by os.sh 4739 o add -q to suppress all the install instructions. 4740 47412004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4742 4743 * Remove __IDSTRING() 4744 4745 * Makefile.in (BMAKE_VERSION): bump to 20040508 4746 * Merge with NetBSD make, pick up: 4747 o posix fixes 4748 - remove '-e' from compat mode 4749 - add support for '+' command-line prefix. 4750 o fix for handling '--' on command-line. 4751 o fix include in lst.lib/lstInt.h to simplify '-I's 4752 o we also picked up replacement of MAKE_BOOTSTRAP 4753 with !MAKE_NATIVE which is a noop, but possibly confusing. 4754 47552004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4756 4757 * Makefile.in (BMAKE_VERSION): bump to 20040414 4758 * Merge with NetBSD make, pick up: 4759 o allow quoted strings on lhs of conditionals 4760 o issue warning when extra .else is seen 4761 o print line numer when errors encountered during parsing from 4762 string. 4763 47642004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4765 4766 * Makefile.in (BMAKE_VERSION): bump to 20040220 4767 * Merge with NetBSD make, pick up: 4768 o fix for old :M parsing bug. 4769 o re-jigged unit-tests 4770 47712004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4772 4773 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4774 so that './bmake -f Makefile test' works. 4775 47762004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4777 4778 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4779 * Merge with NetBSD make, pick up: 4780 o search upwards for *.mk 4781 o fix for double free of var substitution buffers 4782 o use of getopt replaced with custom code, since the usage 4783 (re-scanning) isn't posix compatible. 4784 47852004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4786 4787 * arch.c: don't include ranlib.h on ELF systems 4788 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4789 47902004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4791 4792 * Makefile.in (BMAKE_VERSION): bump to 20040118 4793 4794 * boot-strap (while): export vars we assign to on cmdline 4795 * unit-test/Makefile.in: ternary is .PHONY 4796 47972004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4798 4799 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4800 * Merge with NetBSD make, pick up: 4801 o fix for ternary modifier 4802 48032004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4804 4805 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4806 * Merge with NetBSD make, pick up: 4807 o fix for cond.c to handle compound expressions better 4808 o variable expansion within sysV style replacements 4809 48102003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4811 4812 * Make portable snprintf safer - output to /dev/null first to 4813 check space needed. 4814 4815 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4816 * Merge with NetBSD make, pick up: 4817 o -dg3 to show input graph when things go wrong. 4818 o explicitly look for makefiles in objdir if not found in curdir so 4819 that errors in .depend etc will be reported accurarely. 4820 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4821 instead as it more accurately reflects the expected behavior and 4822 is more consistently implemented. 4823 o avoid use of asprintf. 4824 48252003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4826 4827 * util.c: Add asprintf and vasprintf. 4828 4829 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4830 * Merge with NetBSD make, pick up: 4831 :[] modifier - allows picking words from a variable. 4832 :tW modifier - allows treating value as one big word. 4833 W flag for :C and :S - allows treating value as one big word. 4834 48352003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4836 4837 * Merge with NetBSD make 4838 pick up -de flag to enable printing failed command. 4839 don't skip 1st two dir entries (normally . and ..) since 4840 coda does not have them. 4841 48422003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4843 4844 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4845 * Merge with NetBSD make, pick up: 4846 - changes for -V '${VAR}' to print fully expanded value 4847 cf. -V VAR 4848 - CompatRunCommand now prints the command that failed. 4849 - several files got updated 3 clause Berkeley license. 4850 48512003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4852 4853 * boot-strap: Allow setting configure args on command line. 4854 48552003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4856 4857 * configure.in: add --with-defshell to allow sh or ksh 4858 to be selected as default shell. 4859 4860 * Makefile.in: bump version to 20030731 4861 4862 * Merge with NetBSD make 4863 Pick up .SHELL spec for ksh and associate man page changes. 4864 Also compat mode now uses the same shell specs. 4865 48662003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4867 4868 * var.c (Var_Parse): ensure delim is initialized. 4869 4870 * unit-tests/Makefile.in: use single quotes to avoid problems from 4871 some shells. 4872 4873 * makefile.boot.in: 4874 Run the unit-tests as part of the bootstrap procedure. 4875 48762003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4877 4878 * unit-tests/Makefile.in: always force complaints from 4879 ${TEST_MAKE} to be from 'make'. 4880 4881 * configure.in: add check for 'diff -u' 4882 also fix some old autoconf'isms 4883 4884 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4885 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4886 4887 * Merge with NetBSD make 4888 Pick up fix for :ts parsing error in some cases. 4889 Pick unit-tests. 4890 48912003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4892 4893 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4894 4895 * var.c (Var_Parse): fix bug in :ts modifier, after const 4896 correctness fixes, must pass nstr to VarModify. 4897 48982003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4899 4900 * Makefile.in: BMAKE_VERSION switch to a date based version. 4901 We'll generally use the date of last import from NetBSD. 4902 4903 * Merge with NetBSD make 4904 Pick up fixes for const-correctness, now passes WARNS=3 on 4905 NetBSD. 4906 Pick up :ts modifier, allows controlling the separator used 4907 between words in variable expansion. 4908 49092003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4910 4911 * FILES: include boot-strap and os.sh 4912 4913 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4914 FreeBSD is known to be bad. 4915 4916 * makefile.boot.in (bootstrap): make this the default target. 4917 4918 * Makefile.in: bump version to 3.1.19 4919 4920 * machine.sh: avoid A-Z with tr as it is bound to lose. 4921 49222003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4923 4924 * Merge with NetBSD make 4925 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4926 Plus some doc fixes. 4927 49282003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4929 4930 * Merge with NetBSD make 4931 Pick up fix for PR/1523 - don't count a library as built, if there 4932 is no way to build it 4933 4934 * Bump version to 3.1.18 4935 49362003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4937 4938 * Merge with NetBSD make 4939 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4940 appears in src list. 4941 49422003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4943 4944 * Merge with NetBSD make (mmm 10th anniversary!) 4945 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4946 pick up -X which tells us to not export VAR=val via setenv if 4947 we are already doing so via MAKEFLAGS. This saves valuable env 4948 space on systems like Darwin. 4949 set MAKE_VERSION to 3.1.17 4950 4951 * parse.c: pix up fix for suffix rules 4952 49532003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4954 4955 * Merge with NetBSD make. 4956 pick up fix for propagating -B via MAKEFLAGS. 4957 set MAKE_VERSION to 3.1.16 4958 4959 * Apply some patches from pkgsrc-bootstrap/bmake 4960 Originally by Grant Beattie <grant@netbsd.org> 4961 I may have missed some - since they are based on bmake-3.1.12 4962 49632002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4964 4965 * makefile.boot.in (bmake): update install targets for those that 4966 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4967 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4968 4969 * bmake.cat1: update the pre-formatted man page! 4970 49712002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4972 4973 * Merge with NetBSD make. 4974 pick up fix for premature free of pointer used in call 4975 to Dir_InitCur(). 4976 set MAKE_VERSION to 3.1.15 4977 49782002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4979 4980 * configure.in: determine suitable value for MKSRC. 4981 override using --with-mksrc=PATH. 4982 4983 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4984 configs(8) will use 'sun4' as an alias for 'sparc'. 4985 49862002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4987 4988 * Merge with NetBSD make. 4989 pick up ${.PATH} 4990 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4991 set MAKE_VERSION to 3.1.14 4992 add configure checks for killpg and sys/socket.h 4993 49942002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4995 4996 * tag bmake-3-1-13 4997 4998 * makefile.boot.in (bmake): use install-mk 4999 Also setup ./mk before trying to invoke bmake.boot incase we 5000 needed install-mk to create a sys.mk for us. 5001 5002 * configure.in: If we need to add -I${srcdir}/missing, make it an 5003 absolute path so that it works for lst.lib too. 5004 5005 * make.h: always include sys/cdefs.h since we provide one if the 5006 host does not. 5007 5008 * Makefile.in (install-mk): 5009 use MKSRC/install-mk which will do the right thing. 5010 use uname -p for ARCH if possible. 5011 since install-mk will setup links bsd.prog.mk -> prog.mk if 5012 needed, just .include bsd.prog.mk 5013 5014 * Merge with NetBSD make (NetBSD-1.6) 5015 Code is ansi-C only now. 5016 Bug in handling of dotLast is fixed. 5017 Can now assign .OBJDIR and make will reset its notions of life. 5018 New modifiers :tu :tl for toUpper and toLower. 5019 5020Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 5021 5022 * Merge with NetBSD make 5023 pick up fix for .END failure in compat mode. 5024 pick up fix for extra va_end() in ParseVErrorInternal. 5025 5026Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 5027 5028 * configure.in: for systems that have sys/cdefs.h check if it is 5029 compatible. If not, include the one under missing, but tell it to 5030 include the native one too - necessary on Linux. 5031 5032 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 5033 include_next (for gcc) to get the native sys/cdefs.h 5034 5035Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5036 5037 * job.c (JobFinish): Fix an earlier merge bug that resulted in 5038 leaking descriptors when using -jN. 5039 5040 * job.c (JobPrintCommand): See if "curdir" exists before 5041 attempting to chdir(). Doing the chdir directly in make (when in 5042 compat mode) fails silently, so let the -jN version do the same. 5043 This can happen when building kernels in an object tree and 5044 playing clever games to reset .CURDIR. 5045 5046 * Merged with NetBSD make 5047 pick up .USEBEFORE 5048 5049Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5050 5051 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 5052 5053Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5054 5055 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 5056 us not to export the iterator variable when using VAR_CMD context. 5057 5058Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5059 5060 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 5061 its the wrong "fix". 5062 5063Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5064 5065 * Redesigned export of VAR_CMD's via MAKEFLAGS. 5066 We now simply append the variable names to .MAKEOVERRIDES, and 5067 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 5068 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 5069 Apart from fixing quoting bugs in previous version, this allows us 5070 to export vars to the environment by simply doing: 5071 .MAKEOVERRIDES+= PATH 5072 Merged again with NetBSD make, but the above is the only change. 5073 5074 * configure.in: added 5075 --disable-pwd-override disable $PWD overriding getcwd() 5076 --disable-check-make-chdir disable make trying to guess 5077 when it should automatically cd ${.CURDIR} 5078 5079 * Merge with NetBSD make, changes include: 5080 parse.c (ParseDoDependency): Spot that the syntax error is 5081 caused by an unresolved cvs/rcs conflict and say so. 5082 var.c: most of Var* functions now take a ctxt as 1st arg. 5083 now does variable substituion on rhs of sysv style modifiers. 5084 5085 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 5086 is now done here. We append the name='value' to .MAKEOVERRIDES 5087 rather than directly into MAKEFLAGS as this allows a Makefile to 5088 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 5089 very similar mechanism. Note that in adding name='value' to 5090 .MAKEOVERRIDES we do the moral equivalent of: 5091 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 5092 5093Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5094 5095 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 5096 5097 * Merged with NetBSD make 5098 make -dx can now be used to run commands via sh -x 5099 better error messages on exec failures. 5100 5101Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5102 5103 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 5104 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 5105 MACHINE etc otherwise they propagate from the previous bmake. 5106 5107 * configure.in (machine): allow --with-machine=generic to make 5108 configure use machine.sh to set MACHINE. 5109 5110 * job.c (JobInterrupt): convert to using WAIT_T and friends. 5111 5112 * Makefile.in: mention in bmake.1 that we use autoconf. 5113 5114 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 5115 5116Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5117 5118 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 5119 as that rather defeats the usefulness of ${MAKEFILE}. 5120 5121 * main.c (MainParseArgs): append command line variable assignments 5122 to MAKEFLAGS so that they get propagated to child make's. 5123 Apparently this is required POSIX behaviour? Its useful anyway. 5124 5125Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5126 5127 * compat.c (CompatRunCommand): don't use perror() since stdio may 5128 cause problems in child of vfork(). 5129 5130 * compat.c, main.c: Call PrintOnError() when we are going to bail. 5131 This routine prints out the .curdir where we stopped and will also 5132 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 5133 5134 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 5135 :@ expansion. 5136 5137 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 5138 5139 * Added RCSid's for the files we've touched. 5140 5141Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5142 5143 * configure.in: Thanks to some clues from mdb@juniper.net, 5144 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 5145 as well as what ends up in _PATH_DEFSYSPATH. We now have: 5146 5147 --with-machine=MACHINE explicitly set MACHINE 5148 --with-force-machine=MACHINE set FORCE_MACHINE 5149 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 5150 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 5151 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 5152 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 5153 5154 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 5155 5156 * makefile: added a pathetically simple makefile to drive 5157 bootstrapping. Running configure by hand is more useful. 5158 5159 * Makefile.in: added MAKE_VERSION, and reworked things to be less 5160 dependent on NetBSD bsd.*.mk 5161 5162 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 5163 _PATH_OBJDIRPREFIX for those that don't want a default. 5164 construct _PATH_DEFSYSPATH from the info we get from configure. 5165 5166 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 5167 if MAKE_VERSION is defined. 5168 5169 * compat.c: when we bail, print out the .CURDIR we were in. 5170 5171Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5172 5173 * Merged with NetBSD make 5174 5175 * var.c: fixed a bug in the handling of the modifier :P 5176 if the node as found but the path was null, we segfault trying to 5177 duplicate it. 5178 5179Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5180 5181 * Merged with NetBSD make 5182 5183 * make.c: Make_OODate's test for a library out of date was using 5184 cmtime where it should have used mtime (my bug). 5185 5186 * compat.c: Use perror() to tell us what really went wrong when we 5187 cannot exec a command. 5188 5189Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5190 5191 * Merged with NetBSD make 5192 5193Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5194 5195 * Merged with NetBSD make 5196 5197Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5198 5199 * Merged with NetBSD make 5200 5201Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5202 5203 * Merged with NetBSD make 5204 5205Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5206 5207 * util.c: don't provide signal() since we use sigcompat.c 5208 5209 * Makefile.in: added a build target. 5210 5211 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 5212 These allow some quite clever magic. 5213 5214 * main.c (main): added support for getenv(MAKESYSPATH). 5215 5216Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5217 5218 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 5219 This avoids objdir having a different value depending on how a 5220 directory was reached (via command line, or subdir.mk). 5221 5222 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 5223 5224Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5225 5226 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 5227 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 5228 I've been testing this in NetBSD's make for some weeks. 5229 5230 * Turn Makefile into Makefile.in and make it useful. 5231 5232Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5233 5234 * Imported NetBSD's -current make(1) and resolve conflicts. 5235 5236 * Applied autoconf patches from bmake v2 5237 5238 * Imported clean code base from NetBSD-1.0 5239