12025-08-04 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * VERSION (_MAKE_VERSION): 20250804 4 Merge with NetBSD make, pick up 5 o meta.c: allow printing only partial string to meta file 6 in jobs mode, otherwise we end up with duplicated output when 7 buffer does not end in newline. 8 Add a suitable unit test. 9 102025-07-07 Simon J Gerraty <sjg@beast.crufty.net> 11 12 * VERSION (_MAKE_VERSION): 20250707 13 Merge with NetBSD make, pick up 14 o cond.c: improve debug log message for 'exists' function. 15 complain about unfinished escape sequences or string literals. 16 172025-07-04 Simon J Gerraty <sjg@beast.crufty.net> 18 19 * VERSION (_MAKE_VERSION): 20250704 20 Merge with NetBSD make, pick up 21 o make.1: add a DIAGNOSTICS section for make to reference. 22 o main.c: simplify the warning for invalid -J by refering to 23 manual page. 24 252025-06-30 Simon J Gerraty <sjg@beast.crufty.net> 26 27 * VERSION (_MAKE_VERSION): 20250630 28 Merge with NetBSD make, pick up 29 o consistently use double quotes in error messages 30 o cond.c: if a condition is erroneous, skip the whole .if/.endif 31 o make_malloc.c: in cleanup mode, initialize freshly allocated memory 32 o str.c: error out on an ":M" modifier whose pattern ends with 33 backslash 34 o var.c: fix parsing of modifier parts for :gmtime and :localtime 35 add POSIX $^ support 36 372025-06-18 Simon J Gerraty <sjg@beast.crufty.net> 38 39 * VERSION (_MAKE_VERSION): 20250618 40 Merge with NetBSD make, pick up 41 o parse.c: in a warning without location information, 42 print the stack trace 43 442025-06-15 Simon J Gerraty <sjg@beast.crufty.net> 45 46 * VERSION (_MAKE_VERSION): 20250615 47 Merge with NetBSD make, pick up 48 o add on-demand inter-process stack traces 49 o job.c,meta.c: do not discard empty lines in the output of a command 50 o job.c: add job prefix if necessary in non-default filtered mode 51 o parse.c,var.c: skip inter-process stack trace when 52 MAKE_STACK_TRACE=no 53 542025-06-12 Simon J Gerraty <sjg@beast.crufty.net> 55 56 * VERSION (_MAKE_VERSION): 20250612 57 Merge with NetBSD make, pick up 58 o use a common style for unexpected error messages 59 o parse.c: add program name to stack traces from sub-makes 60 add quotes to "in directory" line in stack traces 61 o var.c: check variable names for invalid characters when there 62 are no modifiers to apply. This detects and warns about gmake 63 syntax like: $(addprefix -I, $(LIST)) 64 652025-06-09 Simon J Gerraty <sjg@beast.crufty.net> 66 67 * VERSION (_MAKE_VERSION): 20250606 68 Merge with NetBSD make, pick up 69 o main.c: fix bug in handling of output of children in jobs mode 70 712025-05-28 Simon J Gerraty <sjg@beast.crufty.net> 72 73 * VERSION (_MAKE_VERSION): 20250528 74 Merge with NetBSD make, pick up 75 o show contents of MAKEFLAGS in the stack trace. 76 o main.c: delay warning about bogus -J flag, if we end up in 77 compat mode before the call to InitMaxJobs, the warning isn't 78 necessary. 79 802025-05-25 Simon J Gerraty <sjg@beast.crufty.net> 81 82 * VERSION (_MAKE_VERSION): 20250525 83 Merge with NetBSD make, pick up 84 o main.c: set .CURDIR earlier so it can be reported in some errors. 85 862025-05-20 Simon J Gerraty <sjg@beast.crufty.net> 87 88 * VERSION (_MAKE_VERSION): 20250520 89 Merge with NetBSD make, pick up 90 o rename variables, remove now-redundant comments 91 o job.c: clean up building the shell commands in parallel mode 92 remove timeout for polling in parallel mode 93 o main.c: clean up error message for malformed internal -J option 94 952025-05-11 Simon J Gerraty <sjg@beast.crufty.net> 96 97 * VERSION (_MAKE_VERSION): 20250511 98 Merge with NetBSD make, pick up 99 o job.c: rename token pool variables to be more descriptive 100 move ContinueJobs further up, to eliminate a forward declaration 101 error out if writing to an internal pipe fails 102 clean up constant names and function names 103 use uniform debug log messages for the token pool 104 in the debug log, replace magic numbers with identifiers 105 o main.c: clean up error message for malformed internal -J option 106 o make.c: replace bitset in trace output with descriptive node 107 attributes 108 o targ.c: add end marker for -dg1, -dg2 and -dg3 debug log 109 o var.c: fix order of error messages in the ":?" modifier 110 1112025-04-25 Simon J Gerraty <sjg@beast.crufty.net> 112 113 * VERSION (_MAKE_VERSION): 20250424 114 Merge with NetBSD make, pick up 115 o cleanup; replace unsigned int with just unsigned 116 Inline the TMPPAT macro, as it is only needed in a single place 117 o move struct Job from job.h to job.c 118 o job.c: group the code for handling the job token pool 119 avoid excessive values of -j 120 o make.c: fix grammar in debug log message 121 1222025-04-14 Simon J Gerraty <sjg@beast.crufty.net> 123 124 * VERSION (_MAKE_VERSION): 20250414 125 Merge with NetBSD make, pick up 126 o job.c: clean up job and output handling 127 o parse.c: after entering POSIX mode, don't leave it again 128 1292025-04-11 Simon J Gerraty <sjg@beast.crufty.net> 130 131 * VERSION (_MAKE_VERSION): 20250411 132 Merge with NetBSD make, pick up 133 o convert more messages to file:line: format 134 o for.c: condense code for parsing variable names in .for loops 135 1362025-04-10 Simon J Gerraty <sjg@beast.crufty.net> 137 138 * VERSION (_MAKE_VERSION): 20250410 139 Merge with NetBSD make, pick up 140 o cond.c: remove redundant error counter when parsing a condition 141 1422025-04-04 Simon J Gerraty <sjg@beast.crufty.net> 143 144 * VERSION (_MAKE_VERSION): 20250404 145 Merge with NetBSD make, pick up 146 o make.1: better document meta mode. 147 o var.c: fix error message for undefined variable in conditional. 148 1492025-03-30 Simon J Gerraty <sjg@beast.crufty.net> 150 151 * VERSION (_MAKE_VERSION): 20250330 152 Merge with NetBSD make, pick up 153 o in POSIX compatability mode, give preference to sysV style modifiers. 154 o in stack trace with details and includes, list the current file 155 o parse.c: report file location in more common file:line: format. 156 o var.c: simplify error handling for unknown modifiers 157 let the ":O" and ":t" modifiers fall back to the ":from=to" modifier 158 stop parsing after seeing an unknown modifier in an expression 159 fix error message for unclosed expression and invalid :[...] 160 add details to errors about ::= modifier 161 add details about indirect modifiers to the stack traces 162 in stack traces from target commands, add the command level 163 1642025-03-23 Simon J Gerraty <sjg@beast.crufty.net> 165 166 * VERSION (_MAKE_VERSION): 20250323 167 Merge with NetBSD make, pick up 168 o var.c: just ignore attempts to override a read-only global with 169 the same value. 170 1712025-03-08 Simon J Gerraty <sjg@beast.crufty.net> 172 173 * bsd.after-import.mk: by default generate makefiles 174 closer to BSD style. 175 176 * VERSION (_MAKE_VERSION): 20250308 177 Merge with NetBSD make, pick up 178 o clean up comments and code for parallel mode 179 o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. 180 1812025-02-27 Simon J Gerraty <sjg@beast.crufty.net> 182 183 * VERSION (_MAKE_VERSION): 20250225 184 Merge with NetBSD make, pick up 185 o job.c: reliably remove targets on interrupt, 186 by passing signal to children first. 187 1882025-01-25 Simon J Gerraty <sjg@beast.crufty.net> 189 190 * VERSION (_MAKE_VERSION): 20250125 191 Merge with NetBSD make, sync up below change. 192 193 * unit-tests/Makefile: remove $TMPDIR via .END 194 to avoid failure in test on NFS - since the temp file for the 195 target script is open and thus gets renamed by the server rather 196 than removed. 197 1982025-01-20 Simon J Gerraty <sjg@beast.crufty.net> 199 200 * VERSION (_MAKE_VERSION): 20250120 201 Merge with NetBSD make, pick up 202 o use FORK_FUNCTION so it can be forced to fork when doing coverage. 203 o main.c: avoid memory allocation in error path after exec failure. 204 2052025-01-16 Simon J Gerraty <sjg@beast.crufty.net> 206 207 * VERSION (_MAKE_VERSION): 20250116 208 Merge with NetBSD make, pick up 209 o clarify that undefined expressions are allowed in dependencies 210 o simplify code for evaluating the '!=' variable assignment 211 2122025-01-11 Simon J Gerraty <sjg@beast.crufty.net> 213 214 * VERSION (_MAKE_VERSION): 20250111 215 Merge with NetBSD make, pick up 216 o replace "Malformed conditional" with "Variable is undefined" 217 when appropriate 218 2192025-01-10 Simon J Gerraty <sjg@beast.crufty.net> 220 221 * VERSION (_MAKE_VERSION): 20250110 222 Merge with NetBSD make, pick up 223 o job.c: remove some unnecessary layers in job handling 224 o unit-tests: test expressions based on undefined variables 225 2262025-01-01 Simon J Gerraty <sjg@beast.crufty.net> 227 228 * VERSION (_MAKE_VERSION): 20250101 229 Merge with NetBSD make, pick up 230 o var.c: reduce pointer indirections when unexporting a variable 231 2322024-12-12 Simon J Gerraty <sjg@beast.crufty.net> 233 234 * VERSION (_MAKE_VERSION): 20241212 235 * mk/ updates 236 2372024-11-24 Simon J Gerraty <sjg@beast.crufty.net> 238 239 * VERSION (_MAKE_VERSION): 20241124 240 Merge with NetBSD make, pick up 241 o var.c: fix confusing error message when overriding a read-only 242 variable 243 2442024-11-22 Simon J Gerraty <sjg@beast.crufty.net> 245 246 * VERSION (_MAKE_VERSION): 20241122 247 Merge with NetBSD make, pick up 248 o unit-tests/Makefile: optimize running of tests skip extra cat 249 in 99% of cases. 250 2512024-11-15 Simon J Gerraty <sjg@beast.crufty.net> 252 253 * VERSION (_MAKE_VERSION): 20241114 254 Merge with NetBSD make, pick up 255 o make.1: note that MAKEOBJPREFIX should be absolute path 256 also that it can be set via makefile if suitable care taken. 257 2582024-11-10 Simon J Gerraty <sjg@beast.crufty.net> 259 260 * VERSION (_MAKE_VERSION): 20241110 261 Merge with NetBSD make, pick up 262 o make: allow .../ (search here and above) in 263 .MAKE.MAKEFILE_PREFERENCE and -f argument. 264 2652024-11-03 Simon J Gerraty <sjg@beast.crufty.net> 266 267 * VERSION (_MAKE_VERSION): 20241101 268 Merge with NetBSD make, pick up 269 o parse.c: report filename:linenumber in parse debug output 270 2712024-09-21 Simon J Gerraty <sjg@beast.crufty.net> 272 273 * VERSION (_MAKE_VERSION): 20240921 274 Merge with NetBSD make, pick up 275 o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. 276 277 * Makefile: use genfiles.mk to generate ${MAN} 278 so that it can be tuned for local site. 279 Ensure MAN is defined before including Makefile.inc 280 281 * Makefile: use MK_GEN_MAN to make it easier to control whether we 282 generate ${MAN} 283 2842024-09-16 Simon J Gerraty <sjg@beast.crufty.net> 285 286 * VERSION (_MAKE_VERSION): 20240909 287 288 * arch.c: fix NetBSD PR 58597 289 2902024-09-01 Simon J Gerraty <sjg@beast.crufty.net> 291 292 * Makefile: use SUBDIR.${MK_TESTS} so that we skip 293 unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS 294 295 * VERSION (_MAKE_VERSION): 20240901 296 Merge with NetBSD make, pick up 297 o reduce line length in error messages 298 o var.c: simplify printing of an evaluation stack element 299 3002024-08-29 Simon J Gerraty <sjg@beast.crufty.net> 301 302 * VERSION (_MAKE_VERSION): 20240828 303 Merge with NetBSD make, pick up 304 o add more context to error message about recursive variables 305 o treat recursive variables non-fatally - continue parsing to end 306 of makefile 307 3082024-08-12 Simon J Gerraty <sjg@beast.crufty.net> 309 310 * VERSION (_MAKE_VERSION): 20240808 311 Merge with NetBSD make, pick up 312 o improve some error messages for better clarify and readability 313 3142024-07-22 Simon J Gerraty <sjg@beast.crufty.net> 315 316 * VERSION (_MAKE_VERSION): 20240722 317 Merge with NetBSD make, pick up 318 o job.c: remove dead code 319 3202024-07-21 Simon J Gerraty <sjg@beast.crufty.net> 321 322 * VERSION (_MAKE_VERSION): 20240720 323 Merge with NetBSD make, pick up 324 o compat.c: do not run commands that have parse or evaluation errors. 325 o var.c: remove wrong error message about an undefined variable 326 3272024-07-13 Simon J Gerraty <sjg@beast.crufty.net> 328 329 * cleanup redundant differences from NetBSD make 330 o parse.c: no longer uses mmap 331 o var.c: check __STDC_VERSION__ not __STDC__ 332 3332024-07-12 Simon J Gerraty <sjg@beast.crufty.net> 334 335 * Apply some patches from NetBSD pkgsrc to reduce divergence 336 o meta.c: requires sys/select.h if available 337 o var.c: ensure SIZE_MAX has a value 338 o util.c: ensure SA_RESTART is defined 339 340 * configure.in: use *ksh* rather than just *ksh to match 341 ksh shell specification. 342 343 * unit-tests/Makefile: expand BROKEN_TESTS for ksh and 344 mksh in particular 345 3462024-07-11 Simon J Gerraty <sjg@beast.crufty.net> 347 348 * VERSION (_MAKE_VERSION): 20240711 349 Merge with NetBSD make, pick up 350 o compat.c: allow Compat_RunCommand to also handle very long 351 commands by writing to a temp file when needed. 352 o main.c: extract the temp file logic recently added to Cmd_Exec 353 to Cmd_Argv so it can be leveraged by Compat_RunCommand. 354 3552024-07-09 Simon J Gerraty <sjg@beast.crufty.net> 356 357 * VERSION (_MAKE_VERSION): 20240709 358 Merge with NetBSD make, pick up 359 o error out on parse/evaluation errors in shell commands 360 o var.c: error out on syntax errors in ':M' and ':N' modifiers 361 3622024-07-07 Simon J Gerraty <sjg@beast.crufty.net> 363 364 * VERSION (_MAKE_VERSION): 20240707 365 Merge with NetBSD make, pick up 366 o only generate code for cleanup functions in CLEANUP mode 367 o hash.c: don't track hash table chain lengths during lookup 368 unless debugging 369 o main.c: move initialization of variable scopes to targ.c 370 o var.c: remove Var_End as it is now unnecessary 371 3722024-07-06 Simon J Gerraty <sjg@beast.crufty.net> 373 374 * VERSION (_MAKE_VERSION): 20240706 375 Merge with NetBSD make, pick up 376 o reduce lint comments about ARGSUSED 377 o cond.c: error out on conditions containing the operators '&' and '|' 378 o str.c: error out on a matching malformed matching pattern '[[' 379 o var.c: in error messages, distinguish parsing from evaluating 380 in error messages for anonymous variables, log the value 381 error out on unclosed expressions during parse time 382 3832024-07-04 Simon J Gerraty <sjg@beast.crufty.net> 384 385 * VERSION (_MAKE_VERSION): 20240704 386 Merge with NetBSD make, pick up 387 o add more context information to error messages 388 o main.c: on error, print the targets to be made 389 add detailed exit status to message for failed sub-commands 390 o var.c: error out on the "Bad modifier" error message 391 3922024-07-01 Simon J Gerraty <sjg@beast.crufty.net> 393 394 * VERSION (_MAKE_VERSION): 20240701 395 Merge with NetBSD make, pick up 396 o var.c: add :tt for Title case 397 3982024-06-30 Simon J Gerraty <sjg@beast.crufty.net> 399 400 * configure.in: 20240630 further refine check for whether 401 TZ=Europe/Berlin works 402 403 * VERSION (_MAKE_VERSION): 20240630 404 Merge with NetBSD make, pick up 405 o job.c: reduce use of UNCONST 406 o main.c: add detailed exit status to message for failed sub-commands 407 o var.c: error out on some more syntax errors 408 add more context to "returned non-zero status" message 409 4102024-06-25 Simon J Gerraty <sjg@beast.crufty.net> 411 412 * VERSION (_MAKE_VERSION): 20240625 413 Merge with NetBSD make, pick up 414 o job.c: ensure shellPath is always duped, avoid upsetting free() 415 4162024-06-16 Simon J Gerraty <sjg@beast.crufty.net> 417 418 * VERSION (_MAKE_VERSION): 20240616 419 Merge with NetBSD make, pick up 420 o clean up collection of context information for error messages 421 o in warnings, move the word "warning" to the front 422 o var.c: throw an error on attempt to override an internal 423 read-only variable 424 4252024-06-10 Simon J Gerraty <sjg@beast.crufty.net> 426 427 * VERSION (_MAKE_VERSION): 20240610 428 Merge with NetBSD make, pick up 429 o for.c: remove redundant shortcut for building the .for loop body 430 4312024-06-02 Simon J Gerraty <sjg@beast.crufty.net> 432 433 * VERSION (_MAKE_VERSION): 20240602 434 Merge with NetBSD make, pick up 435 o rename some VarEvalMode constants to better match debug names. 436 o var.c: avoid out-of-bounds read when parsing indirect modifiers. 437 4382024-06-01 Simon J Gerraty <sjg@beast.crufty.net> 439 440 * VERSION (_MAKE_VERSION): 20240601 441 Merge with NetBSD make, pick up 442 o add .export-all rather than allow .export with no argument 443 which can happen accidentally. 444 o if lua is available, run check-expect.lua after unit-tests 445 o main.c: use snprintf rather than strncpy 446 fix memory leak when purging realpath cache. 447 4482024-05-28 Simon J Gerraty <sjg@beast.crufty.net> 449 450 * VERSION (_MAKE_VERSION): 20240528 451 Merge with NetBSD make, pick up 452 o fix a number of memory leaks 453 o replace magic numbers with POSIX FILENO constants 454 o hash.c: remove dead code from HashTable_DeleteEntry 455 o main.c: when complaining about unusable .OBJDIR 456 call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. 457 o parse.c: use fewer technical terms in debug message for dependency 458 4592024-05-20 Simon J Gerraty <sjg@beast.crufty.net> 460 461 * VERSION (_MAKE_VERSION): 462 Merge with NetBSD make, pick up 463 o dir.c: in FindFile restore last search of .CURDIR even for 464 includes, as a number of existing makefiles are broken otherwise. 465 4662024-05-19 Simon J Gerraty <sjg@beast.crufty.net> 467 468 * VERSION (_MAKE_VERSION): 20240519 469 Merge with NetBSD make, pick up 470 o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. 471 Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. 472 o main.c: no need to set .DOTLAST in sysIncPath 473 4742024-05-07 Simon J Gerraty <sjg@beast.crufty.net> 475 476 * VERSION (_MAKE_VERSION): 20240508 477 Merge with NetBSD make, pick up 478 o make: ensure variables set on command line get added to 479 .MAKEOVERRIDES (even if they start with '.') so they are passed to 480 sub-makes. 481 4822024-04-30 Simon J Gerraty <sjg@beast.crufty.net> 483 484 * VERSION (_MAKE_VERSION): 20240430 485 Merge with NetBSD make, pick up 486 o main.c: ensure '.include <makefile>' respects MAKESYSPATH. 487 Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 488 4892024-04-28 Simon J Gerraty <sjg@beast.crufty.net> 490 491 * VERSION (_MAKE_VERSION): 20240428 492 Merge with NetBSD make, pick up 493 o simplify freeing of lists 494 o arch.c: trim pointless comments 495 o var.c: delay variable assignments until actually needed 496 don't reallocate memory after evaluating an expression, result is 497 almost always short-lived. 498 4992024-04-26 Simon J Gerraty <sjg@beast.crufty.net> 500 501 * VERSION (_MAKE_VERSION): 20240426 502 Merge with NetBSD make, pick up 503 o job.c: in debug output, print the directory in which a job 504 failed at same time as failed target so it is more easily found in 505 build log. 506 5072024-04-24 Simon J Gerraty <sjg@beast.crufty.net> 508 509 * VERSION (_MAKE_VERSION): 20240424 510 Merge with NetBSD make, pick up 511 o clean up comments, code and tests 512 5132024-04-23 Simon J Gerraty <sjg@beast.crufty.net> 514 515 * VERSION (_MAKE_VERSION): 20240422 516 Merge with NetBSD make, pick up 517 o var.c: avoid LazyBuf for :*time modifiers. 518 LazyBuf's are not nul terminated so not suitable for passing to 519 functions that expect that. These modifiers are used sparingly so 520 an extra allocation is not a problem. 521 5222024-04-20 Simon J Gerraty <sjg@beast.crufty.net> 523 524 * VERSION (_MAKE_VERSION): 20240420 525 Merge with NetBSD make, pick up 526 o provide more context information for parse/evaluate errors 527 5282024-04-14 Simon J Gerraty <sjg@beast.crufty.net> 529 530 * VERSION (_MAKE_VERSION): 20240414 531 Merge with NetBSD make, pick up 532 o parse.c: print -dp debug info earlier so we see which 533 .if or .for line is being parsed. 534 5352024-04-04 Simon J Gerraty <sjg@beast.crufty.net> 536 537 * VERSION (_MAKE_VERSION): 20240404 538 Merge with NetBSD make, pick up 539 o fix some unit tests for Cygwin 540 o parse.c: exit immediately after reading a null byte from a makefile 541 542 * fix generation of bmake.cat1 543 5442024-03-19 Simon J Gerraty <sjg@beast.crufty.net> 545 546 * VERSION (_MAKE_VERSION): 20240314 547 Add/Improve support for Cygwin 548 o uname -s output isn't useful so allow configure to 549 set FORCE_MAKE_OS - to force the value of .MAKE.OS 550 and use Cygwin which matches uname -o 551 o fix some unit-tests for Cygwin 552 5532024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 554 555 * boot-strap: tests can take a long time; use a cookie to 556 skip them if bmake has not been updated since tests last 557 ran successfully. 558 559 * Makefile: Cygwin handles MANTARGET man 560 561 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 562 5632024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 564 565 * VERSION (_MAKE_VERSION): 20240309 566 Merge with NetBSD make, pick up 567 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 568 this allows a .ERROR target to ignore the case of 569 .ERROR_EXIT==6 which just means that the build actually 570 failed somewhere else. 571 5722024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 573 574 * VERSION (_MAKE_VERSION): 20240303 575 576 * var.c: on IRIX we need both inttypes.h and stdint.h 577 5782024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 579 580 * VERSION (_MAKE_VERSION): 20240301 581 Merge with NetBSD make, pick up 582 o export variables with value from target scope 583 when appropriate. 584 5852024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 586 587 * VERSION (_MAKE_VERSION): 20240212 588 Merge with NetBSD make, pick up 589 o remove unneeded conditional-compilation toggles 590 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 591 GMAKEEXPORT NO_REGEX and SUNSHCMD 592 593 * configure.in: add check for regex.h 594 595 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 596 5972024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 598 599 * VERSION (_MAKE_VERSION): 20240204 600 Merge with NetBSD make, pick up 601 o var.c: fix some lint (-dL) mode parsing issues 602 6032024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 604 605 * VERSION: (_MAKE_VERSION): 20240202 606 Merge with NetBSD make, pick up 607 o make.1: note that arg to :D and :U can be empty 608 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 609 6102024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 611 612 * VERSION (_MAKE_VERSION): 20240108 613 Merge with NetBSD make, pick up 614 o miscellaneous cleanups 615 6162024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 617 618 * VERSION (_MAKE_VERSION): 20240106 619 Merge with NetBSD make, pick up 620 o fix duplicate progname when reporting an unknown target 621 o unit tests for Cmd_Exec using temp file 622 6232024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 624 625 * VERSION (_MAKE_VERSION): 20240105 626 Merge with NetBSD make, pick up 627 o main.c: Cmd_Exec write cmd to a file if too big 628 avoid blowing commandline/env limits 629 6302024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 631 632 * VERSION (_MAKE_VERSION): 20240101 633 o util.c: flesh out more of strftime 634 * configure.in: add --with-bmake-strftime 635 it is not a full implementation but enough to pass all 636 the unit-tests. 637 * parse.c: LoadFile do not append \n to empty buffer. 638 6392023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 640 641 * VERSION (_MAKE_VERSION): 20231230 642 Merge with NetBSD make, pick up 643 o simplify memory allocation for string buffers 644 o fix declared types of list nodes 645 o suff.c: clean up freeing of suffixes 646 o var.c: simplify debug message for the ':@var@...@' modifier 647 clean up variable handling 648 6492023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 650 651 * VERSION (_MAKE_VERSION): 20231226 652 Merge with NetBSD make, pick up 653 o compat.c: ensure make's output is correctly ordered with that of 654 the target when not going to a tty 655 o main.c: check for shellPath whether to call Shell_Init() 656 6572023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 658 659 * VERSION (_MAKE_VERSION): 20231224 660 Merge with NetBSD make, pick up 661 o compat.c: check for shellPath whether to call Shell_Init() 662 tweak the unit test to detect the bug thus fixed. 663 o make.1: do not claim .SHELL is only used by jobs mode. 664 6652023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 666 667 * VERSION (_MAKE_VERSION): 20231220 668 Merge with NetBSD make, pick up 669 o str.c: speed up pattern matching in the ':M' modifier 670 o var.c: fix confusing debug logging when deleting a variable 671 use consistent debug messages style when ignoring variables 672 6732023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 674 675 * VERSION (_MAKE_VERSION): 20231210 676 Merge with NetBSD make, pick up 677 o var.c: avoid segfault on empty :C match expression 678 explain in debug log why variable assignment is ignored. 679 6802023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 681 682 * VERSION (_MAKE_VERSION): 20231208 683 Merge with NetBSD make, pick up 684 o var.c: ensure fromCmd is set correctly for variables set on 685 command line. 686 6872023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 688 689 * configure.in: disable generation of 'makefile' for 690 Darwin by default. 691 692 * boot-strap: docuement --without-makefile 693 6942023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 695 696 * VERSION (_MAKE_VERSION): 20231124 697 Merge with NetBSD make, pick up 698 o main.c: cleanup processing of -j 699 fix lint warning about strchr 700 o var.c: more accurate error message for invalid ':mtime' argument 701 cleanup :[...] modifier 702 avoid reading beyond substring when comparing 703 o unit-tests cover all cases of :mtime, test and explain exporting 704 of variables 705 o cleanup comments 706 7072023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 708 709 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 710 $FreeBSD$ tag, so avoid adding it. 711 7122023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 713 714 * VERSION (_MAKE_VERSION): 20230909 715 Merge with NetBSD make, pick up 716 o main.c: allow -j to compute a multiple of ncpu 717 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 718 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 719 _SC_NPROCESSORS_ONLN 720 .MAKE.JOBS.C will be "yes" if -jC is supported 721 7222023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 723 724 * VERSION (_MAKE_VERSION): 20230820 725 Merge with NetBSD make, pick up 726 o make.1: note that :localtime is better for %s 727 o parse.c: improve error messages for invalid input. 728 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 729 correct result, it is still better to use %s:L:localtime. 730 7312023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 732 733 * VERSION (_MAKE_VERSION): 20230818 734 Merge with NetBSD make, pick up 735 o meta.c: meta_ignore - check raw path against metaIgnorePaths 736 to potentially skip call to realpath. 737 o var.c: be strict when parsing the argument of the ':mtime' modifier 738 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 739 should be used to get an equivalent value to time(3). 740 7412023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 742 743 * VERSION (_MAKE_VERSION): 20230816 744 Merge with NetBSD make, pick up 745 o cond.c: clean up multiple-inclusion guards 746 7472023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 748 749 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 750 if configure cannot work out how to control TZ. 751 Remove varmod-localtime from BROKEN_TESTS for IRIX* 752 7532023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 754 755 * VERSION (_MAKE_VERSION): 20230723 756 757 * configure.in: fix the test for wether TZ=Europe/Berlin works. 758 Depending on the time of year, if run between 22:00 and 00:00 UTC 759 the check in configure would fail incorrectly. 760 Take the day into account as well. 761 7622023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 763 764 * VERSION (_MAKE_VERSION): 20230711 765 Merge with NetBSD make, pick up 766 o make.1: clean up wording, clarify scope of '!' in conditions 767 7682023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 769 770 * make-bootstrap.sh.in: set prefix 771 If configure is run using ksh we get unexpanded ${prefix} in 772 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 773 correct result. 774 7752023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 776 777 * VERSION (_MAKE_VERSION): 20230711 778 bump version for IRIX tweaks 779 780 * make.h: undef OP_NONE if defined 781 782 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 783 784 * configure.in: override INSTALL on IRIX 785 7862023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 787 788 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 789 7902023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 791 792 * VERSION (_MAKE_VERSION): 20230622 793 Merge with NetBSD make, pick up 794 o optimize string matching for ':M' and ':N' 795 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 796 7972023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 798 799 * VERSION (_MAKE_VERSION): 20230621 800 Merge with NetBSD make, pick up 801 o more extensive tests for include guards 802 o parse.c: if a guard is already defined a file that uses the same 803 guard is still guarded by it. 804 8052023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 806 807 * VERSION (_MAKE_VERSION): 20230620 808 Merge with NetBSD make, pick up 809 o allow guards to be targets as well as variables 810 The guard targets may include variable references like 811 __${.PARSEDIR:tA}/${.PARSEFILE}__ 812 8132023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 814 815 * VERSION (_MAKE_VERSION): 20230619 816 Merge with NetBSD make, pick up 817 o unit test for .undef of readOnly vars 818 o optimization for makefiles protected from multiple-inclusion 819 skip even opening the file after first include. 820 Initially this only handles makefiles guarded by a variable 821 target guards are next. 822 8232023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 824 825 * VERSION (_MAKE_VERSION): 20230616 826 Merge with NetBSD make, pick up 827 o var.c: do not allow delete of readOnly variable 828 8292023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 830 831 * VERSION (_MAKE_VERSION): 20230601 832 Merge with NetBSD make, pick up 833 o parse.c: .break takes no args 834 o lots of unit test updates 835 8362023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 837 838 * unit-tests/Makefile: skip tests that require /dev/filemon 839 if it does not exists - issue a warning. 840 8412023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 842 843 * VERSION (_MAKE_VERSION): 20230522 844 Fix building on darwin ppc 845 846 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 847 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 848 8492023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 850 851 * VERSION (_MAKE_VERSION): 20230515 852 853 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 854 compile filemon_ktrace.c 855 8562023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 857 858 * VERSION (_MAKE_VERSION): 20230512 859 o sys.dirdeps.mk - broke after-import target 860 8612023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 862 863 * VERSION (_MAKE_VERSION): 20230510 864 Merge with NetBSD make, pick up 865 o parse.c: don't print null filename in stack traces 866 o var.c: :mtime operate on each word in variable value 867 8682023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 869 870 * VERSION (_MAKE_VERSION): 20230509 871 Merge with NetBSD make, pick up 872 o for.c: skip syntactically wrong .for loops 873 o var.c: allow for :gmtime=${mtime} 874 add :mtime[=timestamp] where timestamp is used if stat(2) 875 fails, if :mtime=error stat(2) failure causes error. 876 8772023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 878 879 * VERSION (_MAKE_VERSION): 20230504 880 Merge with NetBSD make, pick up 881 o compat.c: fix compile on NetBSD 7.2 882 o make.1: fix documentation of .PREFIX to match reality and POSIX 883 o unit-tests: improved var-scope-local 884 8852023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 886 887 * VERSION (_MAKE_VERSION): 20230414 888 Merge with NetBSD make, pick up 889 o minor cleanup 890 8912023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 892 893 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 894 unlimited results in an insane number (0x7fffffffffffffff). 895 If BMAKE_NOFILE_MAX is defined, use that instead. 896 8972023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 898 899 * VERSION (_MAKE_VERSION): 20230321 900 Merge with NetBSD make, pick up 901 * make.1: document seemingly unexplained Error code 6. 902 9032023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 904 905 * VERSION (_MAKE_VERSION): 20230317 906 Merge with NetBSD make, pick up 907 o compat.c: CompatDeleteTarget skip .PHONY targets to be 908 consistent with JobDeleteTarget. 909 o job.c: fix memory leak in handling sysv :from=to modifiers 910 9112023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 912 913 * VERSION (_MAKE_VERSION): 20230303 914 Merge with NetBSD make, pick up 915 o several updated unit-tests 916 9172023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 918 919 * VERSION (_MAKE_VERSION): 20230222 920 Merge with NetBSD make, pick up 921 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 922 9232023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 924 925 * VERSION (_MAKE_VERSION): 20230218 926 Merge with NetBSD make, pick up 927 o var.c: fix parsing of unevaluated subexpressions with 928 unbalanced '{}' 929 9302023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 931 932 * VERSION (_MAKE_VERSION): 20230215 933 Merge with NetBSD make, pick up 934 o inline macros for some variable names 935 o cond.c: reduce complexity of evaluating expressions 936 9372023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 938 939 * VERSION (_MAKE_VERSION): 20230208 940 Merge with NetBSD make, pick up 941 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 942 when it has been used within conditional expressions 943 9442023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 945 946 * VERSION (_MAKE_VERSION): 20230127 947 948 * install-sh: if making directories ensure umask is set 949 to match mode. 950 951 * Makefile: use DIRMODE for directories and 952 NONBINMODE for man pages and mk files 953 9542023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 955 956 * VERSION (_MAKE_VERSION): 20230126 957 Merge with NetBSD make, pick up 958 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 959 should be read-only. 960 9612023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 962 963 * VERSION (_MAKE_VERSION): 20230123 964 Merge with NetBSD make, pick up 965 o .[NO]READONLY: for control of read-only variables 966 o .SYSPATH: for controlling the path searched for makefiles 967 9682023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 969 970 * VERSION (_MAKE_VERSION): 20230120 971 Merge with NetBSD make, pick up 972 o allow for white-space between command specifiers @+- 973 o add more details to warning 'Extra targets ignored' 974 9752023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 976 977 * machine.sh: leverage os.sh rather than duplicate 978 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 979 for that purpose for the past decade or so. 980 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 981 9822023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 983 984 * VERSION (_MAKE_VERSION): 20230101 985 Merge with NetBSD make, pick up 986 o cleanup comments, inline some LazyBuf_ methods 987 o unit-tests/ add/improve comments in tests 988 o make.1: sync list of built-in variables with reality 989 sort list of built-in variables 990 reduce indentation of the long list of variable names 991 use consistent markup for boolean flags 992 move description of .MAKE.MODE below the .MAKE.META block 993 clarify in which case an expression may omit braces 994 9952022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 996 997 * VERSION (_MAKE_VERSION): 20221024 998 Merge with NetBSD make, pick up 999 o change return type of unlink_file back to int 1000 10012022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 1002 1003 * Makefile: Darwin and Linux can handle MANTARGET=man 1004 10052022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 1006 1007 * VERSION (_MAKE_VERSION): 20220928 1008 Merge with NetBSD make, pick up 1009 o fix more ignored returns from snprintf 1010 o compile with higher warnings 1011 10122022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 1013 1014 * main.c meta.c: do not ignore return from snprintf 1015 1016 * meta.c strlcpy.c: we need prototype for strlcpy 1017 1018 * sigcompat.c: fix unused function warnings 1019 10202022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 1021 1022 * VERSION (_MAKE_VERSION): 20220924 1023 Merge with NetBSD make, pick up 1024 o fix bug in .break reset of conditional depth 1025 o overhaul and simplify tracking of conditional depth 1026 10272022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 1028 1029 * VERSION (_MAKE_VERSION): 20220912 1030 Merge with NetBSD make, pick up 1031 o man page updates 1032 10332022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 1034 1035 * VERSION (_MAKE_VERSION): 20220909 1036 Merge with NetBSD make, pick up 1037 o update unit-tests to handle deprecation of egrep 1038 o cond.c: add more details to error message for numeric comparison 1039 1040 * configure.in: allow for deprecation of egrep 1041 1042 * Makefile: Linux can handle MANTARGET=man 1043 10442022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 1045 1046 * VERSION (_MAKE_VERSION): 20220903 1047 Merge with NetBSD make, pick up 1048 o job.c: fix handling of null bytes in output 1049 10502022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1051 1052 * VERSION (_MAKE_VERSION): 20220902 1053 Merge with NetBSD make, pick up 1054 o Allow .break to terminate a .for loop early 1055 10562022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1057 1058 * VERSION (_MAKE_VERSION): 20220901 1059 Merge with NetBSD make, pick up 1060 o var.c: fix out-of-bounds errors when parsing 1061 10622022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1063 1064 * VERSION (_MAKE_VERSION): 20220824 1065 Merge with NetBSD make, pick up 1066 o var.c: revert change to modifier parsing that breaks 1067 shell variable references within ':@var@body@' 1068 o adjust unit-tests 1069 10702022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 1071 1072 * VERSION (_MAKE_VERSION): 20220818 1073 Merge with NetBSD make, pick up 1074 o fix exit status for '-q' (since 1994) 1075 10762022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1077 1078 * VERSION (_MAKE_VERSION): 20220808 1079 Merge with NetBSD make, pick up 1080 o var.c: fix parsing of modifiers containing unbalanced subexpressions 1081 extract parsing of ':D' and ':U' modifiers into separate function 1082 10832022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1084 1085 * VERSION (_MAKE_VERSION): 20220726 1086 1087 * Auto-create objdir for bmake/unit-tests if appropriate 1088 10892022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 1090 1091 * VERSION (_MAKE_VERSION): 20220724 1092 Merge with NetBSD make, pick up 1093 o make.1: describe variable assignment and evaluation more precisely 1094 o parse.c: fix out-of-bounds read when parsing an invalid line 1095 o var.c: simplify return type of IsShortVarnameValid 1096 10972022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 1098 1099 * VERSION (_MAKE_VERSION): 20220612 1100 Merge with NetBSD make, pick up 1101 o allow to randomize build order of targets 1102 .MAKE.MODE += randomize-targets can help uncover dependency bugs 1103 within a makefile. 1104 o compat.c: rename Compat_Run to Compat_MakeAll 1105 o make.c: inline MakeBuildParent 1106 inline make_abort, improve error details 1107 o parse.c: reorganize Parse_Error 1108 fix memory leak in wildcard targets and sources 1109 separate cases in HandleDependencyTargetMundane 1110 extract HandleSingleDependencyTargetMundane 1111 rename loadfile to LoadFile 1112 split IncludeFile into separate functions 1113 condense code for searching a file in the paths 1114 fix off-by-one error in buffer for .WAIT nodes 1115 o str.c: condense Str_Match 1116 make code for string matching syntactically more consistent 1117 11182022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1119 1120 * VERSION (_MAKE_VERSION): 20220418 1121 Merge with NetBSD make, pick up 1122 o ignore '.POSIX:' if not in first non-comment line 1123 of Makefile as specified by POSIX. 1124 add unit-tests for above. 1125 o meta.c: make it easier to find usage of identifiers 1126 o targ.c: add .USEBEFORE to Targ_PrintType 1127 11282022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 1129 1130 * VERSION (_MAKE_VERSION): 20220414 1131 1132 * unit-tests/Makefile: simplify checks for shells with 1133 BROKEN_TESTS, this helps with other Linux distros that 1134 use dash. 1135 11362022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1137 1138 * VERSION (_MAKE_VERSION): 20220330 1139 Merge with NetBSD make, pick up 1140 o var.c: fix spacing, and a typo in a test 1141 11422022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 1143 1144 * VERSION (_MAKE_VERSION): 20220326 1145 Merge with NetBSD make, pick up 1146 o parse.c: try to include 'posix.mk' the first time 1147 .POSIX: is encountered, to allow for beter POSIX compliance. 1148 o var.c: make debug logs more readable 1149 prefer 'long long' over 'long' on 32-bit C99 platforms 1150 fix crash on .undef of an environment variable 1151 11522022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 1153 1154 * VERSION (_MAKE_VERSION): 20220303 1155 Merge with NetBSD make, pick up 1156 o tell meta mode unit tests not to expect filemon 1157 o cond.c: make debug logging for comparisons less technical 1158 o lst.c: fix mem leak in Lst_Remove 1159 o str.c: make code for string matching syntactically more consistent 1160 o var.c: simplify ParseModifier_Match 1161 11622022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 1163 1164 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 1165 1166 * VERSION (_MAKE_VERSION): 20220214 1167 Merge with NetBSD make, pick up 1168 o cond.c: simplify control flow in CondParser_Comparison 1169 o job.c: fix echoing of command with '-' in silent target in jobs mode 1170 o main.c: prefix the warning about read-only .OBJDIR with a colon 1171 o parse.c: remove redundant conditions 1172 o var.c: simplify control flow in ModifyWord_SysVSubst 1173 11742022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1175 1176 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 1177 is any chance we have dash as .SHELL 1178 1179 * VERSION (_MAKE_VERSION): 20220208 1180 Merge with NetBSD make, pick up 1181 o more unit tests 1182 o meta.c: use a variable to hold command line to be filtered 1183 to avoid any side effects from content of command line. 1184 11852022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 1186 1187 * VERSION (_MAKE_VERSION): 20220204 1188 Merge with NetBSD make, pick up 1189 o use unsigned consistently for line numbers, avoid the need for %z 1190 o parse.c: do not step off end of input in Parse_IsVar 1191 when checking for target local variable assignments 1192 11932022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 1194 1195 * VERSION (_MAKE_VERSION): 20220202 1196 Merge with NetBSD make, pick up 1197 o remove redundant declaration of HashIter_Init 1198 o make DEBUG0 simpler 1199 12002022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1201 1202 * cast gn->lineno to avoid %z 1203 1204 * VERSION (_MAKE_VERSION): 20220130 1205 Merge with NetBSD make, pick up 1206 o more unit tests 1207 o make GNode lineno unsigned to please lint 1208 o print location of recursive variable references in commands 1209 o print "stack trace" (makefile includes) on fatal errors 1210 o make.1: refine documentation for target local assignments 1211 12122022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 1213 1214 * VERSION (_MAKE_VERSION): 20220128 1215 Merge with NetBSD make, pick up 1216 o inline functions called only once 1217 o for.c: clean up AddEscape for building the body of a .for loop 1218 o hash.c: merge duplicate code for finding an entry in a hash table 1219 replace HashEntry_KeyEquals with strncmp 1220 o make.1: document quirks of target local variable assignments. 1221 o parse.c: cleanup white-space 1222 12232022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1224 1225 * VERSION (_MAKE_VERSION): 20220126 1226 Merge with NetBSD make, pick up 1227 o allow setting target local variables 1228 o more unit tests 1229 o add missing newline after "cannot continue" message 1230 o meta.c: clean up eat_dots 1231 o parse.c: fix filename in warning about duplicate script 1232 o var.c: when expanding nested variables, check simple things first 1233 12342022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 1235 1236 * VERSION (_MAKE_VERSION): 20220116 1237 Merge with NetBSD make, pick up 1238 o fix for unit-tests/varname-makeflags on non-BSD systems 1239 o use Var_Exists rather than Var_Value where appropriate 1240 o remove unnecessary functions for expanding variable names 1241 o cond.c: inline EvalBare 1242 o main.c: lint cleanup 1243 o parse.c: condense code in Parse_IsVar 1244 use islower for parsing directives (none have upper case) 1245 12462022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1247 1248 * VERSION (_MAKE_VERSION): 20220112 1249 Merge with NetBSD make, pick up 1250 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 1251 comparion, rarely needed but useful when it is. 1252 12532022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1254 1255 * VERSION (_MAKE_VERSION): 20220110 1256 Merge with NetBSD make, pick up 1257 o inline Buf_Clear 1258 o remove redundant braces 1259 o rename and inline Targ_Precious 1260 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 1261 o for.c: clean up handling of .for loops 1262 fix reported line numbers of continuation lines 1263 add details about .for loop variables to stack traces 1264 o job.c: reduce code for initializing error handling in shell 1265 o main.c: in Cmd_Exec, return error message instead of format string 1266 have as few statements as possible between va_start and va_end 1267 add debug logging for capturing the output of external commands 1268 o make.c: use consistent variable names for varargs 1269 o make_malloc.c: remove duplicate code from bmake_strdup 1270 o parse.c: add missing printflike annotations 1271 remove redundant lines from stack traces 1272 fix stack traces in -dp mode 1273 reduce confusing code in ParseForLoop 1274 fix line number in debug log after returning from a file 1275 rename IFile and its fields to match their actual content 1276 clean up ParseDependencySources 1277 o var.c: shorten ApplyModifier_Assign 1278 rename is_shell_metachar, fix character conversion warning 1279 merge calls to ApplyModifier_Time 1280 merge duplicate code for modifiers 'gmtime' and 'localtime' 1281 12822022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 1283 1284 * parse.c: loadfile restore extra byte in buffer. 1285 12862022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1287 1288 * VERSION (_MAKE_VERSION): 20220101 1289 Merge with NetBSD make, pick up 1290 o more unit-tests 1291 o remove unnecessary words from command line options in CmdOpts 1292 o rename eunlink to unlink_file 1293 o cond.c: make ParseWord in condition parser simpler 1294 internally return false for irrelevant leaves in conditions 1295 replace table for function lookup in conditions with simple code 1296 merge duplicate types CondEvalResult and CondResult 1297 o for.c: clean up handling of .for loops and .include directives 1298 o main.c: constify cached_realpath 1299 clean up Cmd_Exec 1300 o parse.c: sync API documentation 1301 fix error message when reading more than 1 GB from stdin 1302 clean up parsing of makefiles 1303 fix line number in error message about open conditionals 1304 unexport types VarAssignOp and VarAssign 1305 clean up function names 1306 remove redundant parameters in dependency parsing functions 1307 reduce scope of the list of wildcard target names 1308 extract OP_NOTARGET into separate function 1309 clean up variable names for parsing dependency lines 1310 make debug logging a bit more human-friendly 1311 o var.c: condense code in ApplyModifier_Assign 1312 13132021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1314 1315 * VERSION (_MAKE_VERSION): 20211221 1316 Merge with NetBSD make, pick up 1317 o more unit-tests 1318 o style cleanup 1319 o in CLEANUP mode, free interned strings at the very end 1320 o fix memory leak for filenames in .for loops 1321 o buf.c: avoid memory leak 1322 o cond.c: condense CondParser_ComparisonOp 1323 o hash.c: change return type of HashTable_Set to void 1324 o job.c: change return type of Compat_RunCommand from int to bool 1325 o main.c: remove bmake_free 1326 o parse.c: condense repetetive code in ParseDirective 1327 remove dead code for handling traditional include directives 1328 clean up parsing of variable assignments 1329 remove unreachable code for parsing the dependency operator 1330 clean up loading of files 1331 fix memory leak in IncludeFile 1332 o var.c: fix memory leak when parsing a variable name 1333 fix memory leak from ${.SUFFIXES} 1334 reduce memory allocation in modifier ':?' and ':C' 1335 condense RegexReplace for the modifier ':C' and avoid strlen 1336 merge duplicate code for memory handling in Var_Parse 1337 distinguish between short-lived and environment variables 1338 rename VarFreeEnv to VarFreeShortLived 1339 13402021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 1341 1342 * cond.c: fix mem leak in CondParser_Leaf 1343 13442021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1345 1346 * VERSION (_MAKE_VERSION): 20211212 1347 Merge with NetBSD make, pick up 1348 o rename Parse_SetInput to Parse_PushInput 1349 o remove remove period from end of error messages and warnings 1350 to be more consistent 1351 o arch.c: use simpler memory management for parsing archive members 1352 o cond.c: rework and reduce recursion 1353 o for.c: rename some functions to better reflect purpose 1354 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 1355 o var.c: in parse errors, mark whitespace more clearly 1356 inline ParseEmptyArg into CondParser_FuncCallEmpty 1357 minimize calls to LazyBuf_Get in ParseVarnameLong 1358 treat .SUFFIXES as a read-only variable 1359 13602021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 1361 1362 * VERSION (_MAKE_VERSION): 20211207 1363 Merge with NetBSD make, pick up 1364 o inline HashIter_Init 1365 o parse.c: inline common subexpression in ParseRawLine 1366 o var.c: merge branches for modifiers ':D' and ':U' 1367 extract common code into Expr_Words 1368 extract common code into Expr_Str 1369 move low-level implementation details out of Var_Parse 1370 13712021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1372 1373 * VERSION (_MAKE_VERSION): 20211206 1374 Merge with NetBSD make, pick up 1375 o add unit-tests/varmod-loop-delete 1376 o for.c: inline Str_Words - reduce memory allocation 1377 o parse.c: do not try to expand fixed variable names 1378 only allocate the name of an included file if necessary 1379 clean up ParseInclude 1380 o var.c: fix use-after-free in modifier ':@' 1381 save a memory allocation in each modifier ':O' and ':u' 1382 save a memory allocation in the modifier ':[...]' 1383 in UnexportVars, replace Str_Words with Substring_Words to 1384 reduce allocations and copying. 1385 13862021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 1387 1388 * VERSION (_MAKE_VERSION): 20211204 1389 Merge with NetBSD make, pick up 1390 o flesh out a number of tests 1391 o replace enums with bitfields, this simplifies a lot of code. 1392 o var.c: refactor ParseModifierPartSubst 1393 13942021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 1395 1396 * VERSION (_MAKE_VERSION): 20211024 1397 Merge with NetBSD make, pick up 1398 o Punt on write errors - ENOSPC etc. 1399 14002021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1401 1402 * configure.in: use_defshell, set both DEFSHELL_INDEX 1403 and defshell_path if appropriate. 1404 This makes it easier to use say the KSH specification with 1405 and alternate path for the shell. 1406 1407 * configure.in compat.c: for SCO we need to force UseShell 1408 1409 * configure.in: SCO /bin/sh is not usable, provide a list of 1410 alternatives for use as .SHELL. 1411 We still have to mark some tests as broken, plus more if we end up 1412 with ksh as .SHELL. 1413 Issue a warning about skipped tests. 1414 1415 * boot-strap: leave TOOL_DIFF to configure 1416 1417 * configure.in: on SCO native cc is not usable, 1418 gcc is to be found in /usr/gnu/bin 1419 and while ancient is at least able to compile bmake. 1420 Thus we add /usr/gnu/bin to PATH if it exists, and later 1421 check if $CC would have been found via $PATH. 1422 If not we set CC to the full path of $CC. 1423 Also gnu diff is known to support -u, so if it exists use it. 1424 1425 * configure.in: move getopt to AC_REPLACE_FUNCS 1426 also add AC_C_INLINE - in an attempt to compile using 1427 native cc on SCO. 1428 1429 * configure.in: check for stresep as well as strsep, since we 1430 define the later to the former if necessary, and if we have to 1431 provide stresep we also need to provide a prototype. 1432 1433 * configure.in: we no longer need to worry about 1434 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 1435 1436 * make.h: make sure we have __RCSID 1437 1438 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 1439 can control it. 1440 14412021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 1442 1443 * VERSION: 20211020 1444 Merge with NetBSD make, pick up 1445 o confirm sync of unit-tests 1446 14472021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1448 1449 * configure.in: check if timezone Europe/Berlin is supported 1450 if not try UTC-1 1451 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 1452 symlink unit-tests -> ../unit-tests/obj so that 1453 unit-tests/Makefile.config is put in the right place. 1454 * refine filtering of .OBJDIR in unit-tests 1455 14562021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 1457 1458 * Fix unit-tests on Minix 3.2.0 1459 o job.c: do not punt if read of token pipe fails for EAGAIN. 1460 On Minix at least, we are not ready to read the childExitJob pipe 1461 when poll says we are. 1462 There should actually be no reason for this pipe to be 1463 non-blocking, but while that works fine on {Net,Free}BSD it 1464 breaks another test case on Minix. 1465 o unit-tests/Makefile: deal with variants of error messages 1466 and use of obj as .OBJDIR 1467 14682021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 1469 1470 * configure.in: add sigaction to AC_REPLACE_FUNCS 1471 we also need to check for sigaddset etc just for the benefit of 1472 sigact.c 1473 1474 * Add sigact.c as sigaction.c so this "just works". 1475 This should have been done back when bmake_signal started using 1476 sigaction (I only just noticed that sigact.c wasn't here ;-) 1477 Note: I no longer have access to any system where this would matter. 1478 14792021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 1480 1481 * VERSION (_MAKE_VERSION): 20211011 1482 1483 * Makefile: cleanup a little 1484 1485 * configure.in: check for sigsetmask 1486 14872021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1488 1489 * VERSION (_MAKE_VERSION): 20211001 1490 Merge with NetBSD make, pick up 1491 o reduce locations reducing text size 1492 o remove unnecessary const 1493 o cond.c: fix lint warning on i386 1494 do not allow unquoted 'left == right' after modifier ':?' 1495 o hash.c: fix build for DEBUG_HASH_LOOKUP 1496 o var.c: fix memory leak in error case of the ':?' modifier 1497 14982021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1499 1500 * VERSION (_MAKE_VERSION): 20210911 1501 Merge with NetBSD make, pick up 1502 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 1503 15042021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 1505 1506 * VERSION (_MAKE_VERSION): 20210906 1507 Merge with NetBSD make, pick up 1508 o more unit tests 1509 o lint cleanup 1510 o rename some functions to better fit purpose 1511 o for.c: cleanup - remove unnecessary optimization 1512 fix embedded newlines 1513 o parse.c: correct case for CVS/RCS 1514 15152021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 1516 1517 * VERSION (_MAKE_VERSION): 20210808 1518 Merge with NetBSD make, pick up 1519 o var.c: remove redundant initialization in ApplyModifier_Order 1520 1521 * mk/options.mk: issue warning for incorrect usage 1522 15232021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1524 1525 * var.c: use long for :On if we don't have a 64bit int type 1526 1527 * VERSION (_MAKE_VERSION): 20210803 1528 Merge with NetBSD make, pick up 1529 o rework varmod-order tests to avoid qsort instability 1530 o make.1: clarify :On entry 1531 15322021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1533 1534 * VERSION (_MAKE_VERSION): 20210731 1535 Merge with NetBSD make, pick up 1536 o fix some lint issues 1537 o more unit tests 1538 o var.c: rework of ApplyModifier_Order 1539 15402021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1541 1542 * util.c: add strto*l if HAVE_STRTO*L not defined 1543 1544 * VERSION (_MAKE_VERSION): 20210730 1545 Merge with NetBSD make, pick up 1546 o var.c: add :On and :Orn for numeric sort 1547 disabled if no 64bit type available. 1548 o _strtol.h: to implement strto*l functions 1549 15502021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1551 1552 * VERSION (_MAKE_VERSION): 20210704 1553 Merge with NetBSD make, pick up 1554 o unit-tests: fix some tests to be more portable 1555 - job-output-null not all shells do the same number of write calls 1556 - objdir-writable if TMPDIR is set; /tmp may not be usable 1557 15582021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1559 1560 * VERSION (_MAKE_VERSION): 20210701 1561 Merge with NetBSD make, pick up 1562 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1563 some tests just cannot work in some environments. 1564 o buf.c: simpler upper bound for length in Buf_AddInt 1565 o cond.c: fix grammar in error message for malformed conditional 1566 o for.c: prevent newline injection (from ${.newline}) in .for loops 1567 o var.c: use more practical data type in RegexReplace 1568 (avoid need for %zu) 1569 extract RegexReplace from ModifyWord_SubstRegex 1570 15712021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1572 1573 * VERSION (_MAKE_VERSION): 20210621 1574 Merge with NetBSD make, pick up 1575 o var.c: only report error for unmatched regex subexpression 1576 when linting (-dL) since we cannot tell when an unmatched 1577 subexpression is an expected result. 1578 o move unmatched regex subexpression tests to 1579 varmod-subst-regex.mk and enable strict (lint) mode 1580 15812021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1582 1583 * VERSION (_MAKE_VERSION): 20210616 1584 Merge with NetBSD make, pick up 1585 o more unit tests 1586 o cond.c: rename If_Eval to EvalBare 1587 improve function names for parsing conditions 1588 o job.c: fix error handling of targets that cannot be made 1589 o var.c: uncompress code in ApplyModifier_Unique 1590 15912021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1592 1593 * VERSION (_MAKE_VERSION): 20210518 1594 Merge with NetBSD make, pick up 1595 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1596 o job.c: Print -de error information when running multiple jobs 1597 15982021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1599 1600 * VERSION (_MAKE_VERSION): 20210420 1601 Merge with NetBSD make, pick up 1602 o use C99 bool type 1603 o convert VarEvalFlags back into an enum 1604 o cond.c: do not complain when skipping the condition 'no >= 10' 1605 o hash.c: avoid allocating memory for simple variable names 1606 o job.c: use distinct wording for writing to the shell commands file 1607 remove type name for the abort status in job handling 1608 rename PrintOutput to PrintFilteredOutput to avoid confusion 1609 o main.c: avoid double slash in name of temporary directory 1610 o var.c: use straight quotes for error 'Bad conditional expression' 1611 reduce memory allocations in the modifiers ':D' and ':U' 1612 rename members of ModifyWord_LoopArgs 1613 clean up pattern flags for the modifiers ':S' and ':C' 1614 reduce memory allocation and strlen calls in modifier ':from=to' 1615 in the ':Q' modifier, only allocate memory if necessary 1616 improve performance for LazyBuf 1617 remove redundant parameter from ParseVarnameLong 1618 migrate ParseModifierPart to use Substring 1619 avoid unnecessary calls to strlen when evaluating modifiers 1620 migrate ModifyWord functions to use Substring 1621 migrate handling of the modifier ':S,from,to,' to Substring 1622 reduce debug logging and memory allocation for ${:U...} 1623 reduce verbosity of the -dv debug logging for standard cases 1624 clean up debug logging for ':M' and ':N' 1625 disallow '$' in the variable name of the modifier ':@' 1626 simplify access to the name of an expression during evaluation 1627 16282021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1629 1630 * VERSION (_MAKE_VERSION): 20210330 1631 Merge with NetBSD make, pick up 1632 o replace enum bit-field with struct bit-field for VarEvalFlags 1633 o rename VARE_NONE to VARE_PARSE_ONLY 1634 o var.c: rename ApplyModifiersState to ModChain 1635 fix double varname expansion in the variable modifier '::=' 1636 change debug log for variable evaluation flags to lowercase 1637 16382021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1639 1640 * VERSION (_MAKE_VERSION): 20210314 1641 Merge with NetBSD make, pick up 1642 o var.c: avoid evaluating many modifiers in parse only mode 1643 in strict mode (-dL) many variable references are parsed twice, 1644 the first time just to report parse errors early, so we want to 1645 avoid side effects and wasted effort to the extent possible. 1646 16472021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1648 1649 * VERSION (_MAKE_VERSION): 20210226 1650 Merge with NetBSD make, pick up 1651 o remove freestanding freeIt variables 1652 link via FStr 1653 o var.c: restructure code in ParseVarname to target human readers 1654 improve error message for; 1655 bad modifier in variable expression 1656 unclosed modifier 1657 unknown modifier 1658 remove redundant parameter of ApplySingleModifier 1659 explain non-obvious code around indirect variable modifiers 1660 quote ':S' in error message about missing delimiter 1661 extract ParseModifier_Match into separate function 1662 add context information to error message about ':range' modifier 1663 add quotes around variable name in an error message 1664 reorder code in ModifyWords 1665 use more common parameter order for VarSelectWords 1666 make ModifyWord_Subst a little easier to understand 1667 do not expand variable name from the command line twice 1668 extract ExistsInCmdline from Var_SetWithFlags 1669 save a hash map lookup when defining a cmdline variable 1670 clean up VarAdd, Var_Delete, Var_ReexportVars 1671 use bit-shift expressions for VarFlags constants 1672 rename constants for VarFlags 1673 rename ExprDefined constants for debug logging 1674 rename ExprStatus to ExprDefined 1675 split parameters for evaluating variable expressions 1676 reduce redundant code around ModifyWords 1677 print error about failed shell command before overwriting variable 1678 clean up ValidShortVarname, ParseVarnameShort 1679 rename VarExprStatus to ExprStatus 1680 add functions for assigning the value of an expression 1681 rename ApplyModifiersState_Define to Expr_Define 1682 condense the code for parsing :S and :C modifiers 1683 16842021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1685 1686 * VERSION (_MAKE_VERSION): 20210206 1687 Merge with NetBSD make, pick up 1688 o unit-tests: use private TMPDIR to avoid errors from other users 1689 16902021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1691 1692 * VERSION (_MAKE_VERSION): 20210205 1693 Merge with NetBSD make, pick up 1694 o avoid strdup in mkTempFile 1695 o always use vfork 1696 o rename context and ctxt to scope 1697 o rename some VAR constants to SCOPE 1698 o Var_ functions, move the scope to the front 1699 o use shortcut functions Global_Set and Global_Append 1700 o add shortcut Global_Delete for deleting a global variable 1701 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1702 o compat.c: when exiting due to an error, print graph information 1703 o enum.c: remove overengineered Enum_ValueToString 1704 o make.c: remove unused INTERNAL flag 1705 remove unused return type of MakeBuildParent 1706 o parse.c: replace parse error "Need an operator" with better message 1707 o var.c: improve documentation about variable scopes 1708 rename Var_ValueDirect to GNode_ValueDirect 1709 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1710 merge SetVar into Var_SetWithFlags 1711 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1712 split Var_Append into Var_Append and Var_AppendExpand 1713 replace enum bit-set with bit-field 1714 o unit-tests/var-op-shell: use kill rather than kill -14 1715 which broke on darwin with recent update. 1716 17172021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1718 1719 * configure.in: check for sig_atomic_t and define it as 'int' 1720 if missing. 1721 1722 * VERSION (_MAKE_VERSION): 20210201 1723 Merge with NetBSD make, pick up 1724 o use sig_atomic_t for caught_sigchld 1725 17262021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1727 1728 * VERSION (_MAKE_VERSION): 20210130 1729 Merge with NetBSD make, pick up 1730 o more unit tests 1731 o convert SearchPath to struct 1732 o split Buf_Destroy into Buf_Done and Buf_DoneData 1733 o for.c: split For_Eval into separate functions 1734 rename struct For to struct ForLoop 1735 o job.c: do not create empty shell files in jobs mode 1736 rename JobOpenTmpFile to JobWriteShellCommands 1737 reduce unnecessary calls to waitpid 1738 o parse.c: in -dp mode, print stack trace with each diagnostic 1739 17402021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1741 1742 * VERSION (_MAKE_VERSION): 20210123 1743 Merge with NetBSD make, pick up 1744 o rename Dir_Expand to SearchPath_Expand 1745 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1746 o cond.c: fix debug output for comparison operators in conditionals 1747 o dir.c: split Dir_FindFile into separate functions 1748 17492021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1750 1751 * VERSION (_MAKE_VERSION): 20210120 1752 Merge with NetBSD make, pick up 1753 o fix some more lint nits 1754 o refine some unit tests for portability 1755 o cond.c: rework parsing 1756 17572021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1758 1759 * VERSION (_MAKE_VERSION): 20210110 1760 Merge with NetBSD make, pick up 1761 o fix lint warnings 1762 o consistently use boolean expressions in conditions 1763 17642021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1765 1766 * VERSION (_MAKE_VERSION): 20210108 1767 Merge with NetBSD make, pick up 1768 o job.c: back to polling token pipe if we want a token 1769 o main.c: always print 'stopped in' on first call 1770 The execption is if we bail because of an abort token 1771 in which case just exit 6. 1772 17732021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1774 1775 * VERSION (_MAKE_VERSION): 20210101 1776 Merge with NetBSD make, pick up 1777 o Happy New Year! 1778 o rename CmdOpts.lint to strict 1779 o exit 2 on technical errors 1780 o replace pointers in controlling conditions with booleans 1781 o replace global preserveUndefined with VARE_KEEP_UNDEF 1782 o compat.c: re-export variables from the actual make process 1783 if using vfork this is the effect anyway 1784 o cond.c: clean up VarParseResult constants 1785 o for.c: fix undefined behavior in SubstVarLong 1786 make control flow in SubstVarLong of .for loops more obvious 1787 clean up SubstVarShort in .for loops 1788 extract ForSubstBody from ForReadMore 1789 clean up ForReadMore 1790 simplify termination condition for .for loop 1791 add error handling for .for loop items 1792 job.c: re-export variables from the actual make process 1793 parse.c: remove mmap for loading files, only allow files < 1 GiB 1794 fix edge case in := with undefined in variable name 1795 skip variable expansion in ParseDependencyTargetWord 1796 var.c: split ExportVar into separate functions 1797 clean up code in extracted ExportVar functions 1798 remove dead code from ApplyModifiersIndirect 1799 split Var_Subst into easily understandable functions 1800 clean up VarParseResult constants 1801 18022020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1803 1804 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1805 18062020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1807 1808 * VERSION (_MAKE_VERSION): 20201222 1809 Merge with NetBSD make, pick up 1810 o make DEBUG macro return boolean 1811 o parse.c: fix assertion failure for files without trailing newline 1812 o var.c: allow .undef to undefine multiple variables at once 1813 remove excess newline from parse errors 1814 18152020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1816 1817 * VERSION (_MAKE_VERSION): 20201221 1818 Merge with NetBSD make, pick up 1819 o some unit-test updates 1820 18212020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1822 1823 * VERSION (_MAKE_VERSION): 20201220 1824 Merge with NetBSD make, pick up 1825 o more unit tests 1826 o return FStr from Var_Parse and Var_Value 1827 o spell nonexistent consistently 1828 o add str_basename to reduce duplicate code 1829 o compat.c: fix .ERROR_TARGET in compat -k mode 1830 extract InitSignals from Compat_Run 1831 extract UseShell from Compat_RunCommand 1832 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1833 o for.c: rename ForIterate to ForReadMore 1834 o hash.c: clean up hash function for HashTable 1835 o lst.c: rename Vector.priv_cap to cap 1836 o main.c: remove constant parameter from MakeMode 1837 o make.c: use symbolic time for 0 in Make_Recheck 1838 extract MakeChildren from MakeStartJobs 1839 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1840 fix error message for .info/.warning/.error without argument 1841 extract Var_Undef from ParseDirective 1842 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1843 rename mode constants for ParseGetLine to be more expressive 1844 reduce debugging details in Parse_SetInput 1845 fix line numbers in .for loops 1846 split ParseGetLine into separate functions 1847 fix garbled output for failed shell command 1848 var.c: remove redundant assignment in ApplyModifier_SysV 1849 error out on unknown variable modifiers at parse time 1850 remove wrong error message for indirect modifier in lint mode 1851 extract ApplySingleModifier from ApplyModifiers 1852 use FStr for memory management in Var_SetWithFlags 1853 extract SetVar from Var_SetWithFlags 1854 use FStr in VarNew 1855 extract string functions from ApplyModifier_To 1856 error out if .undef has not exactly 1 argument 1857 extract Var_DeleteVar from Var_Delete 1858 extract Var_Undef from ParseDirective 1859 clean up memory management for expanding variable expressions 1860 18612020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1862 1863 * avoid %zu 1864 1865 * lst.c: avoid anonymous union 1866 1867 * VERSION (_MAKE_VERSION): 20201212 1868 Merge with NetBSD make, pick up 1869 o more unit tests 1870 o inline Targ_Ignore and Targ_Silent 1871 o split JobFlags into separate fields 1872 o remove const from function parameters (left overs from refactoring) 1873 o eliminate boolean argument of Var_Export 1874 o make API of Buf_Init simpler 1875 o rename ParseRunOptions to ParseCommandFlags 1876 o replace *line with line[0] 1877 o compat.c: fix wrong exit status for multiple failed main targets 1878 refactor Compat_Run to show the error condition more clearly 1879 don't make .END if the main targets already failed (-k mode) 1880 fix exit status in -k mode if a dependency fails 1881 o for.c: clean up Buf_AddEscaped in .for loops 1882 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1883 make Job_Touch simpler 1884 refactor JobFinish 1885 rename Shell.exitFlag to errFlag 1886 move Job.xtraced to ShellWriter 1887 make printing of shell commands independent from the job 1888 rename shell flags in struct Shell 1889 extract JobOpenTmpFile from JobStart 1890 rename RunFlags to CommandFlags 1891 split various Job.* into separate fields 1892 rename commandShell to shell 1893 extract InitShellNameAndPath from Shell_Init 1894 replace signal handling macros with local functions 1895 replace macro MESSAGE with local function 1896 parse.c: error out on null bytes in makefiles 1897 error out on misspelled directives 1898 rename IFile.nextbuf to readMore 1899 fix undefined behavior in ParseEOF 1900 str.c: remove redundant call to strlen in Str_Words 1901 var.c: error out on misspelled .unexport-env 1902 error out on misspelled .export directives 1903 extract ExportVars from Var_Export 1904 extract ExportVarsExpand from Var_Export 1905 eliminate boolean argument of Var_Export 1906 fix undefined behavior when exporting ${:U } 1907 rename Var_ExportVars to Var_ReexportVars 1908 rename Var_Export1 to ExportVar 1909 19102020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1911 1912 * VERSION (_MAKE_VERSION): 20201206 1913 Merge with NetBSD make, pick up 1914 o more unit tests 1915 o inline macros for debug logging 1916 o use consistent variable names for list nodes 1917 o define constants for enum zero-values 1918 o dir.c: use fixed format for debug output of the directory cache 1919 remove Dir_InitDir 1920 o lst.c: inline Lst_Enqueue, Vector_Done 1921 o meta.c: remove unused parameter from meta_needed 1922 o parse.c: rename parse functions 1923 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1924 o targ.c: don't concatenate identifiers in Targ_PrintType 1925 o var.c: remove comment decoration 1926 extract UnexportVars from Var_UnExport 1927 extract GetVarnamesToUnexport from Var_UnExport 1928 extract UnexportEnv from Var_UnExport 1929 extract UnexportVar from Var_UnExport 1930 move CleanEnv to UnexportVars 1931 replace pointer comparisons with enum 1932 add FStr to var.c to make memory handling simpler 1933 use FStr in Var_UnExport 1934 move type definitions in var.c to the top 1935 extract FreeEnvVar from Var_Parse 1936 extract ShuffleStrings from ApplyModifier_Order 1937 19382020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1939 1940 * VERSION (_MAKE_VERSION): 20201130 1941 Merge with NetBSD make, pick up 1942 o add unit tests for META MODE 1943 o reduce memory allocation for dirSearchPath, GNode.parents, 1944 GNode.children, OpenDirs 1945 o reduce pointer indirection for GNode.cohorts and 1946 GNode.implicitParents 1947 o remove pointer indirection from GNode.commands 1948 o inline Lst_ForEachUntil in meta mode 1949 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1950 clean up memory management for CachedDirs 1951 fix the reference count of dotLast going negative 1952 add debug logging for OpenDirs_Done 1953 extract CacheNewDir from Dir_AddDir 1954 add debug logging for reference counting of CachedDir 1955 rename some Dir functions to SearchPath 1956 o job.c: rename some global variables 1957 o main.c: reduce memory allocation in ReadBuiltinRules 1958 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1959 CmdOpts.makefiles 1960 Add .MAKE.UID and .MAKE.GID 1961 o make.c: reduce memory allocation for/in toBeMade, 1962 Make_ProcessWait, Make_ExpandUse 1963 o meta.c: reduce memory allocation in meta_oodate 1964 o parse.c: reduce memory allocations for parsing dependencies and 1965 targets 1966 o suff.c: reduce memory allocation in suffix handling 1967 19682020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1969 1970 * VERSION (_MAKE_VERSION): 20201124 1971 Merge with NetBSD make, pick up 1972 o .MAKE.{UID,GID} represent uid and gid running make. 1973 o fix error handling for .BEGIN and .END dependency in -k mode 1974 o fix missing "Stop." after failed .END node in -k mode 1975 o use properly typed comparisons in boolean contexts 1976 o replace a few HashTable_CreateEntry with HashTable_Set 1977 o add HashSet type 1978 o compat.c: split Compat_Make into smaller functions 1979 extract DebugFailedTarget from Compat_RunCommand 1980 o dir.c: refactor Dir_UpdateMTime 1981 migrate CachedDir.files from HashTable to HashSet 1982 o make.c: add high-level API for GNode.made 1983 19842020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1985 1986 * VERSION (_MAKE_VERSION): 20201122 1987 Merge with NetBSD make, pick up 1988 o rename GNode.context to vars 1989 o suff.c: cleanup and refactor 1990 rename some functions and vars to better reflect usage 1991 add high-level API for CandidateSearcher 1992 o targ.c: add more debug logging for suffix handling 1993 o more unit tests 1994 o add debug logging for setting and resetting the main target 1995 19962020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1997 1998 * VERSION (_MAKE_VERSION): 20201117 1999 Merge with NetBSD make, pick up 2000 o fix some unit-tests when .SHELL is dash 2001 o rename Targ_NewGN to GNode_New 2002 o make some GNode functions const 2003 o main.c: call Targ_Init before Var_Init 2004 cleanup PrintOnError, getTmpdir and ParseBoolean 2005 o var.c: fix error message of failed :!cmd! modifier 2006 20072020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 2008 2009 * VERSION (_MAKE_VERSION): 20201114 2010 Merge with NetBSD make, pick up 2011 o replace a few HashTable_CreateEntry with HashTable_Set 2012 o clean up cached_stats 2013 o rename DEFAULT to defaultNode 2014 o remove redundant struct make_stat 2015 o cond.c: in lint mode, check for ".else <cond>" 2016 use bitset for IfState 2017 replace large switch with if-else in Cond_EvalLine 2018 o job.c: clean up JobExec, JobStart, JobDoOutput 2019 use stderr for error message about failed touch 2020 clean up Job_Touch 2021 replace macro DBPRINTF with JobPrintln 2022 rename JobState to JobStatus 2023 main.c: switch cache for realpath from GNode to HashTable 2024 clean up Fatal 2025 clean up InitDefSysIncPath 2026 use progname instead of hard-coded 'make' in warning 2027 rename Main_SetVarObjdir to SetVarObjdir 2028 make.1: document the -S option 2029 make.c: fix debug output for GNode details 2030 use symbolic names in debug output of GNodes 2031 20322020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 2033 2034 * configure.in: fix --with-force-machine-arch 2035 2036 * VERSION (_MAKE_VERSION): 20201112 2037 Merge with NetBSD make, pick up 2038 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 2039 checks in InitObjdir. Explicit .OBJDIR target always allows 2040 read-only directory. 2041 o cond.c: clean up Cond_EvalLine 2042 20432020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 2044 2045 * VERSION (_MAKE_VERSION): 20201111 2046 Merge with NetBSD make, pick up 2047 o more unit-tests 2048 o style cleanup 2049 remove redundant parentheses from sizeof operator 2050 replace character literal 0 with '\0'. 2051 replace pointer literal 0 with NULL. 2052 remove redundant parentheses. 2053 replace (expr & mask) == 0 with !(expr & mask). 2054 use strict typing in conditions of the form !var 2055 o rename Make_OODate to GNode_IsOODate 2056 o rename Make_TimeStamp to GNode_UpdateYoungestChild 2057 o rename Var_Set_with_flags to Var_SetWithFlags 2058 o rename dieQuietly to shouldDieQuietly 2059 o buf.c: make API of Buf_Init simpler 2060 o compat.c: clean up Compat_Make, Compat_RunCommand, 2061 CompatDeleteTarget and CompatInterrupt 2062 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 2063 clean up CondParser_Comparison 2064 o main.c: rename getBoolean and s2Boolean 2065 rename MAKEFILE_PREFERENCE for consistency 2066 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 2067 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 2068 replace emptyString with allocated empty string 2069 error out on unclosed expressions after the colon 2070 20712020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 2072 2073 * VERSION (_MAKE_VERSION): 20201101 2074 Merge with NetBSD make, pick up 2075 o negate NoExecute to GNode_ShouldExecute 2076 o job.c: rename JobMatchShell to FindShellByName 2077 extract EscapeShellDblQuot from JobPrintCommand 2078 extract ParseRunOptions from JobPrintCommand 2079 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 2080 treat malformed :range, :ts and :[...] as errors 2081 add tests for the variable modifiers :[words] and :range 2082 20832020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 2084 2085 * VERSION (_MAKE_VERSION): 20201031 2086 Merge with NetBSD make, pick up 2087 o format #include directives consistently 2088 o do not look up local variables like .TARGET anywhere else 2089 o main.c: Main_SetObjdir is first called for curdir which may be 2090 readonly 2091 reduce the scope where recursive expressions are detected 2092 remove redundant :tl from getBoolean 2093 clean up mkTempFile 2094 o meta.c: simplify memory allocation in meta_create and meta_oodate 2095 o parse.c: extract loadedfile_mmap from loadfile 2096 o trace.c: document possible undefined behavior with .CURDIR 2097 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 2098 rename ismeta to is_shell_metachar 2099 remove debug logging for the :Q variable modifier 2100 rename VarIsDynamic to VarnameIsDynamic 2101 use consistent parameter order in varname parsing functions 2102 extract ParseVarnameLong from Var_Parse 2103 extract ParseVarnameShort from Var_Parse 2104 fix type of ParseModifierPart parameter delim 2105 extract IsEscapedModifierPart from ParseModifierPart 2106 clean up ModifyWords 2107 add test for combining the :@ and :? variable modifiers 2108 21092020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 2110 2111 * VERSION (_MAKE_VERSION): 20201030 2112 Merge with NetBSD make, pick up 2113 o change char * to void * in Var_Value 2114 o make iterating over HashTable simpler 2115 o rename VAR_CMD to VAR_CMDLINE 2116 o cond.c: clean up is_separator 2117 fix parse error in string literal in conditional 2118 o main.c: do not use objdir that is not writable 2119 in lint mode, exit with error status on errors 2120 o parse.c: clean up StrContainsWord 2121 fix out-of-bounds pointer in ParseTrackInput 2122 o var.c: rename Str_SYSVMatch and its parameters 2123 remove unsatisfiable conditions in Var_Set_with_flags 2124 document where the variable name is expanded 2125 fix documentation for VARP_SUB_ONE 2126 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 2127 document VAR_READONLY 2128 prevent appending to read-only variables 2129 extract MayExport from Var_Export1 2130 remove redundant evaluations in VarFind 2131 replace VarFindFlags with a simple Boolean 2132 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 2133 21342020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 2135 2136 * VERSION (_MAKE_VERSION): 20201028 2137 Merge with NetBSD make, pick up 2138 o rename defIncPath to defSysIncPath 2139 o initialize all CmdOpts fields 2140 o lst.c: inline Vector_Get 2141 o main.c: refactor main extract 2142 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 2143 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 2144 InitDefIncPath,CmdOpts_Init,UnlimitFiles 2145 o parse.c: merge curFile into includes 2146 rename predecessor to order_pred 2147 sort ParseSpecial alphabetically 2148 remove unused, undocumented .NOEXPORT 2149 rename ParseSpecial enum values consistently 2150 rename some fields of struct IFile 2151 21522020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 2153 2154 * VERSION (_MAKE_VERSION): 20201026 2155 Merge with NetBSD make, pick up 2156 o group the command line options and arguments into a struct 2157 o rename GNode.cmgn to youngestChild 2158 o rename hash functions to identify the type name 2159 o negate OP_NOP and rename it to GNode_IsTarget 2160 o add GNode_Path to access the path of a GNode 2161 o remove macros MIN and MAX 2162 o remove unused Lst_Find and Lst_FindFrom 2163 o arch.c: and make Arch_FindLib simpler 2164 clean up code layout 2165 make Arch_ParseArchive simpler 2166 o cond.c: inline CondFindStrMatch into FuncMake 2167 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 2168 omit trailing space in debug output for expanding file patterns 2169 refactor DirMatchFiles 2170 document that the SearchPath of Dir_FindFile may be NULL 2171 remove UNCONST from Dir_Expand 2172 inline DirFindName 2173 o for.c: clean up code for handling .for loops 2174 o hash.c: print hash in debug log with fixed width 2175 clean up hash table functions 2176 reduce amount of string hashing 2177 o job.c: refactor JobDeleteTarget 2178 use proper enum constants for aborting 2179 convert result of JobStart from macros to enum 2180 convert abort reason macros to enum 2181 rework Job_CheckCommands to reduce indentation 2182 rename Shell fields 2183 add field names in declaration of DEFSHELL_CUSTOM 2184 convert JobState and JobFlags to enum types 2185 move handling of the "..." command to JobPrintCommands 2186 o lst.c: clean up 2187 refactor LstNodeNew 2188 remove Lst_Open, Lst_Next, Lst_Close 2189 remove code for circular lists from Lst_Next 2190 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 2191 /dev/null or anything starting with "no" 2192 convert macros for debug flags into enum 2193 o make.c: inline Lst_Copy in Make_ExpandUse 2194 o meta.c: inline Lst_Find in meta_oodate 2195 make Lst_RemoveIf simpler in meta_oodate 2196 o parse.c: convert error level for Parse_Error to an enum 2197 o suff.c: properly terminate debug output with newline 2198 add more details to DEBUG_SRC log 2199 replace Dir_CopyDir with Dir_CopyDirSearchPath 2200 don't modify GNode name while rebuilding the suffix graph 2201 o var.c: reduce duplicate code in VarFind 2202 22032020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 2204 2205 * VERSION (_MAKE_VERSION): 20201022 2206 Merge with NetBSD make, pick up 2207 o more refactoring and simplification to reduce code size 2208 o var.c: extract CanonicalVarname from VarFind 2209 o make.c: extract UpdateImplicitParentsVars from Make_Update 2210 o main.c: extract PrintVar from doPrintVars 2211 extract HandlePWD from main 2212 o lst.c: inline simple Lst getters 2213 remove unused Lst_ForEach 2214 o job.c: move struct Shell from job.h to job.c 2215 o more unit tests 2216 22172020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 2218 2219 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 2220 22212020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 2222 2223 * VERSION (_MAKE_VERSION): 20201018 2224 Merge with NetBSD make, pick up 2225 o remove USE_IOVEC 2226 o rename some Hash_* apis to Hash* 2227 o replace execError with execDie 2228 o rename Lst_Init to Lst_New 2229 o add tags to enum types 2230 o rename Stack to Vector 2231 o parse.c: more refactoring 2232 o unit-tests: make some tests use line buffered stdout 2233 o unit-tests/Makefile: in meta mode do not make all tests depend on 2234 Makefile, it isn't necessary. 2235 22362020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 2237 2238 * main.c: check for CTL_HW being defined. 2239 * unit-tests/Makefile: ensure export tests output are POSIX compliant 2240 disable opt-debug-jobs test until it works on ubuntu 2241 2242 * VERSION (_MAKE_VERSION): 20201010 2243 Merge with NetBSD make, pick up 2244 o dir.c: remove pathname limit for Dir_FindHereOrAbove 2245 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 2246 o main.c: extract init_machine and init_machine_arch from main 2247 allow to disable debug logging options 2248 o parse.c: enable format string truncation warnings 2249 extract parsing of sources from ParseDoDependency 2250 split ParseDoSrc into smaller functions 2251 hide implementation details from Parse_DoVar 2252 clean up parsing of variable assignments 2253 split Parse_DoVar into manageable pieces 2254 don't modify the given line during Parse_DoVar 2255 fix out-of-bounds memory access in Parse_DoVar 2256 fix parsing of the :sh assignment modifier 2257 o var.c: rework memory allocation for the name of variables 2258 extract ApplyModifier_Literal into separate function 2259 in lint mode, reject modifiers without delimiter 2260 do not export variable names starting with '-' 2261 o fix double-free bug in -DCLEANUP mode 2262 o more cleanup to enable higher warnings level 2263 o more unit tests 2264 22652020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 2266 2267 * VERSION (_MAKE_VERSION): 20201002 2268 Merge with NetBSD make, pick up 2269 o dir.c: use hash table for looking up open directories by name 2270 o main.c: clean up option handling 2271 o parse.c: add missing const for Parse_AddIncludeDir 2272 o var.c: ApplyModifier_To, update pp in each branch 2273 o remove redundant function prototypes 2274 o more unit tests 2275 22762020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 2277 2278 * VERSION (_MAKE_VERSION): 20201001 2279 Merge with NetBSD make, pick up 2280 o compat.c: comment about "..." 2281 22822020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 2283 2284 * VERSION (_MAKE_VERSION): 20200930 2285 Merge with NetBSD make, pick up 2286 o job.c: split Job.jobPipe into 2 separate fields 2287 replace Lst_Open with direct iteration 2288 o lst.c: remove redundant assertions 2289 o targ.c: replace Lst_Open with direct iteration 2290 o var.c: fix bug in evaluation of indirect variable modifiers 2291 extract ApplyModifier_Quote into separate function 2292 o make debug logging simpler 2293 22942020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 2295 2296 * VERSION (_MAKE_VERSION): 20200927 2297 Merge with NetBSD make, pick up 2298 o parse.c: ensure parse errors result in 'stopped in' message. 2299 o compat.c: make parameter of Compat_RunCommand const 2300 o main.c: extract InitVarTarget from main 2301 o parse.c: rename ParseFinishLine to FinishDependencyGroup 2302 refactor ParseDoDependency 2303 o var.c: Var_Subst no longer returns string result 2304 rename Var_ParsePP back to Var_Parse 2305 in lint mode, improve error handling for undefined variables 2306 extract ParseVarname from Var_Parse 2307 o rename Lst_ForEach to Lst_ForEachUntil 2308 o inline Lst_ForEachUntil in several cases 2309 o clean up API for finding and creating GNodes 2310 o fix assertion failure in -j mode with .END node 2311 o inline and remove LstNode_Prev and LstNode_Next 2312 o use fine-grained type names for lists and their nodes 2313 o more unit tests 2314 23152020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 2316 2317 * VERSION (_MAKE_VERSION): 20200911 2318 Merge with NetBSD make, pick up 2319 o cond.c: split EvalComparison into smaller functions 2320 reorder parameters of condition parsing functions 2321 reduce code size in CondParser_Eval 2322 rename CondGetString to CondParser_String 2323 add CondLexer_SkipWhitespace 2324 group the condition parsing state into a struct 2325 in CondGetString, replace repeated Buf_Add with Buf_AddStr 2326 o migrate Var_Parse to Var_ParsePP 2327 o add wrappers around ctype.h functions 2328 o lst.c: use a stack instead of a list for the nested include path 2329 o more unit tests 2330 23312020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 2332 2333 * make-bootstrap.sh.in: adjust object list 2334 23352020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 2336 2337 * VERSION (_MAKE_VERSION): 20200902 2338 Merge with NetBSD make, pick up 2339 o use make_stat to ensure no confusion over valid fields 2340 returned by cached_stat 2341 o var.c: make VarQuote const-correct 2342 o add unit tests for .for 2343 23442020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 2345 2346 * VERSION (_MAKE_VERSION): 20200901 2347 Merge with NetBSD make, pick up 2348 o rename Hash_Table fields 2349 o make data types in Dir_HasWildcards more precise 2350 23512020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 2352 2353 * VERSION (_MAKE_VERSION): 20200831 2354 Merge with NetBSD make, pick up 2355 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 2356 o lst.c: Lst_Open renable assert that list isn't open 2357 o unit test for .TARGET dependent flags 2358 o var.c: fix aliasing bug in VarUniq 2359 o more unit tests for :u 2360 23612020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 2362 2363 * VERSION (_MAKE_VERSION): 20200830 2364 Merge with NetBSD make, pick up 2365 o allow for strict type checking for Boolean 2366 o Var_Parse never returns NULL 2367 o Var_Subst never returns NULL 2368 o Lst_Find now takes boolean match function 2369 o rename Lst_Memeber to Lst_FindDatum 2370 o rename LstNode functions to match their type 2371 o rename GNode.iParents to implicitParents 2372 o fix assertion failure for .SUFFIXES in archives 2373 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 2374 remove unreachable code from CompatRunCommand 2375 o main.c: simplify getBoolean 2376 o stc.c: replace brk_string with simpler Str_Words 2377 o suff.c: add debug macros 2378 23792020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 2380 2381 * VERSION (_MAKE_VERSION): 20200828 2382 Merge with NetBSD make, pick up 2383 o lst.c: inline LstIsValid and LstNodeIsValid 2384 o remove trailing S from Lst function names after migration complete 2385 o more comment cleanup/clarification 2386 o suff.c: clean up suffix handling 2387 o more unit tests 2388 23892020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 2390 2391 * VERSION (_MAKE_VERSION): 20200826 2392 Merge with NetBSD make, pick up 2393 o enum.c: distinguish between bitsets containing flags and 2394 ordinary enums 2395 o var.c: fix error message for ::!= modifier with shell error 2396 o fix bugs in -DCLEANUP mode 2397 23982020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 2399 2400 * VERSION (_MAKE_VERSION): 20200824 2401 Merge with NetBSD make, pick up 2402 o in debug mode, print GNode details in symbols 2403 24042020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 2405 2406 * VERSION (_MAKE_VERSION): 20200823 2407 Merge with NetBSD make, pick up 2408 o lst.c: more asserts, 2409 make args to Lst_Find match others. 2410 o var.c: pass flags to VarAdd 2411 o arch.c: use Buffer 2412 o str.c: brk_string return size_t for nwords 2413 o more unit tests 2414 24152020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 2416 2417 * VERSION (_MAKE_VERSION): 2418 Merge with NetBSD make, pick up 2419 o var.c: support for read-only variables eg .SHELL 2420 being the shell used to run scripts. 2421 o lst.c: more simplification 2422 o more documentation and style cleanup 2423 o more unit tests 2424 o ensure unit-test/Makefile is run by TEST_MAKE 2425 o reduce duplication of header inclusion 2426 24272020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 2428 2429 * VERSION (_MAKE_VERSION): 20200821 2430 Merge with NetBSD make, pick up 2431 o lst.c: revert invalid assertion - but document it 2432 o dir.c: split Dir_Init into two functions 2433 24342020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 2435 2436 * lst.c: needs inttypes.h on Linux 2437 2438 * VERSION (_MAKE_VERSION): 20200820 2439 Merge with NetBSD make, pick up 2440 o make.1: clarify some passages 2441 o var.c: more cleanup, clarify comments 2442 o make_malloc.c: remove unreachable code 2443 o cond.c: make CondGetString easier to debug 2444 o simplify list usage 2445 o unit-tests: more 2446 24472020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 2448 2449 * VERSION (_MAKE_VERSION): 20200816 2450 Merge with NetBSD make, pick up 2451 o refactor unit-tests to be more fine grained 2452 not all tests moved yet 2453 24542020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 2455 2456 * VERSION (_MAKE_VERSION): 20200814 2457 Merge with NetBSD make, pick up 2458 o more str_concat variants 2459 o more enums for flags 2460 o var.c: cleanup for higher warnings level 2461 24622020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 2463 2464 * VERSION (_MAKE_VERSION): 20200810 2465 Merge with NetBSD make, pick up 2466 o more unit tests 2467 o general comment and style cleanup 2468 24692020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 2470 2471 * VERSION (_MAKE_VERSION): 20200808 2472 Merge with NetBSD make, pick up 2473 o enum.[ch]: streamline, enums for use in flags and debug output 2474 o cond.c: cleanup 2475 o var.c: reduce duplicate code for modifiers 2476 debug logging for Var_Parse 2477 more detailed debug output 2478 o more unit tests 2479 24802020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 2481 2482 * unit-tests/Makefile: -r for recursive and include Makefile.inc 2483 so I can run tests in meta mode 2484 supress extra noise if in meta mode 2485 2486 * VERSION (_MAKE_VERSION): 20200806 2487 Merge with NetBSD make, pick up 2488 o parse.c: remove VARE_WANTRES for LINT 2489 we just want to check parsing (for now). 2490 24912020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 2492 2493 * VERSION (_MAKE_VERSION): 20200805 2494 Merge with NetBSD make, pick up 2495 o make.1: Rework the description of dependence operators 2496 24972020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 2498 2499 * VERSION (_MAKE_VERSION): 20200803 2500 Merge with NetBSD make, pick up 2501 o revert some C99 usage, for max portability 2502 o unit-tests/lint 2503 25042020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 2505 2506 * VERSION (_MAKE_VERSION): 20200802 2507 Merge with NetBSD make, pick up 2508 o more unit tests 2509 25102020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 2511 2512 * Remove NetBSD specific plumbing from unit-tests/Makefile 2513 2514 * VERSION (_MAKE_VERSION): 20200801 2515 Merge with NetBSD make, pick up 2516 o make Var_Value return const 2517 o size_t for buf sizes 2518 o optimize some buffer operations - avoid strlen 2519 25202020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 2521 2522 * VERSION (_MAKE_VERSION): 20200731 2523 Merge with NetBSD make, pick up 2524 o var.c: fix undefinded behavior for incomplete :t modifier 2525 fixes unit-test/moderrs on Ubuntu 2526 o parse.c: When parsing variable assignments other than := 2527 if DEBUG(LINT) test substition of value, so we get a file and 2528 line number in the resulting error. 2529 o dir.c: fix parsing of nested braces in dependency lines 2530 add unit-tests 2531 25322020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 2533 2534 * VERSION (_MAKE_VERSION): 20200730 2535 Merge with NetBSD make, pick up 2536 o var.c: minor cleanup 2537 o unit-tests: more tests to improve code coverage 2538 25392020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 2540 2541 * VERSION (_MAKE_VERSION): 20200728 2542 Merge with NetBSD make, pick up 2543 o var.c: more optimizations 2544 25452020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 2546 2547 * VERSION (_MAKE_VERSION): 20200726 2548 Merge with NetBSD make, pick up 2549 o collapse lsd.lib into lst.c - reduce code size and allow inlining 2550 o lots of function comment updates 2551 o var.c: more optimizations 2552 o make return of Var_Parse const 2553 25542020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2555 2556 * VERSION (_MAKE_VERSION): 20200720 2557 Merge with NetBSD make, pick up 2558 o DEBUG_HASH report stats at end and tone down the noise 2559 o var.c: each flag type gets its own prefix. 2560 move SysV string matching to var.c 2561 make ampersand in ${VAR:from=to&} an ordinary character 2562 cleanup and simplify implementation of modifiers 2563 o make.1: move documentation for assignment modifiers 2564 25652020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2566 2567 * VERSION (_MAKE_VERSION): 20200718 2568 Merge with NetBSD make, pick up 2569 o DEBUG_HASH to see how well the hash tables are working 2570 25712020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2572 2573 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2574 25752020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2576 2577 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2578 2579 * VERSION (_MAKE_VERSION): 20200710 2580 Merge with NetBSD make, pick up 2581 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2582 o meta.c: target flagged .META is out-of-date if meta file missing 2583 25842020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2585 2586 * VERSION (_MAKE_VERSION): 20200709 2587 Merge with NetBSD make, pick up 2588 o cond.c: fix for compare_expression when doEval=0 2589 o unit-tests/Makefile: rework 2590 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2591 25922020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2593 2594 * VERSION (_MAKE_VERSION): 20200704 2595 Merge with NetBSD make, pick up 2596 (most of this by rillig@) 2597 o lots of style and white-space cleanup 2598 o lots more unit tests for variable modifiers 2599 o simplified description of some functions 2600 o str.c: refactor Str_Match 2601 o var.c: debugging output for :@ 2602 constify VarModify parameter 2603 fix :hash modifier on 16-bit platforms 2604 remove unnecessary forward declarations 2605 refactor ApplyModifier_SysV to have less indentation 2606 simplify code for :E and :R 2607 clean up code for :H and :T 2608 refactor ApplyModifiers 2609 2610 * var.c: we need stdint.h on some platforms to get uint32_t 2611 * unit-test/Makefile: we need to supress the specific error 2612 for RE substitution error in modmisc, since it varies accross 2613 different OS. 2614 26152020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2616 2617 * VERSION (_MAKE_VERSION): 20200702 2618 Merge with NetBSD make, pick up 2619 o var.c: more improvements to avoiding unnecessary evaluation 2620 use enums for flags 2621 o remove flags arg to Var_Set which outside of var.c is always 0 2622 26232020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2624 2625 * VERSION (_MAKE_VERSION): 20200701 2626 Merge with NetBSD make, pick up 2627 o var.c: with change to cond.c; ensure that nested variables 2628 within a variable name are expanded. 2629 o unit-tests/varmisc.mk: test for nested varname 2630 26312020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2632 2633 * VERSION (_MAKE_VERSION): 20200629 2634 Merge with NetBSD make, pick up 2635 o cond.c: do not eval unnecessary terms of conditionals. 2636 26372020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2638 2639 * VERSION (_MAKE_VERSION): 20200625 2640 Merge with NetBSD make, pick up 2641 o meta.c: report error if lseek in filemon_read fails 2642 26432020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2644 2645 * VERSION (_MAKE_VERSION): 20200622 2646 Merge with NetBSD make, pick up 2647 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2648 26492020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2650 2651 * VERSION (_MAKE_VERSION): 20200619 2652 Merge with NetBSD make, pick up 2653 o str.c: performance improvement for Str_Match for multiple '*' 2654 o dieQuietly: supress the failure output from make 2655 when failing node is a sub-make or a sibling failed. 2656 This cuts down greatly on unhelpful noise at the end of 2657 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2658 26592020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2660 2661 * FILES: add LICENSE to appease some packagers. 2662 This is an attempt to fairly represent the license on almost 2663 200 files, which are almost all BSD-3-Clause 2664 The few exceptions being more liberal. 2665 2666 * VERSION (_MAKE_VERSION): 20200610 2667 Merge with NetBSD make, pick up 2668 o unit test for :Or 2669 26702020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2671 2672 * VERSION (_MAKE_VERSION): 20200606 2673 Merge with NetBSD make, pick up 2674 o make.1: cleanup 2675 2676 * Makefile: fix depends for main.o which broke MAKE_VERSION 2677 26782020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2679 2680 * VERSION (_MAKE_VERSION): 20200605 2681 Merge with NetBSD make, pick up 2682 o dir.c: cached_stats - don't confuse stat and lstat results. 2683 o var.c: add :Or for reverse sort. 2684 26852020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2686 2687 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2688 also if --with-filemon= specifies path to filemon.h 2689 set use_filemon=dev 2690 * dirname.c: remove include of namespace.h 2691 26922020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2693 2694 * VERSION (_MAKE_VERSION): 20200517 2695 Merge with NetBSD make, pick up 2696 o modified dollar tests to avoid shell dependencies 2697 o new tests for .INCLUDEFROM 2698 26992020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2700 2701 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2702 to not depend so much on shell behavior 2703 27042020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2705 2706 * VERSION (_MAKE_VERSION): 20200510 2707 Merge with NetBSD make, pick up 2708 o unit test for dollar handling 2709 27102020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2711 2712 * VERSION (_MAKE_VERSION): 20200506 2713 Merge with NetBSD make, pick up 2714 o str.c: empty string does not match % pattern 2715 plus unit-test changes 2716 27172020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2718 2719 * VERSION (_MAKE_VERSION): 20200504 2720 May the 4th be with you 2721 Merge with NetBSD make, pick up 2722 o var.c: import handling of old sysV style modifier using '%' 2723 o str.c: refactor brk_string 2724 o unit-tests: add test case for lazy conditions 2725 27262020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2727 2728 * VERSION (_MAKE_VERSION): 20200418 2729 2730 * configure.in: use_makefile=no for Cygwin et al. 2731 case insensitive filesystems just don't work if both 2732 makefile and Makefile exist. 2733 NOTE: bmake does not support Cygwin and likely never will, 2734 but if brave souls want to try it - help them out. 2735 27362020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2737 2738 * VERSION (_MAKE_VERSION): 20200402 2739 Merge with NetBSD make, pick up 2740 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2741 a blank command is perfectly valid. 2742 27432020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2744 2745 * VERSION (_MAKE_VERSION): 20200330 2746 Merge with NetBSD make, pick up 2747 o make.h: extern debug_file 2748 27492020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2750 2751 * VERSION (_MAKE_VERSION): 20200318 2752 Merge with NetBSD make, pick up 2753 o meta.c: meta_oodate, check for corrupted meta file 2754 earlier and more often. 2755 27562020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2757 2758 * VERSION (_MAKE_VERSION): 20200220 2759 27602020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2761 2762 * boot-strap: unset MAKEFLAGS 2763 27642020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2765 2766 * VERSION (_MAKE_VERSION): 20200212 2767 * meta.c: meta_compat_parent check for USE_FILEMON 2768 patch from Soeren Tempel 2769 27702020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2771 2772 * VERSION: 20200205 2773 Merge with NetBSD make, pick up 2774 o meta.c: fix compat mode, need to call meta_job_output() 2775 o job.c: extra fds for meta mode not needed if using filemon_dev 2776 27772020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2778 2779 * VERSION: 20200122 2780 Merge with NetBSD make, pick up 2781 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2782 returns FALSE. 2783 27842020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2785 2786 * VERSION: 20200121 2787 Merge with NetBSD make, pick up 2788 o filemon/filemon_{dev,ktrace}.c: allow selection of 2789 filemon implementation. filemon_dev.c uses the kernel module 2790 while filemon_ktrace.c leverages the fktrace api available in 2791 NetBSD. filemon_ktrace.c can hopefully form the basis for 2792 adding support for other tracing mechanisms such as strace on 2793 Linux. 2794 o meta.c: when target is out-of-date per normal make rules 2795 record value of .OODATE in meta file. 2796 27972019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2798 2799 * VERSION: 20190926 2800 Merge with NetBSD make, pick up 2801 o parse.c: don't pass NULL to realpath(3) 2802 some versions cannot handle it. 2803 28042019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2805 2806 * VERSION: 20190409 2807 Merge with NetBSD make, pick up 2808 o parse.c: ParseDoDependency: free paths rather than assert 2809 28102018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2811 2812 * VERSION: 20181222 2813 2814 * configure.in: add --without-makefile to avoid generating 2815 makefile and make-bootstrap.sh 2816 2817 * include Makefile.inc if it exists 2818 2819 * Use Makefile and Makefile.config.in in unit-tests 2820 so we can use just: make obj && make && make test 2821 when bmake is already available. 2822 We add --without-makefile to CONFIGURE_ARGS in this case. 2823 2824 * tweak bsd.after-import.mk (captures Makefile.config etc 2825 after import to FreeBSD for example) to cope with all the above. 2826 28272018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2828 2829 * VERSION: 20181221 2830 Merge with NetBSD make, pick up 2831 o parse.c: ParseVErrorInternal use .PARSEDIR 2832 and apply if relative, and then use .PARSEFILE 2833 for consistent result. 2834 28352018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2836 2837 * VERSION: 20181220 2838 Merge with NetBSD make, pick up 2839 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2840 is relative 2841 o var.c: avoid SEGFAULT in .unexport-env 2842 when MAKELEVEL is not set 2843 28442018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2845 2846 * VERSION: 20181216 2847 Merge with NetBSD make, pick up 2848 o fix for unit-tests/varquote.mk on Debian 2849 28502018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2851 2852 * VERSION: 20180919 2853 Merge with NetBSD make, pick up 2854 o var.c: add :q 2855 o dir.c: cleanup caching of stats 2856 28572018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2858 2859 * Makefile.config.in: use += where it makes sense. 2860 28612018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2862 2863 * VERSION: 20180512 2864 Merge with NetBSD make, pick up 2865 o job.c: skip polling job token pipe 2866 28672018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2868 2869 * VERSION: 20180405 2870 Merge with NetBSD make, pick up 2871 o parse.c: be more cautious about detecting depenency line 2872 rather than sysV style include. 2873 28742018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2875 2876 * VERSION: 20180222 2877 Merge with NetBSD make, pick up 2878 o parse.c: avoid calling sysconf for every call to loadfile 2879 28802018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2881 2882 * VERSION: 20180218 2883 Merge with NetBSD make, pick up 2884 o var.c: Var_Set handle NULL value anytime. 2885 28862018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2887 2888 * VERSION: 20180212 2889 Merge with NetBSD make, pick up 2890 o parse.c: do not treat .info as warning with -W 2891 28922017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2893 2894 * VERSION: 20171207 2895 Merge with NetBSD make, pick up 2896 o var.c: Var_Append use Var_Set if var not previously set 2897 so that VAR_CMD is handled correctly. 2898 Add a suitable unit-test. 2899 29002017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2901 2902 * VERSION (_MAKE_VERSION): 20171126 2903 2904 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2905 since AC_TRY_COMPILE puts input inside main() 2906 which upsets modern compilers. 2907 29082017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2909 2910 * VERSION: 20171118 2911 Merge with NetBSD make, pick up 2912 o var.c: do not append to variable set on command line 2913 add unit-test to catch this. 2914 29152017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2916 2917 * VERSION: 20171028 2918 Merge with NetBSD make, pick up 2919 o main.c: ignore empty MAKEOBJDIR 2920 2921 * Makefile.config.in: 2922 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2923 29242017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2925 2926 * VERSION: 20171005 2927 2928 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2929 consistent result on some platforms. 2930 29312017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2932 2933 * machine.sh: entry for AIX 2934 29352017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2936 2937 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2938 to a file that can be included by configure as well as make. 2939 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2940 29412017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2942 2943 * Makefile (_MAKE_VERSION): 20170810 2944 Merge with NetBSD make, pick up 2945 o meta.c: if target is in subdir we only need subdir name in 2946 meta_name. 2947 29482017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2949 2950 * Makefile (_MAKE_VERSION): 20170720 2951 Merge with NetBSD make, pick up 2952 o compat.c: pass SIGINT etc onto child and wait for it to exit 2953 before we self-terminate. 2954 29552017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2956 2957 * Makefile (_MAKE_VERSION): 20170711 2958 forgot to update after merge on 20170708 ;-) 2959 o main.c: refactor to reduce size of main function. 2960 add -v option to always fully expand values. 2961 o meta.c: ensure command output in meta file has ending newline 2962 even when filemon not being used. 2963 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2964 pathname via ':L' since any ':' in pathname breaks that. 2965 Instead set a '${.p.}' to pathname in the target context and 2966 use that. 2967 29682017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2969 2970 * Makefile (_MAKE_VERSION): 20170510 2971 Merge with NetBSD make, pick up 2972 o main.c: Main_SetObjdir: ensure buf2 is in scope 2973 29742017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2975 2976 * Makefile (_MAKE_VERSION): 20170505 2977 see mk/ChangeLog 2978 29792017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2980 2981 * parse.c: not everyone has stdint.h 2982 29832017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2984 2985 * Makefile (_MAKE_VERSION): 20170501 2986 see mk/ChangeLog 2987 29882017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2989 2990 * Makefile (_MAKE_VERSION): 20170421 2991 Merge with NetBSD make, pick up 2992 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2993 29942017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2995 2996 * Makefile (_MAKE_VERSION): 20170420 2997 Merge with NetBSD make, pick up 2998 o main.c: only use -C arg "as is" if it contains no 2999 relative component. 3000 30012017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3002 3003 * Makefile (_MAKE_VERSION): 20170418 3004 Merge with NetBSD make, pick up 3005 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 3006 30072017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 3008 3009 * Makefile (_MAKE_VERSION): 20170417 3010 Merge with NetBSD make, pick up 3011 o fixes a number of coverity complaints 3012 - check return value of fseek, fcntl 3013 - plug memory leak in Dir_FindFile, Var_LoopExpand, 3014 JobPrintCommand, ParseTraditionalInclude 3015 - use bmake_malloc() where NULL is not tollerated 3016 - use MAKE_ATTR_UNUSED rather that kludges like 3017 return(unused ? 0 : 0) 3018 - use purge_cached_realpaths() rather than abuse cached_realpath() 3019 30202017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 3021 3022 * Makefile (_MAKE_VERSION): 20170413 3023 Merge with NetBSD make, pick up 3024 o main.c: when setting .OBJDIR ignore '$' in paths. 3025 3026 * job.c: use MALLOC_OPTIONS to set malloc_options. 3027 30282017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3029 3030 * Makefile (_MAKE_VERSION): 20170411 3031 Merge with NetBSD make, pick up 3032 o str.c: Str_Match: allow [^a-z] to behave as expected. 3033 30342017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3035 3036 * Makefile (_MAKE_VERSION): 20170326 3037 Merge with NetBSD make, pick up 3038 o main.c: purge relative paths from realpath cache when .OBJDIR 3039 is changed. 3040 30412017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 3042 3043 * Makefile (_MAKE_VERSION): 20170311 3044 Merge with NetBSD make, pick up 3045 o main.c: only use -C arg "as is" if it starts with '/'. 3046 30472017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 3048 3049 * Makefile (_MAKE_VERSION): 20170301 3050 Merge with NetBSD make, pick up 3051 o main.c: use -C arg "as is" rather than getcwd() 3052 if they identify the same directory. 3053 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 3054 30552017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 3056 3057 * Makefile (_MAKE_VERSION): 20170201 3058 Merge with NetBSD make, pick up 3059 o var.c: allow :_=var and avoid use of special context. 3060 30612017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 3062 3063 * Makefile (_MAKE_VERSION): 20170130 3064 Merge with NetBSD make, pick up 3065 o var.c: add :range and :_ 3066 o main.c: partially initialize Dir_* before MainParseArgs() 3067 can be called. 3068 If -V, skip Main_ExportMAKEFLAGS() 3069 30702017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 3071 3072 * Makefile (_MAKE_VERSION): 20170114 3073 Merge with NetBSD make, pick up 3074 o var.c: allow specifying the utc value used by :{gm,local}time 3075 30762016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3077 3078 * Makefile (_MAKE_VERSION): 20161212 3079 Merge with NetBSD make, pick up 3080 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 3081 30822016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 3083 3084 * Makefile (_MAKE_VERSION): 20161209 3085 Merge with NetBSD make, pick up 3086 o main.c: cleanup setting of .OBJDIR 3087 o parse.c: avoid coredump from (var)=val 3088 30892016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3090 3091 * Makefile (_MAKE_VERSION): 20161126 3092 Merge with NetBSD make, pick up 3093 o make.c: Make_OODate: report src node name if path not set 3094 30952016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3096 3097 * Makefile (_MAKE_VERSION): 20160926 3098 Merge with NetBSD make, pick up 3099 o support for .DELETE_ON_ERROR: (remove targets that fail) 3100 31012016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 3102 3103 * Makefile MAN: tweak .Dt to match ${PROG} 3104 31052016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3106 3107 * Makefile (_MAKE_VERSION): 20160818 3108 its a neater number; pick up whitespace fixes to man page. 3109 31102016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 3111 3112 * Makefile (_MAKE_VERSION): 20160817 3113 Merge with NetBSD make, pick up 3114 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 3115 so we can call it before adding entries to missingFiles. 3116 Thus we do not track files we have been told to ignore. 3117 31182016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 3119 3120 * Makefile (_MAKE_VERSION): 20160815 3121 Merge with NetBSD make, pick up 3122 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 3123 pathnames, and skip if the expansion is empty. 3124 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 3125 31262016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 3127 3128 * Makefile (_MAKE_VERSION): 20160812 3129 Merge with NetBSD make, pick up 3130 o meta.c: remove all missingFiles entries that match a deleted 3131 dir. 3132 o main.c: set .ERROR_CMD if possible. 3133 31342016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3135 3136 * Makefile (_MAKE_VERSION): 20160606 3137 Merge with NetBSD make, pick up 3138 o dir.c: extend mtimes cache to others via cached_stat() 3139 31402016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3141 3142 * Makefile (_MAKE_VERSION): 20160604 3143 Merge with NetBSD make, pick up 3144 o meta.c: missing filemon data is only relevant if we read a 3145 meta file. 3146 Also do not return oodate for a missing metafile if gn->path 3147 points to .CURDIR 3148 31492016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3150 3151 * Makefile (_MAKE_VERSION): 20160602 3152 Merge with NetBSD make, pick up 3153 o cached_realpath(): avoid hitting filesystem more than necessary. 3154 o meta.c: refactor need_meta decision, add knobs for 3155 missing meta file and filemon data wrt out-of-datedness. 3156 31572016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3158 3159 * Makefile (_MAKE_VERSION): 20160528 3160 3161 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 3162 31632016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 3164 3165 * Makefile (_MAKE_VERSION): 20160512 3166 Merge with NetBSD make, pick up 3167 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 3168 this is useful for gcov builds. 3169 o propagate errors from filemon(4). 3170 31712016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 3172 3173 * Makefile (_MAKE_VERSION): 20160509 3174 Merge with NetBSD make, pick up 3175 o remove use of non-standard types u_int etc. 3176 o meta.c: apply realpath() before matching against metaIgnorePaths 3177 31782016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 3179 3180 * Makefile (_MAKE_VERSION): 20160404 3181 Merge with NetBSD make, pick up 3182 o allow makefile to set .MAKE.JOBS 3183 3184 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 3185 31862016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 3187 3188 * Makefile (_MAKE_VERSION): 20160315 3189 Merge with NetBSD make, pick up 3190 o fix handling of archive members 3191 31922016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3193 3194 * Makefile (_MAKE_VERSION): rename variable to avoid interference 3195 with checks for ${MAKE_VERSION} 3196 31972016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 3198 3199 * Makefile (MAKE_VERSION): 20160310 3200 Merge with NetBSD make, pick up 3201 o meta.c: treat missing Read file same as Write, incase we Delete it. 3202 32032016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 3204 3205 * Makefile (MAKE_VERSION): 20160307 3206 Merge with NetBSD make, pick up 3207 o var.c: fix :ts\nnn to be octal by default. 3208 o meta.c: meta_finish() to cleanup memory. 3209 32102016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 3211 3212 * Makefile (MAKE_VERSION): 20160226 3213 Merge with NetBSD make, pick up 3214 o meta.c: allow meta file for makeDepend if makefiles want it. 3215 32162016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 3217 3218 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 3219 for backwards compatability. 3220 3221 * Makefile (MAKE_VERSION): 20160220 3222 Merge with NetBSD make, pick up 3223 o var.c: add knob to control handling of '$$' in := 3224 32252016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3226 3227 * Makefile (MAKE_VERSION): 20160218 3228 Merge with NetBSD make, pick up 3229 o var.c: add .export-literal allows us to fix sys.clean-env.mk 3230 post the changes to Var_Subst. 3231 Var_Subst now takes flags, and does not consume '$$' in := 3232 32332016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 3234 3235 * Makefile (MAKE_VERSION): 20160217 3236 Merge with NetBSD make, pick up 3237 o var.c: preserve '$$' in := 3238 o parse.c: add .dinclude for handling included 3239 makefile like .depend 3240 32412015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 3242 3243 * Makefile (MAKE_VERSION): 20151220 3244 Merge with NetBSD make, pick up 3245 o suff.c: re-initialize suffNull when clearing suffixes. 3246 32472015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 3248 3249 * Makefile (MAKE_VERSION): 20151201 3250 Merge with NetBSD make, pick up 3251 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 3252 o meta.c: meta_oodate: use lstat(2) for checking link target 3253 in case it is a symlink. 3254 o var.c: avoid calling brk_string and Var_Export1 with empty 3255 strings. 3256 32572015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3258 3259 * Makefile (MAKE_VERSION): 20151126 3260 Merge with NetBSD make, pick up 3261 o parse.c: ParseTrackInput don't access beyond 3262 end of old value. 3263 32642015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 3265 3266 * Makefile (MAKE_VERSION): 20151022 3267 3268 * Add support for BSD/OS which lacks inttypes.h 3269 and really needs sys/param.h for sys/sysctl.h 3270 also 'type' is not a shell builtin. 3271 3272 * var.c: eliminate uint32_t and need for inttypes.h 3273 3274 * main.c: PrintOnError flush stdout before run .ERROR 3275 3276 * parse.c: cope with _SC_PAGESIZE not being defined. 3277 3278 32792015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 3280 3281 * Makefile (MAKE_VERSION): 20151020 3282 Merge with NetBSD make, pick up 3283 o var.c: fix uninitialized var 3284 32852015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 3286 3287 * var.c: the conditional expressions used with ':?' can be 3288 expensive, if already discarding do not evaluate or expand 3289 anything. 3290 32912015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3292 3293 * Makefile (MAKE_VERSION): 20151010 3294 Merge with NetBSD make, pick up 3295 o Add Boolean wantit flag to Var_Subst and Var_Parse 3296 when FALSE we know we are discarding the result and can 3297 skip operations like Cmd_Exec. 3298 32992015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3300 3301 * Makefile (MAKE_VERSION): 20151009 3302 Merge with NetBSD make, pick up 3303 o var.c: don't check for NULL before free() 3304 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 3305 33062015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3307 3308 * Makefile (MAKE_VERSION): 20150910 3309 Merge with NetBSD make, pick up 3310 o main.c: with -w print Enter/Leaving messages for objdir too 3311 if necessary. 3312 o centralize shell metachar handling 3313 3314 * FILES: add metachar.[ch] 3315 33162015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3317 3318 * Makefile (MAKE_VERSION): 20150606 3319 Merge with NetBSD make, pick up 3320 o make.1: document .OBJDIR target 3321 33222015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3323 3324 * Makefile (MAKE_VERSION): 20150505 3325 Merge with NetBSD make, pick up 3326 o cond.c: be strict about lhs of comparison when evaluating .if 3327 but less so when called from variable expansion. 3328 o unit-tests/cond2.mk: test various error conditions 3329 33302015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 3331 3332 * machine.sh (MACHINE): Add Bitrig 3333 patch from joerg@netbsd.org 3334 33352015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3336 3337 * Makefile (MAKE_VERSION): 20150418 3338 Merge with NetBSD make, pick up 3339 o job.c: use memmove() rather than memcpy() 3340 3341 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 3342 case, so skip it. 3343 33442015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3345 3346 * Makefile (MAKE_VERSION): 20150411 3347 bump version - only mk/ changes. 3348 33492015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3350 3351 * Makefile (MAKE_VERSION): 20150410 3352 Merge with NetBSD make, pick up 3353 o document different handling of '-' in jobs mode vs compat 3354 o fix jobs mode so that '-' only applies to whole job 3355 when shell lacks hasErrCtl 3356 o meta.c: use separate vars to track lcwd and latestdir (read) 3357 per process 3358 33592015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 3360 3361 * Makefile (MAKE_VERSION): 20150401 3362 Merge with NetBSD make, pick up 3363 o meta.c: close meta file in child 3364 3365 * Makefile: use BINDIR.bmake if set. 3366 Same for MANDIR and SHAREDIR 3367 Handy for testing release candidates 3368 in various environments. 3369 33702015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3371 3372 * move initialization of savederr to block where it is used 3373 to avoid spurious warning from gcc5 3374 33752014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3376 3377 * Makefile (MAKE_VERSION): 20141111 3378 just a cooler number 3379 33802014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 3381 3382 * Makefile (MAKE_VERSION): 20141105 3383 Merge with NetBSD make, pick up 3384 o revert major overhaul of suffix handling 3385 and POSIX compliance - too much breakage 3386 and impossible to make backwards compatible. 3387 o we still have the new unit test structure which is ok. 3388 o meta.c ensure "-- filemon" is at start of line. 3389 33902014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 3391 3392 * configure.in: test that result of getconf PATH_MAX is numeric 3393 and discard if not. Apparently needed for Hurd. 3394 33952014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3396 3397 * Makefile (MAKE_VERSION): 20140830 3398 Merge with NetBSD make, pick up 3399 o major overhaul of suffix handling 3400 o improved POSIX compliance 3401 o overhauled unit-tests 3402 34032014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3404 3405 * Makefile (MAKE_VERSION): 20140620 3406 Merge with NetBSD make, pick up 3407 o var.c return varNoError rather than var_Error for ::= modifiers. 3408 34092014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 3410 3411 * Makefile (MAKE_VERSION): 20140522 3412 Merge with NetBSD make, pick up 3413 o var.c detect some parse errors. 3414 34152014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3416 3417 * Fix spelling errors - patch from Pedro Giffuni 3418 34192014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 3420 3421 * Makefile (MAKE_VERSION): 20140214 3422 Merge with NetBSD make, pick up 3423 o .INCLUDEFROM* 3424 o use Var_Value to get MAKEOBJDIR[PREFIX] 3425 o reduced realloc'ign in brk_string. 3426 * configure.in: add a check for compiler supporting __func__ 3427 34282014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3429 3430 * boot-strap: ignore mksrc=none 3431 34322014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 3433 3434 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 3435 34362014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3437 3438 * Makefile (MAKE_VERSION): 20140101 3439 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 3440 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 3441 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 3442 Hurd) 3443 * configure.in: Add AC_PREREQ and check for 3444 sysctl; patch from Andrew Shadura andrewsh at debian.org 3445 34462013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3447 3448 * Makefile (MAKE_VERSION): 20131010 3449 * lose the const from arg to systcl to avoid problems on older BSDs. 3450 34512013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3452 3453 * Makefile (MAKE_VERSION): 20131001 3454 Merge with NetBSD make, pick up 3455 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 3456 hw.machine_arch if necessary. 3457 o meta.c: meta_oodate - need to look at src of Link and target 3458 of Move as well. 3459 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 3460 provide __arraycount() if needed. 3461 34622013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 3463 3464 * Makefile (MAKE_VERSION): 20130904 3465 Merge with NetBSD make, pick up 3466 o Add VAR_INTERNAL context, so that internal setting of 3467 MAKEFILE does not override value set by makefiles. 3468 34692013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 3470 3471 * Makefile (MAKE_VERSION): 20130902 3472 Merge with NetBSD make, pick up 3473 o CompatRunCommand: only apply shellErrFlag when errCheck is true 3474 34752013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3476 3477 * Makefile (MAKE_VERSION): 20130828 3478 Merge with NetBSD make, pick up 3479 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 3480 o Call Job_SetPrefix() from Job_Init() so makefiles have 3481 opportunity to set .MAKE.JOB.PREFIX 3482 34832013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 3484 3485 * Makefile (MAKE_VERSION): 20130730 3486 Merge with NetBSD make, pick up 3487 o Allow suppression of --- job -- tokens by setting 3488 .MAKE.JOB.PREFIX empty. 3489 34902013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 3491 3492 * Makefile (MAKE_VERSION): 20130716 3493 Merge with NetBSD make, pick up 3494 o number of gmake compatibility tweaks 3495 -w for gmake style entering/leaving messages 3496 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 3497 handle MAKEFLAGS containing only letters. 3498 o when overriding a GLOBAL variable on the command line, 3499 delete it from GLOBAL context so -V doesn't show the wrong 3500 value. 3501 35022013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 3503 3504 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 3505 3506 * Makefile (MAKE_VERSION): 20130706 3507 Merge with NetBSD make, pick up 3508 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 3509 true so that CompatRunCommand() can use it, to ensure 3510 consistent behavior with jobs mode. 3511 o use MAKE_LEVEL_ENV to define the variable to propagate 3512 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 3513 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 3514 paths to ignore. 3515 35162013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3517 3518 * Makefile (MAKE_VERSION): 20130604 3519 Merge with NetBSD make, pick up 3520 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 3521 to avoid leaking descriptors. 3522 35232013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3524 3525 * Makefile (MAKE_VERSION): 20130528 3526 Merge with NetBSD make, pick up 3527 o var.c: cleanup some left-overs in VarHash() 3528 35292013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3530 3531 * Makefile (MAKE_VERSION): 20130520 3532 generate manifest from component FILES rather than have to 3533 update FILES when mk/FILES changes. 3534 35352013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3536 3537 * Makefile (MAKE_VERSION): 20130518 3538 Merge with NetBSD make, pick up 3539 o suff.c: don't skip all processsing for .PHONY targets 3540 else wildcard srcs do not get expanded. 3541 o var.c: expand name of variable to delete if necessary. 3542 35432013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3544 3545 * Makefile (MAKE_VERSION): 20130330 3546 Merge with NetBSD make, pick up 3547 o meta.c: refine the handling of .OODATE in commands. 3548 Rather than suppress command comparison for the entire script 3549 as though .NOMETA_CMP had been used, only suppress it for the 3550 one command line. 3551 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3552 suppress comparison of a command without otherwise affecting it. 3553 o make.1: document that 3554 35552013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3556 3557 * Makefile (MAKE_VERSION): 20130321 3558 yes, not quite right but its a cooler number. 3559 Merge with NetBSD make, pick up 3560 o parse.c: fix ParseGmakeExport to be portable 3561 and add a unit-test. 3562 * meta.c: call meta_init() before makefiles are read and if built 3563 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3564 this let's makefiles test for support. 3565 Call meta_mode_init() to process .MAKE.MODE. 3566 35672013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3568 3569 * Makefile (MAKE_VERSION): 20130305 3570 Merge with NetBSD make, pick up 3571 o run .STALE: target when a dependency from .depend is missing. 3572 o job.c: add Job_RunTarget() for the above and .BEGIN 3573 35742013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3575 3576 * Makefile (MAKE_VERSION): 20130303 3577 Merge with NetBSD make, pick up 3578 o main.c: set .MAKE.OS to utsname.sysname 3579 o job.c: more checks for read and poll errors 3580 o var.c: lose VarChangeCase() saves 4% time 3581 35822013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3583 3584 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3585 want to use MAKEOBJDIR 3586 35872013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3588 3589 * Merge with NetBSD make, pick up 3590 o make.1: more info on how shell commands are handled. 3591 o job.c,main.c: detect write errors to job pipes. 3592 35932013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3594 3595 * Makefile (MAKE_VERSION): 20130123 3596 Merge with NetBSD make, pick up 3597 o meta.c: if script uses .OODATE and meta_oodate() decides 3598 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3599 o var.c: in debug output indicate which variabale modifiers 3600 apply to. 3601 o remove Check_Cwd logic the makefiles have been fixed. 3602 36032012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3604 3605 * makefile.in: add a simple makefile for folk who insist on 3606 ./configure; make; make install 3607 it just runs boot-strap 3608 * include mk/* to accommodate the above 3609 * boot-strap: re-work to accommodate the above 3610 mksrc defaults to $Mydir/mk 3611 allow op={configure,build,install,clean,all} 3612 add options to facilitate install 3613 * Makefile.config.in: just the bits set by configure 3614 * Makefile: bump version to 20121212 3615 abandon Makefile.in (NetBSD Makefile) 3616 leverage mk/* instead 3617 * configure.in: ensure srcdir is absolute 3618 36192012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3620 3621 * Makefile.in (MAKE_VERSION): 20121111 3622 fix generation of bmake.cat1 3623 36242012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3625 3626 * Makefile.in (MAKE_VERSION): 20121109 3627 Merge with NetBSD make, pick up 3628 o make.c: MakeBuildChild: return 0 so search continues if a 3629 .ORDER dependency is detected. 3630 o unit-tests/order: test the above 3631 36322012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3633 3634 * Makefile.in (MAKE_VERSION): 20121102 3635 Merge with NetBSD make, pick up 3636 o cond.c: allow cond_state[] to grow. 3637 In meta mode with a very large tree, we can hit the limit 3638 while processing dirdeps. 3639 36402012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3641 3642 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3643 36442012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3645 3646 * Makefile.in (MAKE_VERSION): 20121010 3647 o protect syntax that only bmake parses correctly. 3648 o remove auto setting of FORCE_MACHINE, use configure's 3649 --with-force-machine=whatever if that is desired. 3650 36512012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3652 3653 * Makefile.in: do not lose history from make.1 when generating bmake.1 3654 36552012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3656 3657 * Makefile.in (MAKE_VERSION): 20121007 3658 Merge with NetBSD make, pick up 3659 o compat.c: ignore empty commands - same as jobs mode. 3660 o make.1: document meta chars that cause use of shell 3661 36622012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3663 3664 * Makefile.in (MAKE_VERSION): bump version to 20120911 3665 * bsd.after-import.mk: include Makefile.inc early and allow it to 3666 override PROG 3667 36682012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3669 3670 * Makefile.in (MAKE_VERSION): bump version to 20120831 3671 Merge with NetBSD make, pick up 3672 o cast sizeof() to int for comparison 3673 o minor make.1 tweak 3674 36752012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3676 3677 * Makefile.in (MAKE_VERSION): bump version to 20120830 3678 Merge with NetBSD make, pick up 3679 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3680 o debug flag -dV causes -V to show raw value regardless. 3681 36822012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3683 3684 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3685 gets SRCTOP set. 3686 36872012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3688 3689 * Makefile.in (MAKE_VERSION): bump version to 20120704 3690 Merge with NetBSD make, pick up 3691 o Job_ParseShell should call Shell_Init if it has been 3692 previously called. 3693 * Makefile.in: set USE_META based on configure result. 3694 also .PARSEDIR is safer indicator of bmake. 3695 36962012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3697 3698 * Makefile.in: bump version to 20120626 3699 ensure CPPFLAGS is in CFLAGS 3700 * meta.c: avoid nested externs 3701 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3702 37032012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3704 3705 * Makefile.in (MAKE_VERSION): bump version to 20120620 3706 Merge with NetBSD make, pick up 3707 o make_malloc.c: avoid including make_malloc.h again 3708 3709 * Makefile.in: avoid bmake only syntax or protect with 3710 .if defined(.MAKE.LEVEL) 3711 * bsd.after-import.mk: replace .-include with .sinclude 3712 ensure? SRCTOP gets a value 3713 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3714 37152012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3716 3717 * Makefile.in (MAKE_VERSION): bump version to 20120612 3718 Merge with NetBSD make, pick up 3719 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3720 for greater portability. 3721 o unit-tests/forloop: check that .for works as expected wrt 3722 number of times and with "quoted strings". 3723 37242012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3725 3726 * Makefile.in (MAKE_VERSION): bump version to 20120606 3727 Merge with NetBSD make, pick up 3728 o compat.c: use kill(2) rather than raise(3). 3729 * configure.in: look for sys/dev/filemon 3730 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3731 and pass BOOTSTRAP_XTRAS to boot-strap. 3732 37332012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3734 3735 * Makefile.in (MAKE_VERSION): bump version to 20120604 3736 Merge with NetBSD make, pick up 3737 o util.c and var.c share same var for tracking if environ 3738 has been reallocated. 3739 o util.c provide getenv with setenv. 3740 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3741 when the shell actively strips .MAKE.* from the environment. 3742 We still refer to the variable always as .MAKE.LEVEL 3743 * util.c fix bug in findenv() was finding prefix of name. 3744 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3745 results in more reliable termination of all activity on many 3746 platforms. 3747 37482012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3749 3750 * Makefile.in (MAKE_VERSION): bump version to 20120602 3751 Merge with NetBSD make, pick up 3752 o for.c: handle quoted items in .for list 3753 37542012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3755 3756 * Makefile.in (MAKE_VERSION): bump version to 20120530 3757 Merge with NetBSD make, pick up 3758 o compat.c: ignore empty command. 3759 37602012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3761 3762 * Makefile.in (MAKE_VERSION): bump version to 20120524 3763 * FILES: add bsd.after-import.mk: 3764 A simple means of integrating bmake into a BSD build system. 3765 37662012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3767 3768 * Makefile.in (MAKE_VERSION): bump version to 20120520 3769 Merge with NetBSD make, pick up 3770 o increased limit for nested conditionals. 3771 37722012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3773 3774 * Makefile.in (MAKE_VERSION): bump version to 20120518 3775 Merge with NetBSD make, pick up 3776 o use _exit(2) in signal hanlder 3777 o Don't use the [dir] cache when building nodes that might have 3778 changed since the last exec. 3779 o Avoid nested extern declaration warnings. 3780 37812012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3782 3783 * meta.c (fgetLine): avoid %z - not portable. 3784 * parse.c: Since we moved include of sys/mman.h 3785 and def's of MAP_COPY etc. we got dups from a merge. 3786 37872012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3788 3789 * Makefile.in (MAKE_VERSION): bump version to 20120420 3790 Merge with NetBSD make, pick up 3791 o restore duplicate supression in .MAKE.MAKEFILES 3792 runtime saving can be significant. 3793 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3794 consumption up to 20%. 3795 37962012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3797 3798 * Makefile.in (MAKE_VERSION): bump version to 20120420 3799 Merge with NetBSD make, pick up 3800 o remove duplicate supression in .MAKE.MAKEFILES 3801 o improved dir cache behavior 3802 o gmake'ish export command 3803 38042012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3805 3806 * Makefile.in (MAKE_VERSION): bump version to 20120325 3807 Merge with NetBSD make, pick up 3808 o fix parsing of :[#] in conditionals. 3809 38102012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3811 3812 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3813 since some systems cannot cope with .Nx <version> 3814 38152011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3816 3817 * Makefile.in (MAKE_VERSION): bump version to 20111111 3818 Merge with NetBSD make, pick up 3819 o debug output for .PARSEDIR and .PARSEFILE 3820 38212011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3822 3823 * Makefile.in (MAKE_VERSION): bump version to 20111010 3824 38252011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3826 3827 * boot-strap: check for an expected file in the dirs we look for. 3828 * make-bootstrap.sh: pass on LDSTATIC 3829 38302011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3831 3832 * Makefile.in (MAKE_VERSION): bump version to 20111001 3833 Merge with NetBSD make, pick up 3834 o ensure .PREFIX is set for .PHONY 3835 and .TARGET set for .PHONY run via .END 3836 o __dead used consistently 3837 38382011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3839 3840 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3841 38422011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3843 3844 * Makefile.in (MAKE_VERSION): bump version to 20110905 3845 Merge with NetBSD make, pick up 3846 o meta_oodate: ignore makeDependfile 3847 38482011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3849 3850 * Makefile.in (MAKE_VERSION): bump version to 20110828 3851 Merge with NetBSD make, pick up 3852 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3853 as SILENT if a .meta file is created 3854 38552011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3856 3857 * Makefile.in (MAKE_VERSION): bump version to 20110818 3858 Merge with NetBSD make, pick up 3859 o in meta mode, if target flagged .META a missing .meta file 3860 means target is out-of-date 3861 o fixes for gcc 4.5 warnings 3862 o simplify job printing code 3863 38642011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3865 3866 * Makefile.in (MAKE_VERSION): bump version to 20110808 3867 Merge with NetBSD make, pick up 3868 o do not touch OP_SPECIAL targets when doing make -t 3869 38702011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3871 3872 * Makefile.in (MAKE_VERSION): bump version to 20110622 3873 Merge with NetBSD make, pick up 3874 o meta_oodate detect corrupted .meta file and declare oodate. 3875 * configure.in: add check for setsid 3876 38772011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3878 3879 * Merge with NetBSD make, pick up 3880 o unit-tests/modts now works on MirBSD 3881 38822011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3883 3884 * Makefile.in (MAKE_VERSION): bump version to 20110606 3885 Merge with NetBSD make, pick up 3886 o ApplyModifiers: when we parse a variable which is not 3887 the entire modifier string, or not followed by ':', do not 3888 consider it as containing modifiers. 3889 o loadfile: ensure newline at end of mapped file. 3890 38912011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3892 3893 * Makefile.in (MAKE_VERSION): bump version to 20110505 3894 Merge with NetBSD make, pick up 3895 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3896 of make's control. In meta mode, any generated file within 3897 said bailiwick, which is found to be missing, causes current 3898 target to be out-of-date. 3899 39002011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3901 3902 * Makefile.in (MAKE_VERSION): bump version to 20110411 3903 Merge with NetBSD make, pick up 3904 o when long modifiers fail to match, check sysV style. 3905 - add a test case 3906 39072011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3908 3909 * Makefile.in (MAKE_VERSION): bump version to 20110410 3910 Merge with NetBSD make, pick up 3911 o :hash - cheap 32bit hash of value 3912 o :localtime, :gmtime - use value as format string for strftime. 3913 39142011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3915 3916 * Makefile.in (MAKE_VERSION): bump version to 20110330 3917 mostly because its a cooler version. 3918 Merge with NetBSD make, pick up 3919 o NetBSD tags for meta.[ch] 3920 o job.c call meta_job_finish() after meta_job_error(). 3921 o meta_job_error() should call meta_job_finish() to ensure 3922 .meta file is closed, and safe to copy - if .ERROR target wants. 3923 meta_job_finish() is safe to call repeatedly. 3924 39252011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3926 3927 * unit-tests/modts: use printf if it is a builtin, 3928 to save us from MirBSD 3929 3930 * Makefile.in (MAKE_VERSION): bump version to 20110329 3931 Merge with NetBSD make, pick up 3932 o fix for use after free() in CondDoExists(). 3933 o meta_oodate() report extra commands and return earlier. 3934 39352011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3936 3937 * Makefile.in (MAKE_VERSION): bump version to 20110327 3938 Merge with NetBSD make, pick up 3939 o meta.c, if .MAKE.MODE contains curdirOk=yes 3940 allow creating .meta files in .CURDIR 3941 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3942 formats the output of 'type' differently - so eat any "()" 3943 39442011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3945 3946 * Makefile.in (MAKE_VERSION): bump version to 20110306 3947 Merge with NetBSD make, pick up 3948 o meta.c, only do getcwd() once 3949 39502011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3951 3952 * Makefile.in (MAKE_VERSION): bump version to 20110305 3953 Merge with NetBSD make, pick up 3954 o correct sysV substitution handling of empty lhs and variable 3955 o correct exists() check for dir with trailing / 3956 o correct handling of modifiers for non-existant variables 3957 during evaluation of conditionals. 3958 o ensure MAP_FILE is defined. 3959 o meta.c use curdir[] now exported by main.c 3960 39612011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3962 3963 * Makefile.in (MAKE_VERSION): bump version to 20110225 3964 Merge with NetBSD make, pick up 3965 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3966 makefiles have been read. 3967 o fix example of :? modifier in man page. 3968 39692011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3970 3971 * Makefile.in (MAKE_VERSION): bump version to 20110214 3972 Merge with NetBSD make, pick up 3973 o meta.c handle realpath() failing when generating meta file 3974 name. 3975 3976 * sigcompat.c: convert to ansi so we can use higher warning levels. 3977 3978 39792011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3980 3981 * Makefile.in (MAKE_VERSION): bump version to 20110207 3982 Merge with NetBSD make, pick up 3983 o fix for bug in meta mode. 3984 39852011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3986 3987 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3988 39892011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3990 3991 * Makefile.in (MAKE_VERSION): bump version to 20110101 3992 Merge with NetBSD make, pick up 3993 o use mmap(2) if available, for reading makefiles 3994 39952010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3996 3997 * Makefile.in (MAKE_VERSION): bump version to 20101215 3998 Merge with NetBSD make, pick up 3999 o ensure meta_job_error() does not report a previous .meta file 4000 as being culprit. 4001 40022010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 4003 4004 * Makefile.in (MAKE_VERSION): bump version to 20101210 4005 Merge with NetBSD make, pick up 4006 o meta_oodate: track cwd per process, and only consider target 4007 out-of-date if missing file is outside make's CWD. 4008 Ignore files in /tmp/ etc. 4009 o to ensure unit-tests results match, need to control LC_ALL 4010 as well as LANG. 4011 o fix for parsing bug in var.c 4012 40132010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 4014 4015 * Makefile.in (MAKE_VERSION): bump version to 20101126 4016 Merge with NetBSD make, pick up 4017 o if stale dependency is an IMPSRC, search via .PATH 4018 o meta_oodate: if a referenced file is missing, target is 4019 out-of-date. 4020 o meta_oodate: if a target uses .OODATE in its commands, 4021 it (.OODATE) needs to be recomputed. 4022 o keep a pointer to youngest child node, rather than just its 4023 mtime. 4024 40252010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 4026 4027 * Makefile.in (MAKE_VERSION): bump version to 20101101 4028 40292010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 4030 4031 * machine.sh: like os.sh, 4032 allow for uname -p producing useless drivel 4033 40342010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 4035 4036 * boot-strap: document configure knobs for meta and filemon. 4037 4038 * Makefile.in (MAKE_VERSION): bump version to 20100911 4039 Merge with NetBSD make, pick up 4040 o meta.c - meta mode 4041 4042 * make-bootstrap.sh.in: handle meta.c 4043 * configure.in: add knobs for use_meta and filemon_h 4044 also, look for dirname, str[e]sep and strlcpy 4045 * util.c: add simple err[x] and warn[x] 4046 40472010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 4048 4049 * boot-strap (TOOL_DIFF): set this to ensure tests use 4050 the same version of diff that configure tested 4051 4052 * Makefile.in (MAKE_VERSION): bump version to 20100808 4053 Merge with NetBSD make, pick up 4054 o in jobs mode, when we discover we cannot make something, 4055 call PrintOnError before exit. 4056 40572010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 4058 4059 * Makefile.in (MAKE_VERSION): bump version to 20100806 4060 Merge with NetBSD make, pick up 4061 o formatting fixes for ignored errors 4062 o ensure jobs are cleaned up regardless of where wait() was called. 4063 40642010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 4065 4066 * Makefile.in (MAKE_VERSION): bump version to 20100618 4067 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 4068 40692010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 4070 4071 * Makefile.in (MAKE_VERSION): bump version to 20100616 4072 Merge with NetBSD make, pick up 4073 o man page update 4074 o call PrintOnError from JobFinish when we detect an error we 4075 are not ignoring. 4076 40772010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 4078 4079 * Makefile.in (MAKE_VERSION): bump version to 20100606 4080 Merge with NetBSD make, pick up 4081 o man page update 4082 40832010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 4084 4085 * Makefile.in (MAKE_VERSION): bump version to 20100605 4086 Merge with NetBSD make, pick up 4087 o use bmake_signal() which is a wrapper around sigaction() 4088 in place of signal() 4089 o add .export-env to allow exporting variables to environment 4090 without tracking (so no re-export when the internal value is 4091 changed). 4092 40932010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 4094 4095 * Makefile.in (MAKE_VERSION): bump version to 20100524 4096 Merge with NetBSD make, pick up 4097 o fix for .info et al being greedy. 4098 40992010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 4100 4101 * Makefile.in (MAKE_VERSION): bump version to 20100520 4102 Merge with NetBSD make, pick up 4103 o back to using realpath on argv[0] 4104 but only if contains '/' and does not start with '/'. 4105 41062010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 4107 4108 * boot-strap: use absolute path for bmake when running tests. 4109 4110 * Makefile.in (MAKE_VERSION): bump version to 20100510 4111 Merge with NetBSD make, pick up 4112 o revert use of realpath on argv[0] 4113 too many corner cases. 4114 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 4115 41162010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 4117 4118 * Makefile.in (MAKE_VERSION): bump version to 20100505 4119 Merge with NetBSD make, pick up 4120 o fix for missed SIGCHLD when compiled with SunPRO 4121 actually for bmake, defining FORCE_POSIX_SIGNALS would have 4122 done the job. 4123 41242010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 4125 4126 * Makefile.in (MAKE_VERSION): bump version to 20100430 4127 Merge with NetBSD make, pick up 4128 o fflush stdout before writing to stdout 4129 41302010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 4131 4132 * Makefile.in (MAKE_VERSION): bump version to 20100423 4133 Merge with NetBSD make, pick up 4134 o updated unit tests for Haiku (this time for sure). 4135 * boot-strap: based on patch from joerg 4136 honor --with-default-sys-path better. 4137 * boot-strap: remove mention of --with-prefix-sys-path 4138 41392010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 4140 4141 * Makefile.in (MAKE_VERSION): bump version to 20100422 4142 * Merge with NetBSD make, pick up 4143 o fix for vfork() on Darwin. 4144 o fix for bogus $TMPDIR. 4145 o set .MAKE.MODE=compat for -B 4146 o set .MAKE.JOBS=max_jobs for -j max_jobs 4147 o allow unit-tests to run without any *.mk 4148 o unit-tests/modmisc be more conservative in dirs presumed to exist. 4149 * boot-strap: ignore /usr/share/mk except on NetBSD. 4150 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 4151 ensure sort(1) behaves as expected. 4152 41532010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 4154 4155 * boot-strap: add FindHereOrAbove so we can use -m .../mk 4156 41572010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 4158 4159 * Makefile.in (MAKE_VERSION): bump version to 20100420 4160 * Merge with NetBSD make, pick up 4161 o fix for variable realpath() behavior. 4162 we have to stat(2) the result to be sure. 4163 o fix for .export (all) when nested vars use :sh 4164 41652010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 4166 4167 * Makefile.in (MAKE_VERSION): bump version to 20100414 4168 * Merge with NetBSD make, pick up 4169 o use realpath to resolve argv[0] (for .MAKE) if needed. 4170 o add realpath from libc. 4171 o add :tA to resolve variable via realpath(3) if possible. 4172 41732010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 4174 4175 * Makefile.in (MAKE_VERSION): bump version to 20100408 4176 * Merge with NetBSD make, pick up 4177 o unit tests for .ERROR, .error 4178 o fix for .ERROR to ensure it cannot be default target. 4179 41802010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 4181 4182 * Makefile.in (MAKE_VERSION): bump version to 20100406 4183 * Merge with NetBSD make, pick up 4184 o fix for compat mode "Error code" going to debug_file. 4185 o fix for .ALLSRC being populated twice. 4186 o support for .info, .warning and .error directives 4187 o .MAKE.MODE to control make's operational mode 4188 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 4189 name(s). 4190 o .MAKE.DEPENDFILE to control the name of the depend file 4191 o .ERROR target - run on failure. 4192 41932010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 4194 4195 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 4196 4197 * os.sh,arch.c: patch for Haiku from joerg at netbsd 4198 41992010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 4200 4201 * Makefile.in (MAKE_VERSION): bump version to 20100222 4202 * Merge with NetBSD make, pick up 4203 o better error msg for .for with mutiple inter vars 4204 4205 * boot-strap: 4206 o use make-bootstrap.sh from joerg at netbsd 4207 to avoid the need for a native make when bootstrapping. 4208 o add "" everywhere ;-) 4209 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 4210 otherwise the pre-formated version. 4211 42122010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 4213 4214 * Makefile.in (MAKE_VERSION): bump version to 20100102 4215 * Merge with NetBSD make, pick up: 4216 o fix for -m .../ 4217 42182009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 4219 4220 * Makefile.in (MAKE_VERSION): bump version to 20091118 4221 * Merge with NetBSD make, pick up: 4222 o .unexport 4223 o report lines that start with '.' and should have ':' 4224 (catch typo's of .el*if). 4225 42262009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4227 4228 * configure.in: Ensure that srcdir and mksrc are absolute paths. 4229 42302009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4231 4232 * Makefile.in (MAKE_VERSION): fix version to 20091007 4233 42342009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 4235 4236 * Makefile.in (MAKE_VERSION): bump version to 200910007 4237 * Merge with NetBSD make, pick up: 4238 o fix for parsing of :S;...;...; applied to .for loop iterator 4239 appearing in a dependency line. 4240 42412009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4242 4243 * Makefile.in (MAKE_VERSION): bump version to 20090909 4244 * Merge with NetBSD make, pick up: 4245 o fix for -C, .CURDIR and .OBJDIR 4246 * boot-strap: 4247 o allow share_dir to be set independent of prefix. 4248 o select default share_dir better when prefix ends in $HOST_TARGET 4249 o if FORCE_BSD_MK etc were set, include them in the suggested 4250 install-mk command. 4251 42522009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 4253 4254 * Makefile.in (MAKE_VERSION): bump version to 20090908 4255 * Merge with NetBSD make, pick up: 4256 o .MAKE.LEVEL for recursion tracking 4257 o fix for :M scanning \: 4258 42592009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4260 4261 * configure.in: Don't -D__EXTENSIONS__ if 4262 AC_USE_SYSTEM_EXTENSIONS says "no". 4263 42642009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 4265 4266 * Makefile.in (MAKE_VERSION): bump version to 20090826 4267 Simplify MAKE_VERSION to just the bare date. 4268 * Merge with NetBSD make, pick up: 4269 o -C directory support. 4270 o support for SIGINFO 4271 o use $TMPDIR for temp files. 4272 o child of vfork should be careful about modifying parent's state. 4273 4274 42752009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 4276 4277 * Appy some patches for MiNT from David Brownlee 4278 42792009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 4280 4281 * Makefile.in (BMAKE_VERSION): bump version to 20090222 4282 * Merge with NetBSD make, pick up: 4283 o Possible null pointer de-ref in Var_Set. 4284 42852009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 4286 4287 * Makefile.in (BMAKE_VERSION): bump version to 20090204 4288 * Merge with NetBSD make, pick up: 4289 o bmake_malloc et al moved to their own .c 4290 o Count both () and {} when looking for the end of a :M pattern 4291 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 4292 o strlist.c - functions for processing extendable arrays of pointers to strings. 4293 o ClientData replaced with void *, so const void * can be used. 4294 o New debug flag C for DEBUG_CWD 4295 42962008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 4297 4298 * Makefile.in (BMAKE_VERSION): bump version to 20081111 4299 Apply patch from Joerg Sonnenberge to 4300 configure.in: 4301 o remove some redundant checks 4302 o check for emlloc etc only in libutil and require the whole family. 4303 util.c: 4304 o remove [v]asprintf which is no longer used. 4305 43062008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4307 4308 * Makefile.in (BMAKE_VERSION): bump version to 20081101 4309 * Merge with NetBSD make, pick up: 4310 o util.c: avoid use of putenv() - christos 4311 43122008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4313 4314 * Makefile.in (BMAKE_VERSION): bump version to 20081030 4315 pick up man page tweaks. 4316 43172008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 4318 4319 * Makefile.in: move processing of LIBOBJS to after is definition! 4320 thus we'll have getenv.c in SRCS only if needed. 4321 4322 * make.1: add examples of how to use :? 4323 4324 * Makefile.in (BMAKE_VERSION): bump version to 20081029 4325 * Merge with NetBSD make, pick up: 4326 o fix for .END processing with -j 4327 o segfault from Parse_Error when no makefile is open 4328 o handle numeric expressions in any variable expansion 4329 o debug output now defaults to stderr, -dF to change it - apb 4330 o make now uses bmake_malloc etc so that it can build natively 4331 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 4332 43332008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 4334 4335 * Makefile.in (BMAKE_VERSION): bump version to 20080808 4336 * Merge with NetBSD make, pick up: 4337 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 4338 long lines in Makefiles 4339 o optimizations for VarQuote by joerg 4340 o fix for PR/38756: dominik: make dumps core on invalid makefile 4341 43422008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 4343 4344 * Makefile.in (BMAKE_VERSION): bump version to 20080515 4345 * Merge with NetBSD make, pick up: 4346 o fix skip setting vars in VAR_GLOBAL context, to handle 4347 cases where VAR_CMD is used for other than command line vars. 4348 43492008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 4350 4351 * boot-strap (make_version): we may need to look in 4352 $prefix/share/mk for sys.mk 4353 4354 * Makefile.in (BMAKE_VERSION): bump version to 20080514 4355 * Merge with NetBSD make, pick up: 4356 o skip setting vars in VAR_GLOBAL context, when already set in 4357 VAR_CMD which takes precedence. 4358 43592008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 4360 4361 * Makefile.in (BMAKE_VERSION): bump version to 20080330 4362 * Merge with NetBSD make, pick up: 4363 o fix for ?= when LHS contains variable reference. 4364 43652008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4366 4367 * merge some patches from NetBSD pkgsrc. 4368 4369 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 4370 the MAKSYSPATH used during bootstrap. 4371 4372 * Makefile.in (BMAKE_VERSION): bump version to 20080215 4373 * Merge with NetBSD make, pick up: 4374 o warn if non-space chars follow 'empty' in a conditional. 4375 43762008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4377 4378 * Makefile.in (BMAKE_VERSION): bump version to 20080118 4379 * Merge with NetBSD make, pick up: 4380 o consider dependencies read from .depend as optional - dsl 4381 o remember when buffer for reading makefile grows - dsl 4382 o add -dl (aka LOUD) - David O'Brien 4383 43842007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 4385 4386 * Makefile.in (BMAKE_VERSION): bump version to 20071022 4387 * Merge with NetBSD make, pick up: 4388 o Allow .PATH<suffix> to be used for .include "" 4389 4390 * boot-strap: source default settings from .bmake-boot-strap.rc 4391 43922007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 4393 4394 * Makefile.in: fix maninstall on various systems 4395 provided that our man.mk is used. 4396 For non-BSD systems we install the preformatted page 4397 into $MANDIR/cat1 4398 43992007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 4400 4401 * boot-strap: make bmake.1 too, so maninstall works. 4402 44032007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 4404 4405 * Makefile.in (BMAKE_VERSION): bump version to 20071014 4406 * Merge with NetBSD make, pick up: 4407 o revamped handling of defshell - configure no longer needs to 4408 know the content of the shells array - apb 4409 o stop Var_Subst modifying its input - apb 4410 o avoid calling ParseTrackInput too often - dsl 4411 44122007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 4413 4414 * Makefile.in (BMAKE_VERSION): bump version to 20071011 4415 * Merge with NetBSD make, pick up: 4416 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 4417 4418 * sigcompat.c: some tweaks for HP-UX 11.x based on 4419 patch from Tobias Nygren 4420 4421 * configure.in: update handling of --with-defshell to match 4422 new make behavior. --with-defshell=/usr/xpg4/bin/sh 4423 will now do what one might hope - provided the chosen shell 4424 behaves enough like sh. 4425 44262007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 4427 4428 * Makefile.in (BMAKE_VERSION): bump to 20071008 4429 * Merge with NetBSD make, pick up: 4430 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 4431 o .export/.MAKE.EXPORTED - export of variables - sjg 4432 o .MAKE.MAKEFILES - track all makefiles read - sjg 4433 o performance improvements - dsl 4434 o revamp parallel job scheduling - dsl 4435 44362006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4437 4438 * Makefile.in (BMAKE_VERSION): bump to 20060728 4439 * Merge with NetBSD make, pick up: 4440 o extra debug info during variable and cond processing - sjg 4441 o shell definition now covers newline - rillig 4442 o minor mem leak in PrintOnError - sjg 4443 44442006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4445 4446 * Makefile.in (BMAKE_VERSION): bump to 20060511 4447 * Merge with NetBSD make, pick up: 4448 o more memory leaks - coverity 4449 o possible overflow in ArchFindMember - coverity 4450 o extract variable modifier code out of Var_Parse() 4451 so it can be called recursively - sjg 4452 o unit-tests/moderrs - sjg 4453 44542006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 4455 4456 * Makefile.in (BMAKE_VERSION): bump to 20060412 4457 * Merge with NetBSD make, pick up: 4458 o fixes for some memory leaks - coverity 4459 o only read first sys.mk etc when searching sysIncPath - sjg 4460 4461 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 4462 setting ${MAKEFILE} - OBATA Akio 4463 44642006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 4465 4466 * Makefile.in (BMAKE_VERSION): bump to 20060318 4467 * Merge with NetBSD make, pick up: 4468 o cleanup of job.c to remove remote handling, distcc is more 4469 useful and this code was likely bit-rotting - dsl 4470 o fix for :P modifier - sjg 4471 * boot-strap: set default prefix to something reasonable 4472 (for me anyway). 4473 44742006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 4475 4476 * Makefile.in (BMAKE_VERSION): bump to 20060301 4477 * Merge with NetBSD make, pick up: 4478 o make .WAIT apply recursively, document and test case - apb 4479 o allow variable modifiers in a variable appear anywhere in 4480 modifier list, document and test case - sjg 4481 44822006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 4483 4484 * Makefile.in (BMAKE_VERSION): bump to 20060222 4485 * Merge with NetBSD make, pick up: 4486 o improved job token handling - dsl 4487 o SIG_DFL the correct signal before exec - dsl 4488 o more debug info during parsing - dsl 4489 o allow variable modifiers to be specified via variable - sjg 4490 * boot-strap: explain why we died if no mksrc 4491 44922005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 4493 4494 * Makefile.in (BMAKE_VERSION): bump to 20051105 4495 * configure.in: always set default_sys_path 4496 default is ${prefix}/share/mk 4497 - remove prefix_sys_path, anyone wanting more than above 4498 needs to set it manually. 4499 45002005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4501 4502 * boot-strap: make this a bit easier for pkgsrc folk. 4503 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 4504 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 4505 45062005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 4507 4508 * Makefile.in (BMAKE_VERSION): bump to 20051102 4509 * job.c (JobFinish): fix likely ancient merge lossage 4510 fix from Todd Vierling. 4511 * boot-strap (srcdir): allow setting mksrc=none 4512 45132005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 4514 4515 * Makefile.in (BMAKE_VERSION): bump to 20051031 4516 * ranlib.h: skip on OSF too. 4517 (NetBSD PR 31864) 4518 45192005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 4520 4521 * Makefile.in (BMAKE_VERSION): bump to 20051002 4522 fix a silly typo 4523 45242005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4525 4526 * Makefile.in (BMAKE_VERSION): bump to 20051001 4527 support for UnixWare and some other systems, 4528 based on patches from pkgsrc/bootstrap 4529 45302005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4531 4532 * Makefile.in (BMAKE_VERSION): bump to 20050901 4533 * Merge with NetBSD make, pick up: 4534 o possible parse error causing us to wander off. 4535 45362005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 4537 4538 * Makefile.in (BMAKE_VERSION): bump to 20050606 4539 * Merge with NetBSD make, pick up: 4540 o :0x modifier for randomizing a list 4541 o fixes for a number of -Wuninitialized issues. 4542 45432005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 4544 4545 * Makefile.in (BMAKE_VERSION): bump to 20050530 4546 * Merge with NetBSD make, pick up: 4547 o Handle dependencies for .BEGIN, .END and .INTERRUPT 4548 4549 * README: was seriously out of date. 4550 45512005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4552 4553 * Important to use .MAKE rather than MAKE. 4554 45552005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4556 4557 * Makefile.in (BMAKE_VERSION): bump to 20050315 4558 * Merge with NetBSD make, pick up: 4559 o don't mistake .elsefoo for .else 4560 o use suffix-specific search path correctly 4561 o bunch of style nits 4562 45632004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4564 4565 * boot-strap: 4566 o ensure that args to --src and --with-mksrc 4567 are resolved before giving them to configure. 4568 o add -o "objdir" so that builder can control it, 4569 default is $OS as determined by os.sh 4570 o add -q to suppress all the install instructions. 4571 45722004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4573 4574 * Remove __IDSTRING() 4575 4576 * Makefile.in (BMAKE_VERSION): bump to 20040508 4577 * Merge with NetBSD make, pick up: 4578 o posix fixes 4579 - remove '-e' from compat mode 4580 - add support for '+' command-line prefix. 4581 o fix for handling '--' on command-line. 4582 o fix include in lst.lib/lstInt.h to simplify '-I's 4583 o we also picked up replacement of MAKE_BOOTSTRAP 4584 with !MAKE_NATIVE which is a noop, but possibly confusing. 4585 45862004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4587 4588 * Makefile.in (BMAKE_VERSION): bump to 20040414 4589 * Merge with NetBSD make, pick up: 4590 o allow quoted strings on lhs of conditionals 4591 o issue warning when extra .else is seen 4592 o print line numer when errors encountered during parsing from 4593 string. 4594 45952004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4596 4597 * Makefile.in (BMAKE_VERSION): bump to 20040220 4598 * Merge with NetBSD make, pick up: 4599 o fix for old :M parsing bug. 4600 o re-jigged unit-tests 4601 46022004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4603 4604 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4605 so that './bmake -f Makefile test' works. 4606 46072004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4608 4609 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4610 * Merge with NetBSD make, pick up: 4611 o search upwards for *.mk 4612 o fix for double free of var substitution buffers 4613 o use of getopt replaced with custom code, since the usage 4614 (re-scanning) isn't posix compatible. 4615 46162004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4617 4618 * arch.c: don't include ranlib.h on ELF systems 4619 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4620 46212004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4622 4623 * Makefile.in (BMAKE_VERSION): bump to 20040118 4624 4625 * boot-strap (while): export vars we assign to on cmdline 4626 * unit-test/Makefile.in: ternary is .PHONY 4627 46282004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4629 4630 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4631 * Merge with NetBSD make, pick up: 4632 o fix for ternary modifier 4633 46342004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4635 4636 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4637 * Merge with NetBSD make, pick up: 4638 o fix for cond.c to handle compound expressions better 4639 o variable expansion within sysV style replacements 4640 46412003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4642 4643 * Make portable snprintf safer - output to /dev/null first to 4644 check space needed. 4645 4646 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4647 * Merge with NetBSD make, pick up: 4648 o -dg3 to show input graph when things go wrong. 4649 o explicitly look for makefiles in objdir if not found in curdir so 4650 that errors in .depend etc will be reported accurarely. 4651 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4652 instead as it more accurately reflects the expected behavior and 4653 is more consistently implemented. 4654 o avoid use of asprintf. 4655 46562003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4657 4658 * util.c: Add asprintf and vasprintf. 4659 4660 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4661 * Merge with NetBSD make, pick up: 4662 :[] modifier - allows picking words from a variable. 4663 :tW modifier - allows treating value as one big word. 4664 W flag for :C and :S - allows treating value as one big word. 4665 46662003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4667 4668 * Merge with NetBSD make 4669 pick up -de flag to enable printing failed command. 4670 don't skip 1st two dir entries (normally . and ..) since 4671 coda does not have them. 4672 46732003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4674 4675 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4676 * Merge with NetBSD make, pick up: 4677 - changes for -V '${VAR}' to print fully expanded value 4678 cf. -V VAR 4679 - CompatRunCommand now prints the command that failed. 4680 - several files got updated 3 clause Berkeley license. 4681 46822003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4683 4684 * boot-strap: Allow setting configure args on command line. 4685 46862003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4687 4688 * configure.in: add --with-defshell to allow sh or ksh 4689 to be selected as default shell. 4690 4691 * Makefile.in: bump version to 20030731 4692 4693 * Merge with NetBSD make 4694 Pick up .SHELL spec for ksh and associate man page changes. 4695 Also compat mode now uses the same shell specs. 4696 46972003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4698 4699 * var.c (Var_Parse): ensure delim is initialized. 4700 4701 * unit-tests/Makefile.in: use single quotes to avoid problems from 4702 some shells. 4703 4704 * makefile.boot.in: 4705 Run the unit-tests as part of the bootstrap procedure. 4706 47072003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4708 4709 * unit-tests/Makefile.in: always force complaints from 4710 ${TEST_MAKE} to be from 'make'. 4711 4712 * configure.in: add check for 'diff -u' 4713 also fix some old autoconf'isms 4714 4715 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4716 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4717 4718 * Merge with NetBSD make 4719 Pick up fix for :ts parsing error in some cases. 4720 Pick unit-tests. 4721 47222003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4723 4724 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4725 4726 * var.c (Var_Parse): fix bug in :ts modifier, after const 4727 correctness fixes, must pass nstr to VarModify. 4728 47292003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4730 4731 * Makefile.in: BMAKE_VERSION switch to a date based version. 4732 We'll generally use the date of last import from NetBSD. 4733 4734 * Merge with NetBSD make 4735 Pick up fixes for const-correctness, now passes WARNS=3 on 4736 NetBSD. 4737 Pick up :ts modifier, allows controlling the separator used 4738 between words in variable expansion. 4739 47402003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4741 4742 * FILES: include boot-strap and os.sh 4743 4744 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4745 FreeBSD is known to be bad. 4746 4747 * makefile.boot.in (bootstrap): make this the default target. 4748 4749 * Makefile.in: bump version to 3.1.19 4750 4751 * machine.sh: avoid A-Z with tr as it is bound to lose. 4752 47532003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4754 4755 * Merge with NetBSD make 4756 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4757 Plus some doc fixes. 4758 47592003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4760 4761 * Merge with NetBSD make 4762 Pick up fix for PR/1523 - don't count a library as built, if there 4763 is no way to build it 4764 4765 * Bump version to 3.1.18 4766 47672003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4768 4769 * Merge with NetBSD make 4770 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4771 appears in src list. 4772 47732003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4774 4775 * Merge with NetBSD make (mmm 10th anniversary!) 4776 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4777 pick up -X which tells us to not export VAR=val via setenv if 4778 we are already doing so via MAKEFLAGS. This saves valuable env 4779 space on systems like Darwin. 4780 set MAKE_VERSION to 3.1.17 4781 4782 * parse.c: pix up fix for suffix rules 4783 47842003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4785 4786 * Merge with NetBSD make. 4787 pick up fix for propagating -B via MAKEFLAGS. 4788 set MAKE_VERSION to 3.1.16 4789 4790 * Apply some patches from pkgsrc-bootstrap/bmake 4791 Originally by Grant Beattie <grant@netbsd.org> 4792 I may have missed some - since they are based on bmake-3.1.12 4793 47942002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4795 4796 * makefile.boot.in (bmake): update install targets for those that 4797 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4798 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4799 4800 * bmake.cat1: update the pre-formatted man page! 4801 48022002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4803 4804 * Merge with NetBSD make. 4805 pick up fix for premature free of pointer used in call 4806 to Dir_InitCur(). 4807 set MAKE_VERSION to 3.1.15 4808 48092002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4810 4811 * configure.in: determine suitable value for MKSRC. 4812 override using --with-mksrc=PATH. 4813 4814 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4815 configs(8) will use 'sun4' as an alias for 'sparc'. 4816 48172002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4818 4819 * Merge with NetBSD make. 4820 pick up ${.PATH} 4821 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4822 set MAKE_VERSION to 3.1.14 4823 add configure checks for killpg and sys/socket.h 4824 48252002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4826 4827 * tag bmake-3-1-13 4828 4829 * makefile.boot.in (bmake): use install-mk 4830 Also setup ./mk before trying to invoke bmake.boot incase we 4831 needed install-mk to create a sys.mk for us. 4832 4833 * configure.in: If we need to add -I${srcdir}/missing, make it an 4834 absolute path so that it works for lst.lib too. 4835 4836 * make.h: always include sys/cdefs.h since we provide one if the 4837 host does not. 4838 4839 * Makefile.in (install-mk): 4840 use MKSRC/install-mk which will do the right thing. 4841 use uname -p for ARCH if possible. 4842 since install-mk will setup links bsd.prog.mk -> prog.mk if 4843 needed, just .include bsd.prog.mk 4844 4845 * Merge with NetBSD make (NetBSD-1.6) 4846 Code is ansi-C only now. 4847 Bug in handling of dotLast is fixed. 4848 Can now assign .OBJDIR and make will reset its notions of life. 4849 New modifiers :tu :tl for toUpper and toLower. 4850 4851Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4852 4853 * Merge with NetBSD make 4854 pick up fix for .END failure in compat mode. 4855 pick up fix for extra va_end() in ParseVErrorInternal. 4856 4857Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4858 4859 * configure.in: for systems that have sys/cdefs.h check if it is 4860 compatible. If not, include the one under missing, but tell it to 4861 include the native one too - necessary on Linux. 4862 4863 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4864 include_next (for gcc) to get the native sys/cdefs.h 4865 4866Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4867 4868 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4869 leaking descriptors when using -jN. 4870 4871 * job.c (JobPrintCommand): See if "curdir" exists before 4872 attempting to chdir(). Doing the chdir directly in make (when in 4873 compat mode) fails silently, so let the -jN version do the same. 4874 This can happen when building kernels in an object tree and 4875 playing clever games to reset .CURDIR. 4876 4877 * Merged with NetBSD make 4878 pick up .USEBEFORE 4879 4880Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4881 4882 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4883 4884Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4885 4886 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4887 us not to export the iterator variable when using VAR_CMD context. 4888 4889Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4890 4891 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4892 its the wrong "fix". 4893 4894Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4895 4896 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4897 We now simply append the variable names to .MAKEOVERRIDES, and 4898 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4899 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4900 Apart from fixing quoting bugs in previous version, this allows us 4901 to export vars to the environment by simply doing: 4902 .MAKEOVERRIDES+= PATH 4903 Merged again with NetBSD make, but the above is the only change. 4904 4905 * configure.in: added 4906 --disable-pwd-override disable $PWD overriding getcwd() 4907 --disable-check-make-chdir disable make trying to guess 4908 when it should automatically cd ${.CURDIR} 4909 4910 * Merge with NetBSD make, changes include: 4911 parse.c (ParseDoDependency): Spot that the syntax error is 4912 caused by an unresolved cvs/rcs conflict and say so. 4913 var.c: most of Var* functions now take a ctxt as 1st arg. 4914 now does variable substituion on rhs of sysv style modifiers. 4915 4916 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4917 is now done here. We append the name='value' to .MAKEOVERRIDES 4918 rather than directly into MAKEFLAGS as this allows a Makefile to 4919 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4920 very similar mechanism. Note that in adding name='value' to 4921 .MAKEOVERRIDES we do the moral equivalent of: 4922 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4923 4924Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4925 4926 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4927 4928 * Merged with NetBSD make 4929 make -dx can now be used to run commands via sh -x 4930 better error messages on exec failures. 4931 4932Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4933 4934 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4935 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4936 MACHINE etc otherwise they propagate from the previous bmake. 4937 4938 * configure.in (machine): allow --with-machine=generic to make 4939 configure use machine.sh to set MACHINE. 4940 4941 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4942 4943 * Makefile.in: mention in bmake.1 that we use autoconf. 4944 4945 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4946 4947Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4948 4949 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4950 as that rather defeats the usefulness of ${MAKEFILE}. 4951 4952 * main.c (MainParseArgs): append command line variable assignments 4953 to MAKEFLAGS so that they get propagated to child make's. 4954 Apparently this is required POSIX behaviour? Its useful anyway. 4955 4956Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4957 4958 * compat.c (CompatRunCommand): don't use perror() since stdio may 4959 cause problems in child of vfork(). 4960 4961 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4962 This routine prints out the .curdir where we stopped and will also 4963 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4964 4965 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4966 :@ expansion. 4967 4968 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4969 4970 * Added RCSid's for the files we've touched. 4971 4972Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4973 4974 * configure.in: Thanks to some clues from mdb@juniper.net, 4975 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4976 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4977 4978 --with-machine=MACHINE explicitly set MACHINE 4979 --with-force-machine=MACHINE set FORCE_MACHINE 4980 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4981 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4982 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4983 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4984 4985 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4986 4987 * makefile: added a pathetically simple makefile to drive 4988 bootstrapping. Running configure by hand is more useful. 4989 4990 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4991 dependent on NetBSD bsd.*.mk 4992 4993 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4994 _PATH_OBJDIRPREFIX for those that don't want a default. 4995 construct _PATH_DEFSYSPATH from the info we get from configure. 4996 4997 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4998 if MAKE_VERSION is defined. 4999 5000 * compat.c: when we bail, print out the .CURDIR we were in. 5001 5002Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5003 5004 * Merged with NetBSD make 5005 5006 * var.c: fixed a bug in the handling of the modifier :P 5007 if the node as found but the path was null, we segfault trying to 5008 duplicate it. 5009 5010Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 5011 5012 * Merged with NetBSD make 5013 5014 * make.c: Make_OODate's test for a library out of date was using 5015 cmtime where it should have used mtime (my bug). 5016 5017 * compat.c: Use perror() to tell us what really went wrong when we 5018 cannot exec a command. 5019 5020Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5021 5022 * Merged with NetBSD make 5023 5024Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5025 5026 * Merged with NetBSD make 5027 5028Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5029 5030 * Merged with NetBSD make 5031 5032Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5033 5034 * Merged with NetBSD make 5035 5036Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5037 5038 * util.c: don't provide signal() since we use sigcompat.c 5039 5040 * Makefile.in: added a build target. 5041 5042 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 5043 These allow some quite clever magic. 5044 5045 * main.c (main): added support for getenv(MAKESYSPATH). 5046 5047Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5048 5049 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 5050 This avoids objdir having a different value depending on how a 5051 directory was reached (via command line, or subdir.mk). 5052 5053 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 5054 5055Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5056 5057 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 5058 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 5059 I've been testing this in NetBSD's make for some weeks. 5060 5061 * Turn Makefile into Makefile.in and make it useful. 5062 5063Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 5064 5065 * Imported NetBSD's -current make(1) and resolve conflicts. 5066 5067 * Applied autoconf patches from bmake v2 5068 5069 * Imported clean code base from NetBSD-1.0 5070