12025-03-08 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * bsd.after-import.mk: by default generate makefiles 4 closer to BSD style. 5 6 * VERSION (_MAKE_VERSION): 20250308 7 Merge with NetBSD make, pick up 8 o clean up comments and code for parallel mode 9 o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. 10 112025-02-27 Simon J Gerraty <sjg@beast.crufty.net> 12 13 * VERSION (_MAKE_VERSION): 20250225 14 Merge with NetBSD make, pick up 15 o job.c: reliably remove targets on interrupt, 16 by passing signal to children first. 17 182025-01-25 Simon J Gerraty <sjg@beast.crufty.net> 19 20 * VERSION (_MAKE_VERSION): 20250125 21 Merge with NetBSD make, sync up below change. 22 23 * unit-tests/Makefile: remove $TMPDIR via .END 24 to avoid failure in test on NFS - since the temp file for the 25 target script is open and thus gets renamed by the server rather 26 than removed. 27 282025-01-20 Simon J Gerraty <sjg@beast.crufty.net> 29 30 * VERSION (_MAKE_VERSION): 20250120 31 Merge with NetBSD make, pick up 32 o use FORK_FUNCTION so it can be forced to fork when doing coverage. 33 o main.c: avoid memory allocation in error path after exec failure. 34 352025-01-16 Simon J Gerraty <sjg@beast.crufty.net> 36 37 * VERSION (_MAKE_VERSION): 20250116 38 Merge with NetBSD make, pick up 39 o clarify that undefined expressions are allowed in dependencies 40 o simplify code for evaluating the '!=' variable assignment 41 422025-01-11 Simon J Gerraty <sjg@beast.crufty.net> 43 44 * VERSION (_MAKE_VERSION): 20250111 45 Merge with NetBSD make, pick up 46 o replace "Malformed conditional" with "Variable is undefined" 47 when appropriate 48 492025-01-10 Simon J Gerraty <sjg@beast.crufty.net> 50 51 * VERSION (_MAKE_VERSION): 20250110 52 Merge with NetBSD make, pick up 53 o job.c: remove some unnecessary layers in job handling 54 o unit-tests: test expressions based on undefined variables 55 562025-01-01 Simon J Gerraty <sjg@beast.crufty.net> 57 58 * VERSION (_MAKE_VERSION): 20250101 59 Merge with NetBSD make, pick up 60 o var.c: reduce pointer indirections when unexporting a variable 61 622024-12-12 Simon J Gerraty <sjg@beast.crufty.net> 63 64 * VERSION (_MAKE_VERSION): 20241212 65 * mk/ updates 66 672024-11-24 Simon J Gerraty <sjg@beast.crufty.net> 68 69 * VERSION (_MAKE_VERSION): 20241124 70 Merge with NetBSD make, pick up 71 o var.c: fix confusing error message when overriding a read-only 72 variable 73 742024-11-22 Simon J Gerraty <sjg@beast.crufty.net> 75 76 * VERSION (_MAKE_VERSION): 20241122 77 Merge with NetBSD make, pick up 78 o unit-tests/Makefile: optimize running of tests skip extra cat 79 in 99% of cases. 80 812024-11-15 Simon J Gerraty <sjg@beast.crufty.net> 82 83 * VERSION (_MAKE_VERSION): 20241114 84 Merge with NetBSD make, pick up 85 o make.1: note that MAKEOBJPREFIX should be absolute path 86 also that it can be set via makefile if suitable care taken. 87 882024-11-10 Simon J Gerraty <sjg@beast.crufty.net> 89 90 * VERSION (_MAKE_VERSION): 20241110 91 Merge with NetBSD make, pick up 92 o make: allow .../ (search here and above) in 93 .MAKE.MAKEFILE_PREFERENCE and -f argument. 94 952024-11-03 Simon J Gerraty <sjg@beast.crufty.net> 96 97 * VERSION (_MAKE_VERSION): 20241101 98 Merge with NetBSD make, pick up 99 o parse.c: report filename:linenumber in parse debug output 100 1012024-09-21 Simon J Gerraty <sjg@beast.crufty.net> 102 103 * VERSION (_MAKE_VERSION): 20240921 104 Merge with NetBSD make, pick up 105 o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. 106 107 * Makefile: use genfiles.mk to generate ${MAN} 108 so that it can be tuned for local site. 109 Ensure MAN is defined before including Makefile.inc 110 111 * Makefile: use MK_GEN_MAN to make it easier to control whether we 112 generate ${MAN} 113 1142024-09-16 Simon J Gerraty <sjg@beast.crufty.net> 115 116 * VERSION (_MAKE_VERSION): 20240909 117 118 * arch.c: fix NetBSD PR 58597 119 1202024-09-01 Simon J Gerraty <sjg@beast.crufty.net> 121 122 * Makefile: use SUBDIR.${MK_TESTS} so that we skip 123 unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS 124 125 * VERSION (_MAKE_VERSION): 20240901 126 Merge with NetBSD make, pick up 127 o reduce line length in error messages 128 o var.c: simplify printing of an evaluation stack element 129 1302024-08-29 Simon J Gerraty <sjg@beast.crufty.net> 131 132 * VERSION (_MAKE_VERSION): 20240828 133 Merge with NetBSD make, pick up 134 o add more context to error message about recursive variables 135 o treat recursive variables non-fatally - continue parsing to end 136 of makefile 137 1382024-08-12 Simon J Gerraty <sjg@beast.crufty.net> 139 140 * VERSION (_MAKE_VERSION): 20240808 141 Merge with NetBSD make, pick up 142 o improve some error messages for better clarify and readability 143 1442024-07-22 Simon J Gerraty <sjg@beast.crufty.net> 145 146 * VERSION (_MAKE_VERSION): 20240722 147 Merge with NetBSD make, pick up 148 o job.c: remove dead code 149 1502024-07-21 Simon J Gerraty <sjg@beast.crufty.net> 151 152 * VERSION (_MAKE_VERSION): 20240720 153 Merge with NetBSD make, pick up 154 o compat.c: do not run commands that have parse or evaluation errors. 155 o var.c: remove wrong error message about an undefined variable 156 1572024-07-13 Simon J Gerraty <sjg@beast.crufty.net> 158 159 * cleanup redundant differences from NetBSD make 160 o parse.c: no longer uses mmap 161 o var.c: check __STDC_VERSION__ not __STDC__ 162 1632024-07-12 Simon J Gerraty <sjg@beast.crufty.net> 164 165 * Apply some patches from NetBSD pkgsrc to reduce divergence 166 o meta.c: requires sys/select.h if available 167 o var.c: ensure SIZE_MAX has a value 168 o util.c: ensure SA_RESTART is defined 169 170 * configure.in: use *ksh* rather than just *ksh to match 171 ksh shell specification. 172 173 * unit-tests/Makefile: expand BROKEN_TESTS for ksh and 174 mksh in particular 175 1762024-07-11 Simon J Gerraty <sjg@beast.crufty.net> 177 178 * VERSION (_MAKE_VERSION): 20240711 179 Merge with NetBSD make, pick up 180 o compat.c: allow Compat_RunCommand to also handle very long 181 commands by writing to a temp file when needed. 182 o main.c: extract the temp file logic recently added to Cmd_Exec 183 to Cmd_Argv so it can be leveraged by Compat_RunCommand. 184 1852024-07-09 Simon J Gerraty <sjg@beast.crufty.net> 186 187 * VERSION (_MAKE_VERSION): 20240709 188 Merge with NetBSD make, pick up 189 o error out on parse/evaluation errors in shell commands 190 o var.c: error out on syntax errors in ':M' and ':N' modifiers 191 1922024-07-07 Simon J Gerraty <sjg@beast.crufty.net> 193 194 * VERSION (_MAKE_VERSION): 20240707 195 Merge with NetBSD make, pick up 196 o only generate code for cleanup functions in CLEANUP mode 197 o hash.c: don't track hash table chain lengths during lookup 198 unless debugging 199 o main.c: move initialization of variable scopes to targ.c 200 o var.c: remove Var_End as it is now unnecessary 201 2022024-07-06 Simon J Gerraty <sjg@beast.crufty.net> 203 204 * VERSION (_MAKE_VERSION): 20240706 205 Merge with NetBSD make, pick up 206 o reduce lint comments about ARGSUSED 207 o cond.c: error out on conditions containing the operators '&' and '|' 208 o str.c: error out on a matching malformed matching pattern '[[' 209 o var.c: in error messages, distinguish parsing from evaluating 210 in error messages for anonymous variables, log the value 211 error out on unclosed expressions during parse time 212 2132024-07-04 Simon J Gerraty <sjg@beast.crufty.net> 214 215 * VERSION (_MAKE_VERSION): 20240704 216 Merge with NetBSD make, pick up 217 o add more context information to error messages 218 o main.c: on error, print the targets to be made 219 add detailed exit status to message for failed sub-commands 220 o var.c: error out on the "Bad modifier" error message 221 2222024-07-01 Simon J Gerraty <sjg@beast.crufty.net> 223 224 * VERSION (_MAKE_VERSION): 20240701 225 Merge with NetBSD make, pick up 226 o var.c: add :tt for Title case 227 2282024-06-30 Simon J Gerraty <sjg@beast.crufty.net> 229 230 * configure.in: 20240630 further refine check for whether 231 TZ=Europe/Berlin works 232 233 * VERSION (_MAKE_VERSION): 20240630 234 Merge with NetBSD make, pick up 235 o job.c: reduce use of UNCONST 236 o main.c: add detailed exit status to message for failed sub-commands 237 o var.c: error out on some more syntax errors 238 add more context to "returned non-zero status" message 239 2402024-06-25 Simon J Gerraty <sjg@beast.crufty.net> 241 242 * VERSION (_MAKE_VERSION): 20240625 243 Merge with NetBSD make, pick up 244 o job.c: ensure shellPath is always duped, avoid upsetting free() 245 2462024-06-16 Simon J Gerraty <sjg@beast.crufty.net> 247 248 * VERSION (_MAKE_VERSION): 20240616 249 Merge with NetBSD make, pick up 250 o clean up collection of context information for error messages 251 o in warnings, move the word "warning" to the front 252 o var.c: throw an error on attempt to override an internal 253 read-only variable 254 2552024-06-10 Simon J Gerraty <sjg@beast.crufty.net> 256 257 * VERSION (_MAKE_VERSION): 20240610 258 Merge with NetBSD make, pick up 259 o for.c: remove redundant shortcut for building the .for loop body 260 2612024-06-02 Simon J Gerraty <sjg@beast.crufty.net> 262 263 * VERSION (_MAKE_VERSION): 20240602 264 Merge with NetBSD make, pick up 265 o rename some VarEvalMode constants to better match debug names. 266 o var.c: avoid out-of-bounds read when parsing indirect modifiers. 267 2682024-06-01 Simon J Gerraty <sjg@beast.crufty.net> 269 270 * VERSION (_MAKE_VERSION): 20240601 271 Merge with NetBSD make, pick up 272 o add .export-all rather than allow .export with no argument 273 which can happen accidentally. 274 o if lua is available, run check-expect.lua after unit-tests 275 o main.c: use snprintf rather than strncpy 276 fix memory leak when purging realpath cache. 277 2782024-05-28 Simon J Gerraty <sjg@beast.crufty.net> 279 280 * VERSION (_MAKE_VERSION): 20240528 281 Merge with NetBSD make, pick up 282 o fix a number of memory leaks 283 o replace magic numbers with POSIX FILENO constants 284 o hash.c: remove dead code from HashTable_DeleteEntry 285 o main.c: when complaining about unusable .OBJDIR 286 call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. 287 o parse.c: use fewer technical terms in debug message for dependency 288 2892024-05-20 Simon J Gerraty <sjg@beast.crufty.net> 290 291 * VERSION (_MAKE_VERSION): 292 Merge with NetBSD make, pick up 293 o dir.c: in FindFile restore last search of .CURDIR even for 294 includes, as a number of existing makefiles are broken otherwise. 295 2962024-05-19 Simon J Gerraty <sjg@beast.crufty.net> 297 298 * VERSION (_MAKE_VERSION): 20240519 299 Merge with NetBSD make, pick up 300 o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. 301 Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. 302 o main.c: no need to set .DOTLAST in sysIncPath 303 3042024-05-07 Simon J Gerraty <sjg@beast.crufty.net> 305 306 * VERSION (_MAKE_VERSION): 20240508 307 Merge with NetBSD make, pick up 308 o make: ensure variables set on command line get added to 309 .MAKEOVERRIDES (even if they start with '.') so they are passed to 310 sub-makes. 311 3122024-04-30 Simon J Gerraty <sjg@beast.crufty.net> 313 314 * VERSION (_MAKE_VERSION): 20240430 315 Merge with NetBSD make, pick up 316 o main.c: ensure '.include <makefile>' respects MAKESYSPATH. 317 Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 318 3192024-04-28 Simon J Gerraty <sjg@beast.crufty.net> 320 321 * VERSION (_MAKE_VERSION): 20240428 322 Merge with NetBSD make, pick up 323 o simplify freeing of lists 324 o arch.c: trim pointless comments 325 o var.c: delay variable assignments until actually needed 326 don't reallocate memory after evaluating an expression, result is 327 almost always short-lived. 328 3292024-04-26 Simon J Gerraty <sjg@beast.crufty.net> 330 331 * VERSION (_MAKE_VERSION): 20240426 332 Merge with NetBSD make, pick up 333 o job.c: in debug output, print the directory in which a job 334 failed at same time as failed target so it is more easily found in 335 build log. 336 3372024-04-24 Simon J Gerraty <sjg@beast.crufty.net> 338 339 * VERSION (_MAKE_VERSION): 20240424 340 Merge with NetBSD make, pick up 341 o clean up comments, code and tests 342 3432024-04-23 Simon J Gerraty <sjg@beast.crufty.net> 344 345 * VERSION (_MAKE_VERSION): 20240422 346 Merge with NetBSD make, pick up 347 o var.c: avoid LazyBuf for :*time modifiers. 348 LazyBuf's are not nul terminated so not suitable for passing to 349 functions that expect that. These modifiers are used sparingly so 350 an extra allocation is not a problem. 351 3522024-04-20 Simon J Gerraty <sjg@beast.crufty.net> 353 354 * VERSION (_MAKE_VERSION): 20240420 355 Merge with NetBSD make, pick up 356 o provide more context information for parse/evaluate errors 357 3582024-04-14 Simon J Gerraty <sjg@beast.crufty.net> 359 360 * VERSION (_MAKE_VERSION): 20240414 361 Merge with NetBSD make, pick up 362 o parse.c: print -dp debug info earlier so we see which 363 .if or .for line is being parsed. 364 3652024-04-04 Simon J Gerraty <sjg@beast.crufty.net> 366 367 * VERSION (_MAKE_VERSION): 20240404 368 Merge with NetBSD make, pick up 369 o fix some unit tests for Cygwin 370 o parse.c: exit immediately after reading a null byte from a makefile 371 372 * fix generation of bmake.cat1 373 3742024-03-19 Simon J Gerraty <sjg@beast.crufty.net> 375 376 * VERSION (_MAKE_VERSION): 20240314 377 Add/Improve support for Cygwin 378 o uname -s output isn't useful so allow configure to 379 set FORCE_MAKE_OS - to force the value of .MAKE.OS 380 and use Cygwin which matches uname -o 381 o fix some unit-tests for Cygwin 382 3832024-03-10 Simon J Gerraty <sjg@beast.crufty.net> 384 385 * boot-strap: tests can take a long time; use a cookie to 386 skip them if bmake has not been updated since tests last 387 ran successfully. 388 389 * Makefile: Cygwin handles MANTARGET man 390 391 * unit-tests/Makefile: set BROKEN_TESTS for Cygwin 392 3932024-03-09 Simon J Gerraty <sjg@beast.crufty.net> 394 395 * VERSION (_MAKE_VERSION): 20240309 396 Merge with NetBSD make, pick up 397 o set .ERROR_EXIT to the exit status of .ERROR_TARGET 398 this allows a .ERROR target to ignore the case of 399 .ERROR_EXIT==6 which just means that the build actually 400 failed somewhere else. 401 4022024-03-04 Simon J Gerraty <sjg@beast.crufty.net> 403 404 * VERSION (_MAKE_VERSION): 20240303 405 406 * var.c: on IRIX we need both inttypes.h and stdint.h 407 4082024-03-01 Simon J Gerraty <sjg@beast.crufty.net> 409 410 * VERSION (_MAKE_VERSION): 20240301 411 Merge with NetBSD make, pick up 412 o export variables with value from target scope 413 when appropriate. 414 4152024-02-12 Simon J Gerraty <sjg@beast.crufty.net> 416 417 * VERSION (_MAKE_VERSION): 20240212 418 Merge with NetBSD make, pick up 419 o remove unneeded conditional-compilation toggles 420 INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, 421 GMAKEEXPORT NO_REGEX and SUNSHCMD 422 423 * configure.in: add check for regex.h 424 425 * var.c: replace use of NO_REGEX with HAVE_REGEX_H 426 4272024-02-04 Simon J Gerraty <sjg@beast.crufty.net> 428 429 * VERSION (_MAKE_VERSION): 20240204 430 Merge with NetBSD make, pick up 431 o var.c: fix some lint (-dL) mode parsing issues 432 4332024-02-02 Simon J Gerraty <sjg@beast.crufty.net> 434 435 * VERSION: (_MAKE_VERSION): 20240202 436 Merge with NetBSD make, pick up 437 o make.1: note that arg to :D and :U can be empty 438 o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no 439 4402024-01-08 Simon J Gerraty <sjg@beast.crufty.net> 441 442 * VERSION (_MAKE_VERSION): 20240108 443 Merge with NetBSD make, pick up 444 o miscellaneous cleanups 445 4462024-01-06 Simon J Gerraty <sjg@beast.crufty.net> 447 448 * VERSION (_MAKE_VERSION): 20240106 449 Merge with NetBSD make, pick up 450 o fix duplicate progname when reporting an unknown target 451 o unit tests for Cmd_Exec using temp file 452 4532024-01-05 Simon J Gerraty <sjg@beast.crufty.net> 454 455 * VERSION (_MAKE_VERSION): 20240105 456 Merge with NetBSD make, pick up 457 o main.c: Cmd_Exec write cmd to a file if too big 458 avoid blowing commandline/env limits 459 4602024-01-02 Simon J Gerraty <sjg@beast.crufty.net> 461 462 * VERSION (_MAKE_VERSION): 20240101 463 o util.c: flesh out more of strftime 464 * configure.in: add --with-bmake-strftime 465 it is not a full implementation but enough to pass all 466 the unit-tests. 467 * parse.c: LoadFile do not append \n to empty buffer. 468 4692023-12-30 Simon J Gerraty <sjg@beast.crufty.net> 470 471 * VERSION (_MAKE_VERSION): 20231230 472 Merge with NetBSD make, pick up 473 o simplify memory allocation for string buffers 474 o fix declared types of list nodes 475 o suff.c: clean up freeing of suffixes 476 o var.c: simplify debug message for the ':@var@...@' modifier 477 clean up variable handling 478 4792023-12-26 Simon J Gerraty <sjg@beast.crufty.net> 480 481 * VERSION (_MAKE_VERSION): 20231226 482 Merge with NetBSD make, pick up 483 o compat.c: ensure make's output is correctly ordered with that of 484 the target when not going to a tty 485 o main.c: check for shellPath whether to call Shell_Init() 486 4872023-12-24 Simon J Gerraty <sjg@beast.crufty.net> 488 489 * VERSION (_MAKE_VERSION): 20231224 490 Merge with NetBSD make, pick up 491 o compat.c: check for shellPath whether to call Shell_Init() 492 tweak the unit test to detect the bug thus fixed. 493 o make.1: do not claim .SHELL is only used by jobs mode. 494 4952023-12-22 Simon J Gerraty <sjg@beast.crufty.net> 496 497 * VERSION (_MAKE_VERSION): 20231220 498 Merge with NetBSD make, pick up 499 o str.c: speed up pattern matching in the ':M' modifier 500 o var.c: fix confusing debug logging when deleting a variable 501 use consistent debug messages style when ignoring variables 502 5032023-12-10 Simon J Gerraty <sjg@beast.crufty.net> 504 505 * VERSION (_MAKE_VERSION): 20231210 506 Merge with NetBSD make, pick up 507 o var.c: avoid segfault on empty :C match expression 508 explain in debug log why variable assignment is ignored. 509 5102023-12-08 Simon J Gerraty <sjg@beast.crufty.net> 511 512 * VERSION (_MAKE_VERSION): 20231208 513 Merge with NetBSD make, pick up 514 o var.c: ensure fromCmd is set correctly for variables set on 515 command line. 516 5172023-11-26 Simon J Gerraty <sjg@beast.crufty.net> 518 519 * configure.in: disable generation of 'makefile' for 520 Darwin by default. 521 522 * boot-strap: docuement --without-makefile 523 5242023-11-24 Simon J Gerraty <sjg@beast.crufty.net> 525 526 * VERSION (_MAKE_VERSION): 20231124 527 Merge with NetBSD make, pick up 528 o main.c: cleanup processing of -j 529 fix lint warning about strchr 530 o var.c: more accurate error message for invalid ':mtime' argument 531 cleanup :[...] modifier 532 avoid reading beyond substring when comparing 533 o unit-tests cover all cases of :mtime, test and explain exporting 534 of variables 535 o cleanup comments 536 5372023-09-17 Simon J Gerraty <sjg@beast.crufty.net> 538 539 * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses 540 $FreeBSD$ tag, so avoid adding it. 541 5422023-09-09 Simon J Gerraty <sjg@beast.crufty.net> 543 544 * VERSION (_MAKE_VERSION): 20230909 545 Merge with NetBSD make, pick up 546 o main.c: allow -j to compute a multiple of ncpu 547 If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating 548 point number or ends in 'C' compute .MAKE.JOBS as a multiple of 549 _SC_NPROCESSORS_ONLN 550 .MAKE.JOBS.C will be "yes" if -jC is supported 551 5522023-08-20 Simon J Gerraty <sjg@beast.crufty.net> 553 554 * VERSION (_MAKE_VERSION): 20230820 555 Merge with NetBSD make, pick up 556 o make.1: note that :localtime is better for %s 557 o parse.c: improve error messages for invalid input. 558 o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get 559 correct result, it is still better to use %s:L:localtime. 560 5612023-08-18 Simon J Gerraty <sjg@beast.crufty.net> 562 563 * VERSION (_MAKE_VERSION): 20230818 564 Merge with NetBSD make, pick up 565 o meta.c: meta_ignore - check raw path against metaIgnorePaths 566 to potentially skip call to realpath. 567 o var.c: be strict when parsing the argument of the ':mtime' modifier 568 o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' 569 should be used to get an equivalent value to time(3). 570 5712023-08-16 Simon J Gerraty <sjg@beast.crufty.net> 572 573 * VERSION (_MAKE_VERSION): 20230816 574 Merge with NetBSD make, pick up 575 o cond.c: clean up multiple-inclusion guards 576 5772023-07-25 Simon J Gerraty <sjg@beast.crufty.net> 578 579 * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS 580 if configure cannot work out how to control TZ. 581 Remove varmod-localtime from BROKEN_TESTS for IRIX* 582 5832023-07-24 Simon J Gerraty <sjg@beast.crufty.net> 584 585 * VERSION (_MAKE_VERSION): 20230723 586 587 * configure.in: fix the test for wether TZ=Europe/Berlin works. 588 Depending on the time of year, if run between 22:00 and 00:00 UTC 589 the check in configure would fail incorrectly. 590 Take the day into account as well. 591 5922023-07-18 Simon J Gerraty <sjg@beast.crufty.net> 593 594 * VERSION (_MAKE_VERSION): 20230711 595 Merge with NetBSD make, pick up 596 o make.1: clean up wording, clarify scope of '!' in conditions 597 5982023-07-15 Simon J Gerraty <sjg@beast.crufty.net> 599 600 * make-bootstrap.sh.in: set prefix 601 If configure is run using ksh we get unexpanded ${prefix} in 602 DEFAULT_SYS_PATH, by ensuring prefix is set we should still get 603 correct result. 604 6052023-07-13 Simon J Gerraty <sjg@beast.crufty.net> 606 607 * VERSION (_MAKE_VERSION): 20230711 608 bump version for IRIX tweaks 609 610 * make.h: undef OP_NONE if defined 611 612 * unit-tests/Makefile: set BROKEN_TESTS for IRIX 613 614 * configure.in: override INSTALL on IRIX 615 6162023-06-27 Simon J Gerraty <sjg@beast.crufty.net> 617 618 * boot-strap op_test: ensure we set TEST_MAKE as we want it. 619 6202023-06-22 Simon J Gerraty <sjg@beast.crufty.net> 621 622 * VERSION (_MAKE_VERSION): 20230622 623 Merge with NetBSD make, pick up 624 o optimize string matching for ':M' and ':N' 625 o warn about malformed patterns in ':M', ':N' and '.if make(...)' 626 6272023-06-21 Simon J Gerraty <sjg@beast.crufty.net> 628 629 * VERSION (_MAKE_VERSION): 20230621 630 Merge with NetBSD make, pick up 631 o more extensive tests for include guards 632 o parse.c: if a guard is already defined a file that uses the same 633 guard is still guarded by it. 634 6352023-06-20 Simon J Gerraty <sjg@beast.crufty.net> 636 637 * VERSION (_MAKE_VERSION): 20230620 638 Merge with NetBSD make, pick up 639 o allow guards to be targets as well as variables 640 The guard targets may include variable references like 641 __${.PARSEDIR:tA}/${.PARSEFILE}__ 642 6432023-06-19 Simon J Gerraty <sjg@beast.crufty.net> 644 645 * VERSION (_MAKE_VERSION): 20230619 646 Merge with NetBSD make, pick up 647 o unit test for .undef of readOnly vars 648 o optimization for makefiles protected from multiple-inclusion 649 skip even opening the file after first include. 650 Initially this only handles makefiles guarded by a variable 651 target guards are next. 652 6532023-06-16 Simon J Gerraty <sjg@beast.crufty.net> 654 655 * VERSION (_MAKE_VERSION): 20230616 656 Merge with NetBSD make, pick up 657 o var.c: do not allow delete of readOnly variable 658 6592023-06-03 Simon J Gerraty <sjg@beast.crufty.net> 660 661 * VERSION (_MAKE_VERSION): 20230601 662 Merge with NetBSD make, pick up 663 o parse.c: .break takes no args 664 o lots of unit test updates 665 6662023-05-29 Simon J Gerraty <sjg@beast.crufty.net> 667 668 * unit-tests/Makefile: skip tests that require /dev/filemon 669 if it does not exists - issue a warning. 670 6712023-05-22 Simon J Gerraty <sjg@beast.crufty.net> 672 673 * VERSION (_MAKE_VERSION): 20230522 674 Fix building on darwin ppc 675 676 * os.sh (MACHINE): Darwin powerpc cannot use `uname -m` 677 also recent NetBSD uses x86_64 for MACHINE_ARCH so conform. 678 6792023-05-15 Simon J Gerraty <sjg@beast.crufty.net> 680 681 * VERSION (_MAKE_VERSION): 20230515 682 683 * Makefile (COPTS.filemon_ktrace.c): NetBSD 7 needs help to 684 compile filemon_ktrace.c 685 6862023-05-13 Simon J Gerraty <sjg@beast.crufty.net> 687 688 * VERSION (_MAKE_VERSION): 20230512 689 o sys.dirdeps.mk - broke after-import target 690 6912023-05-10 Simon J Gerraty <sjg@beast.crufty.net> 692 693 * VERSION (_MAKE_VERSION): 20230510 694 Merge with NetBSD make, pick up 695 o parse.c: don't print null filename in stack traces 696 o var.c: :mtime operate on each word in variable value 697 6982023-05-09 Simon J Gerraty <sjg@beast.crufty.net> 699 700 * VERSION (_MAKE_VERSION): 20230509 701 Merge with NetBSD make, pick up 702 o for.c: skip syntactically wrong .for loops 703 o var.c: allow for :gmtime=${mtime} 704 add :mtime[=timestamp] where timestamp is used if stat(2) 705 fails, if :mtime=error stat(2) failure causes error. 706 7072023-05-05 Simon J Gerraty <sjg@beast.crufty.net> 708 709 * VERSION (_MAKE_VERSION): 20230504 710 Merge with NetBSD make, pick up 711 o compat.c: fix compile on NetBSD 7.2 712 o make.1: fix documentation of .PREFIX to match reality and POSIX 713 o unit-tests: improved var-scope-local 714 7152023-04-14 Simon J Gerraty <sjg@beast.crufty.net> 716 717 * VERSION (_MAKE_VERSION): 20230414 718 Merge with NetBSD make, pick up 719 o minor cleanup 720 7212023-03-25 Simon J Gerraty <sjg@beast.crufty.net> 722 723 * main.c: on some systems (eg OS/X) setting RLIMIT_NOFILE to 724 unlimited results in an insane number (0x7fffffffffffffff). 725 If BMAKE_NOFILE_MAX is defined, use that instead. 726 7272023-03-22 Simon J Gerraty <sjg@beast.crufty.net> 728 729 * VERSION (_MAKE_VERSION): 20230321 730 Merge with NetBSD make, pick up 731 * make.1: document seemingly unexplained Error code 6. 732 7332023-03-18 Simon J Gerraty <sjg@beast.crufty.net> 734 735 * VERSION (_MAKE_VERSION): 20230317 736 Merge with NetBSD make, pick up 737 o compat.c: CompatDeleteTarget skip .PHONY targets to be 738 consistent with JobDeleteTarget. 739 o job.c: fix memory leak in handling sysv :from=to modifiers 740 7412023-03-04 Simon J Gerraty <sjg@beast.crufty.net> 742 743 * VERSION (_MAKE_VERSION): 20230303 744 Merge with NetBSD make, pick up 745 o several updated unit-tests 746 7472023-02-22 Simon J Gerraty <sjg@beast.crufty.net> 748 749 * VERSION (_MAKE_VERSION): 20230222 750 Merge with NetBSD make, pick up 751 o unit tests for .MAKE.META.IGNORE_{FILTER,PATHS,PATTERNS} 752 7532023-02-20 Simon J Gerraty <sjg@beast.crufty.net> 754 755 * VERSION (_MAKE_VERSION): 20230218 756 Merge with NetBSD make, pick up 757 o var.c: fix parsing of unevaluated subexpressions with 758 unbalanced '{}' 759 7602023-02-17 Simon J Gerraty <sjg@beast.crufty.net> 761 762 * VERSION (_MAKE_VERSION): 20230215 763 Merge with NetBSD make, pick up 764 o inline macros for some variable names 765 o cond.c: reduce complexity of evaluating expressions 766 7672023-02-08 Simon J Gerraty <sjg@beast.crufty.net> 768 769 * VERSION (_MAKE_VERSION): 20230208 770 Merge with NetBSD make, pick up 771 o var.c: always use SCOPE_GLOBAL for :_ to avoid problems 772 when it has been used within conditional expressions 773 7742023-01-27 Simon J Gerraty <sjg@beast.crufty.net> 775 776 * VERSION (_MAKE_VERSION): 20230127 777 778 * install-sh: if making directories ensure umask is set 779 to match mode. 780 781 * Makefile: use DIRMODE for directories and 782 NONBINMODE for man pages and mk files 783 7842023-01-26 Simon J Gerraty <sjg@beast.crufty.net> 785 786 * VERSION (_MAKE_VERSION): 20230126 787 Merge with NetBSD make, pick up 788 o variables like .newline and .MAKE.{GID,PID,PPID,UID} 789 should be read-only. 790 7912023-01-23 Simon J Gerraty <sjg@beast.crufty.net> 792 793 * VERSION (_MAKE_VERSION): 20230123 794 Merge with NetBSD make, pick up 795 o .[NO]READONLY: for control of read-only variables 796 o .SYSPATH: for controlling the path searched for makefiles 797 7982023-01-20 Simon J Gerraty <sjg@beast.crufty.net> 799 800 * VERSION (_MAKE_VERSION): 20230120 801 Merge with NetBSD make, pick up 802 o allow for white-space between command specifiers @+- 803 o add more details to warning 'Extra targets ignored' 804 8052023-01-12 Simon J Gerraty <sjg@beast.crufty.net> 806 807 * machine.sh: leverage os.sh rather than duplicate 808 also dispence with the $OS.$MACHINE values - we have $HOST_TARGET 809 for that purpose for the past decade or so. 810 We invariably get MACHINE and MACHINE_ARCH at runtime anyway. 811 8122023-01-02 Simon J Gerraty <sjg@beast.crufty.net> 813 814 * VERSION (_MAKE_VERSION): 20230101 815 Merge with NetBSD make, pick up 816 o cleanup comments, inline some LazyBuf_ methods 817 o unit-tests/ add/improve comments in tests 818 o make.1: sync list of built-in variables with reality 819 sort list of built-in variables 820 reduce indentation of the long list of variable names 821 use consistent markup for boolean flags 822 move description of .MAKE.MODE below the .MAKE.META block 823 clarify in which case an expression may omit braces 824 8252022-11-08 Simon J Gerraty <sjg@beast.crufty.net> 826 827 * VERSION (_MAKE_VERSION): 20221024 828 Merge with NetBSD make, pick up 829 o change return type of unlink_file back to int 830 8312022-10-07 Simon J Gerraty <sjg@beast.crufty.net> 832 833 * Makefile: Darwin and Linux can handle MANTARGET=man 834 8352022-09-28 Simon J Gerraty <sjg@beast.crufty.net> 836 837 * VERSION (_MAKE_VERSION): 20220928 838 Merge with NetBSD make, pick up 839 o fix more ignored returns from snprintf 840 o compile with higher warnings 841 8422022-09-26 Simon J Gerraty <sjg@beast.crufty.net> 843 844 * main.c meta.c: do not ignore return from snprintf 845 846 * meta.c strlcpy.c: we need prototype for strlcpy 847 848 * sigcompat.c: fix unused function warnings 849 8502022-09-24 Simon J Gerraty <sjg@beast.crufty.net> 851 852 * VERSION (_MAKE_VERSION): 20220924 853 Merge with NetBSD make, pick up 854 o fix bug in .break reset of conditional depth 855 o overhaul and simplify tracking of conditional depth 856 8572022-09-17 Simon J Gerraty <sjg@beast.crufty.net> 858 859 * VERSION (_MAKE_VERSION): 20220912 860 Merge with NetBSD make, pick up 861 o man page updates 862 8632022-09-09 Simon J Gerraty <sjg@beast.crufty.net> 864 865 * VERSION (_MAKE_VERSION): 20220909 866 Merge with NetBSD make, pick up 867 o update unit-tests to handle deprecation of egrep 868 o cond.c: add more details to error message for numeric comparison 869 870 * configure.in: allow for deprecation of egrep 871 872 * Makefile: Linux can handle MANTARGET=man 873 8742022-09-03 Simon J Gerraty <sjg@beast.crufty.net> 875 876 * VERSION (_MAKE_VERSION): 20220903 877 Merge with NetBSD make, pick up 878 o job.c: fix handling of null bytes in output 879 8802022-09-02 Simon J Gerraty <sjg@beast.crufty.net> 881 882 * VERSION (_MAKE_VERSION): 20220902 883 Merge with NetBSD make, pick up 884 o Allow .break to terminate a .for loop early 885 8862022-09-01 Simon J Gerraty <sjg@beast.crufty.net> 887 888 * VERSION (_MAKE_VERSION): 20220901 889 Merge with NetBSD make, pick up 890 o var.c: fix out-of-bounds errors when parsing 891 8922022-08-24 Simon J Gerraty <sjg@beast.crufty.net> 893 894 * VERSION (_MAKE_VERSION): 20220824 895 Merge with NetBSD make, pick up 896 o var.c: revert change to modifier parsing that breaks 897 shell variable references within ':@var@body@' 898 o adjust unit-tests 899 9002022-08-18 Simon J Gerraty <sjg@beast.crufty.net> 901 902 * VERSION (_MAKE_VERSION): 20220818 903 Merge with NetBSD make, pick up 904 o fix exit status for '-q' (since 1994) 905 9062022-08-08 Simon J Gerraty <sjg@beast.crufty.net> 907 908 * VERSION (_MAKE_VERSION): 20220808 909 Merge with NetBSD make, pick up 910 o var.c: fix parsing of modifiers containing unbalanced subexpressions 911 extract parsing of ':D' and ':U' modifiers into separate function 912 9132022-07-26 Simon J Gerraty <sjg@beast.crufty.net> 914 915 * VERSION (_MAKE_VERSION): 20220726 916 917 * Auto-create objdir for bmake/unit-tests if appropriate 918 9192022-07-24 Simon J Gerraty <sjg@beast.crufty.net> 920 921 * VERSION (_MAKE_VERSION): 20220724 922 Merge with NetBSD make, pick up 923 o make.1: describe variable assignment and evaluation more precisely 924 o parse.c: fix out-of-bounds read when parsing an invalid line 925 o var.c: simplify return type of IsShortVarnameValid 926 9272022-06-12 Simon J Gerraty <sjg@beast.crufty.net> 928 929 * VERSION (_MAKE_VERSION): 20220612 930 Merge with NetBSD make, pick up 931 o allow to randomize build order of targets 932 .MAKE.MODE += randomize-targets can help uncover dependency bugs 933 within a makefile. 934 o compat.c: rename Compat_Run to Compat_MakeAll 935 o make.c: inline MakeBuildParent 936 inline make_abort, improve error details 937 o parse.c: reorganize Parse_Error 938 fix memory leak in wildcard targets and sources 939 separate cases in HandleDependencyTargetMundane 940 extract HandleSingleDependencyTargetMundane 941 rename loadfile to LoadFile 942 split IncludeFile into separate functions 943 condense code for searching a file in the paths 944 fix off-by-one error in buffer for .WAIT nodes 945 o str.c: condense Str_Match 946 make code for string matching syntactically more consistent 947 9482022-04-18 Simon J Gerraty <sjg@beast.crufty.net> 949 950 * VERSION (_MAKE_VERSION): 20220418 951 Merge with NetBSD make, pick up 952 o ignore '.POSIX:' if not in first non-comment line 953 of Makefile as specified by POSIX. 954 add unit-tests for above. 955 o meta.c: make it easier to find usage of identifiers 956 o targ.c: add .USEBEFORE to Targ_PrintType 957 9582022-04-14 Simon J Gerraty <sjg@beast.crufty.net> 959 960 * VERSION (_MAKE_VERSION): 20220414 961 962 * unit-tests/Makefile: simplify checks for shells with 963 BROKEN_TESTS, this helps with other Linux distros that 964 use dash. 965 9662022-03-30 Simon J Gerraty <sjg@beast.crufty.net> 967 968 * VERSION (_MAKE_VERSION): 20220330 969 Merge with NetBSD make, pick up 970 o var.c: fix spacing, and a typo in a test 971 9722022-03-26 Simon J Gerraty <sjg@beast.crufty.net> 973 974 * VERSION (_MAKE_VERSION): 20220326 975 Merge with NetBSD make, pick up 976 o parse.c: try to include 'posix.mk' the first time 977 .POSIX: is encountered, to allow for beter POSIX compliance. 978 o var.c: make debug logs more readable 979 prefer 'long long' over 'long' on 32-bit C99 platforms 980 fix crash on .undef of an environment variable 981 9822022-03-03 Simon J Gerraty <sjg@beast.crufty.net> 983 984 * VERSION (_MAKE_VERSION): 20220303 985 Merge with NetBSD make, pick up 986 o tell meta mode unit tests not to expect filemon 987 o cond.c: make debug logging for comparisons less technical 988 o lst.c: fix mem leak in Lst_Remove 989 o str.c: make code for string matching syntactically more consistent 990 o var.c: simplify ParseModifier_Match 991 9922022-02-14 Simon J Gerraty <sjg@beast.crufty.net> 993 994 * unit-tests/Makefile: control MAKESYSPATH for deptgt-phony 995 996 * VERSION (_MAKE_VERSION): 20220214 997 Merge with NetBSD make, pick up 998 o cond.c: simplify control flow in CondParser_Comparison 999 o job.c: fix echoing of command with '-' in silent target in jobs mode 1000 o main.c: prefix the warning about read-only .OBJDIR with a colon 1001 o parse.c: remove redundant conditions 1002 o var.c: simplify control flow in ModifyWord_SysVSubst 1003 10042022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 1005 1006 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 1007 is any chance we have dash as .SHELL 1008 1009 * VERSION (_MAKE_VERSION): 20220208 1010 Merge with NetBSD make, pick up 1011 o more unit tests 1012 o meta.c: use a variable to hold command line to be filtered 1013 to avoid any side effects from content of command line. 1014 10152022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 1016 1017 * VERSION (_MAKE_VERSION): 20220204 1018 Merge with NetBSD make, pick up 1019 o use unsigned consistently for line numbers, avoid the need for %z 1020 o parse.c: do not step off end of input in Parse_IsVar 1021 when checking for target local variable assignments 1022 10232022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 1024 1025 * VERSION (_MAKE_VERSION): 20220202 1026 Merge with NetBSD make, pick up 1027 o remove redundant declaration of HashIter_Init 1028 o make DEBUG0 simpler 1029 10302022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1031 1032 * cast gn->lineno to avoid %z 1033 1034 * VERSION (_MAKE_VERSION): 20220130 1035 Merge with NetBSD make, pick up 1036 o more unit tests 1037 o make GNode lineno unsigned to please lint 1038 o print location of recursive variable references in commands 1039 o print "stack trace" (makefile includes) on fatal errors 1040 o make.1: refine documentation for target local assignments 1041 10422022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 1043 1044 * VERSION (_MAKE_VERSION): 20220128 1045 Merge with NetBSD make, pick up 1046 o inline functions called only once 1047 o for.c: clean up AddEscape for building the body of a .for loop 1048 o hash.c: merge duplicate code for finding an entry in a hash table 1049 replace HashEntry_KeyEquals with strncmp 1050 o make.1: document quirks of target local variable assignments. 1051 o parse.c: cleanup white-space 1052 10532022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 1054 1055 * VERSION (_MAKE_VERSION): 20220126 1056 Merge with NetBSD make, pick up 1057 o allow setting target local variables 1058 o more unit tests 1059 o add missing newline after "cannot continue" message 1060 o meta.c: clean up eat_dots 1061 o parse.c: fix filename in warning about duplicate script 1062 o var.c: when expanding nested variables, check simple things first 1063 10642022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 1065 1066 * VERSION (_MAKE_VERSION): 20220116 1067 Merge with NetBSD make, pick up 1068 o fix for unit-tests/varname-makeflags on non-BSD systems 1069 o use Var_Exists rather than Var_Value where appropriate 1070 o remove unnecessary functions for expanding variable names 1071 o cond.c: inline EvalBare 1072 o main.c: lint cleanup 1073 o parse.c: condense code in Parse_IsVar 1074 use islower for parsing directives (none have upper case) 1075 10762022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 1077 1078 * VERSION (_MAKE_VERSION): 20220112 1079 Merge with NetBSD make, pick up 1080 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 1081 comparion, rarely needed but useful when it is. 1082 10832022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1084 1085 * VERSION (_MAKE_VERSION): 20220110 1086 Merge with NetBSD make, pick up 1087 o inline Buf_Clear 1088 o remove redundant braces 1089 o rename and inline Targ_Precious 1090 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 1091 o for.c: clean up handling of .for loops 1092 fix reported line numbers of continuation lines 1093 add details about .for loop variables to stack traces 1094 o job.c: reduce code for initializing error handling in shell 1095 o main.c: in Cmd_Exec, return error message instead of format string 1096 have as few statements as possible between va_start and va_end 1097 add debug logging for capturing the output of external commands 1098 o make.c: use consistent variable names for varargs 1099 o make_malloc.c: remove duplicate code from bmake_strdup 1100 o parse.c: add missing printflike annotations 1101 remove redundant lines from stack traces 1102 fix stack traces in -dp mode 1103 reduce confusing code in ParseForLoop 1104 fix line number in debug log after returning from a file 1105 rename IFile and its fields to match their actual content 1106 clean up ParseDependencySources 1107 o var.c: shorten ApplyModifier_Assign 1108 rename is_shell_metachar, fix character conversion warning 1109 merge calls to ApplyModifier_Time 1110 merge duplicate code for modifiers 'gmtime' and 'localtime' 1111 11122022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 1113 1114 * parse.c: loadfile restore extra byte in buffer. 1115 11162022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1117 1118 * VERSION (_MAKE_VERSION): 20220101 1119 Merge with NetBSD make, pick up 1120 o more unit-tests 1121 o remove unnecessary words from command line options in CmdOpts 1122 o rename eunlink to unlink_file 1123 o cond.c: make ParseWord in condition parser simpler 1124 internally return false for irrelevant leaves in conditions 1125 replace table for function lookup in conditions with simple code 1126 merge duplicate types CondEvalResult and CondResult 1127 o for.c: clean up handling of .for loops and .include directives 1128 o main.c: constify cached_realpath 1129 clean up Cmd_Exec 1130 o parse.c: sync API documentation 1131 fix error message when reading more than 1 GB from stdin 1132 clean up parsing of makefiles 1133 fix line number in error message about open conditionals 1134 unexport types VarAssignOp and VarAssign 1135 clean up function names 1136 remove redundant parameters in dependency parsing functions 1137 reduce scope of the list of wildcard target names 1138 extract OP_NOTARGET into separate function 1139 clean up variable names for parsing dependency lines 1140 make debug logging a bit more human-friendly 1141 o var.c: condense code in ApplyModifier_Assign 1142 11432021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1144 1145 * VERSION (_MAKE_VERSION): 20211221 1146 Merge with NetBSD make, pick up 1147 o more unit-tests 1148 o style cleanup 1149 o in CLEANUP mode, free interned strings at the very end 1150 o fix memory leak for filenames in .for loops 1151 o buf.c: avoid memory leak 1152 o cond.c: condense CondParser_ComparisonOp 1153 o hash.c: change return type of HashTable_Set to void 1154 o job.c: change return type of Compat_RunCommand from int to bool 1155 o main.c: remove bmake_free 1156 o parse.c: condense repetetive code in ParseDirective 1157 remove dead code for handling traditional include directives 1158 clean up parsing of variable assignments 1159 remove unreachable code for parsing the dependency operator 1160 clean up loading of files 1161 fix memory leak in IncludeFile 1162 o var.c: fix memory leak when parsing a variable name 1163 fix memory leak from ${.SUFFIXES} 1164 reduce memory allocation in modifier ':?' and ':C' 1165 condense RegexReplace for the modifier ':C' and avoid strlen 1166 merge duplicate code for memory handling in Var_Parse 1167 distinguish between short-lived and environment variables 1168 rename VarFreeEnv to VarFreeShortLived 1169 11702021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 1171 1172 * cond.c: fix mem leak in CondParser_Leaf 1173 11742021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1175 1176 * VERSION (_MAKE_VERSION): 20211212 1177 Merge with NetBSD make, pick up 1178 o rename Parse_SetInput to Parse_PushInput 1179 o remove remove period from end of error messages and warnings 1180 to be more consistent 1181 o arch.c: use simpler memory management for parsing archive members 1182 o cond.c: rework and reduce recursion 1183 o for.c: rename some functions to better reflect purpose 1184 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 1185 o var.c: in parse errors, mark whitespace more clearly 1186 inline ParseEmptyArg into CondParser_FuncCallEmpty 1187 minimize calls to LazyBuf_Get in ParseVarnameLong 1188 treat .SUFFIXES as a read-only variable 1189 11902021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 1191 1192 * VERSION (_MAKE_VERSION): 20211207 1193 Merge with NetBSD make, pick up 1194 o inline HashIter_Init 1195 o parse.c: inline common subexpression in ParseRawLine 1196 o var.c: merge branches for modifiers ':D' and ':U' 1197 extract common code into Expr_Words 1198 extract common code into Expr_Str 1199 move low-level implementation details out of Var_Parse 1200 12012021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1202 1203 * VERSION (_MAKE_VERSION): 20211206 1204 Merge with NetBSD make, pick up 1205 o add unit-tests/varmod-loop-delete 1206 o for.c: inline Str_Words - reduce memory allocation 1207 o parse.c: do not try to expand fixed variable names 1208 only allocate the name of an included file if necessary 1209 clean up ParseInclude 1210 o var.c: fix use-after-free in modifier ':@' 1211 save a memory allocation in each modifier ':O' and ':u' 1212 save a memory allocation in the modifier ':[...]' 1213 in UnexportVars, replace Str_Words with Substring_Words to 1214 reduce allocations and copying. 1215 12162021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 1217 1218 * VERSION (_MAKE_VERSION): 20211204 1219 Merge with NetBSD make, pick up 1220 o flesh out a number of tests 1221 o replace enums with bitfields, this simplifies a lot of code. 1222 o var.c: refactor ParseModifierPartSubst 1223 12242021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 1225 1226 * VERSION (_MAKE_VERSION): 20211024 1227 Merge with NetBSD make, pick up 1228 o Punt on write errors - ENOSPC etc. 1229 12302021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1231 1232 * configure.in: use_defshell, set both DEFSHELL_INDEX 1233 and defshell_path if appropriate. 1234 This makes it easier to use say the KSH specification with 1235 and alternate path for the shell. 1236 1237 * configure.in compat.c: for SCO we need to force UseShell 1238 1239 * configure.in: SCO /bin/sh is not usable, provide a list of 1240 alternatives for use as .SHELL. 1241 We still have to mark some tests as broken, plus more if we end up 1242 with ksh as .SHELL. 1243 Issue a warning about skipped tests. 1244 1245 * boot-strap: leave TOOL_DIFF to configure 1246 1247 * configure.in: on SCO native cc is not usable, 1248 gcc is to be found in /usr/gnu/bin 1249 and while ancient is at least able to compile bmake. 1250 Thus we add /usr/gnu/bin to PATH if it exists, and later 1251 check if $CC would have been found via $PATH. 1252 If not we set CC to the full path of $CC. 1253 Also gnu diff is known to support -u, so if it exists use it. 1254 1255 * configure.in: move getopt to AC_REPLACE_FUNCS 1256 also add AC_C_INLINE - in an attempt to compile using 1257 native cc on SCO. 1258 1259 * configure.in: check for stresep as well as strsep, since we 1260 define the later to the former if necessary, and if we have to 1261 provide stresep we also need to provide a prototype. 1262 1263 * configure.in: we no longer need to worry about 1264 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 1265 1266 * make.h: make sure we have __RCSID 1267 1268 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 1269 can control it. 1270 12712021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 1272 1273 * VERSION: 20211020 1274 Merge with NetBSD make, pick up 1275 o confirm sync of unit-tests 1276 12772021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1278 1279 * configure.in: check if timezone Europe/Berlin is supported 1280 if not try UTC-1 1281 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 1282 symlink unit-tests -> ../unit-tests/obj so that 1283 unit-tests/Makefile.config is put in the right place. 1284 * refine filtering of .OBJDIR in unit-tests 1285 12862021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 1287 1288 * Fix unit-tests on Minix 3.2.0 1289 o job.c: do not punt if read of token pipe fails for EAGAIN. 1290 On Minix at least, we are not ready to read the childExitJob pipe 1291 when poll says we are. 1292 There should actually be no reason for this pipe to be 1293 non-blocking, but while that works fine on {Net,Free}BSD it 1294 breaks another test case on Minix. 1295 o unit-tests/Makefile: deal with variants of error messages 1296 and use of obj as .OBJDIR 1297 12982021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 1299 1300 * configure.in: add sigaction to AC_REPLACE_FUNCS 1301 we also need to check for sigaddset etc just for the benefit of 1302 sigact.c 1303 1304 * Add sigact.c as sigaction.c so this "just works". 1305 This should have been done back when bmake_signal started using 1306 sigaction (I only just noticed that sigact.c wasn't here ;-) 1307 Note: I no longer have access to any system where this would matter. 1308 13092021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 1310 1311 * VERSION (_MAKE_VERSION): 20211011 1312 1313 * Makefile: cleanup a little 1314 1315 * configure.in: check for sigsetmask 1316 13172021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1318 1319 * VERSION (_MAKE_VERSION): 20211001 1320 Merge with NetBSD make, pick up 1321 o reduce locations reducing text size 1322 o remove unnecessary const 1323 o cond.c: fix lint warning on i386 1324 do not allow unquoted 'left == right' after modifier ':?' 1325 o hash.c: fix build for DEBUG_HASH_LOOKUP 1326 o var.c: fix memory leak in error case of the ':?' modifier 1327 13282021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1329 1330 * VERSION (_MAKE_VERSION): 20210911 1331 Merge with NetBSD make, pick up 1332 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 1333 13342021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 1335 1336 * VERSION (_MAKE_VERSION): 20210906 1337 Merge with NetBSD make, pick up 1338 o more unit tests 1339 o lint cleanup 1340 o rename some functions to better fit purpose 1341 o for.c: cleanup - remove unnecessary optimization 1342 fix embedded newlines 1343 o parse.c: correct case for CVS/RCS 1344 13452021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 1346 1347 * VERSION (_MAKE_VERSION): 20210808 1348 Merge with NetBSD make, pick up 1349 o var.c: remove redundant initialization in ApplyModifier_Order 1350 1351 * mk/options.mk: issue warning for incorrect usage 1352 13532021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1354 1355 * var.c: use long for :On if we don't have a 64bit int type 1356 1357 * VERSION (_MAKE_VERSION): 20210803 1358 Merge with NetBSD make, pick up 1359 o rework varmod-order tests to avoid qsort instability 1360 o make.1: clarify :On entry 1361 13622021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1363 1364 * VERSION (_MAKE_VERSION): 20210731 1365 Merge with NetBSD make, pick up 1366 o fix some lint issues 1367 o more unit tests 1368 o var.c: rework of ApplyModifier_Order 1369 13702021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1371 1372 * util.c: add strto*l if HAVE_STRTO*L not defined 1373 1374 * VERSION (_MAKE_VERSION): 20210730 1375 Merge with NetBSD make, pick up 1376 o var.c: add :On and :Orn for numeric sort 1377 disabled if no 64bit type available. 1378 o _strtol.h: to implement strto*l functions 1379 13802021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1381 1382 * VERSION (_MAKE_VERSION): 20210704 1383 Merge with NetBSD make, pick up 1384 o unit-tests: fix some tests to be more portable 1385 - job-output-null not all shells do the same number of write calls 1386 - objdir-writable if TMPDIR is set; /tmp may not be usable 1387 13882021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1389 1390 * VERSION (_MAKE_VERSION): 20210701 1391 Merge with NetBSD make, pick up 1392 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 1393 some tests just cannot work in some environments. 1394 o buf.c: simpler upper bound for length in Buf_AddInt 1395 o cond.c: fix grammar in error message for malformed conditional 1396 o for.c: prevent newline injection (from ${.newline}) in .for loops 1397 o var.c: use more practical data type in RegexReplace 1398 (avoid need for %zu) 1399 extract RegexReplace from ModifyWord_SubstRegex 1400 14012021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 1402 1403 * VERSION (_MAKE_VERSION): 20210621 1404 Merge with NetBSD make, pick up 1405 o var.c: only report error for unmatched regex subexpression 1406 when linting (-dL) since we cannot tell when an unmatched 1407 subexpression is an expected result. 1408 o move unmatched regex subexpression tests to 1409 varmod-subst-regex.mk and enable strict (lint) mode 1410 14112021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 1412 1413 * VERSION (_MAKE_VERSION): 20210616 1414 Merge with NetBSD make, pick up 1415 o more unit tests 1416 o cond.c: rename If_Eval to EvalBare 1417 improve function names for parsing conditions 1418 o job.c: fix error handling of targets that cannot be made 1419 o var.c: uncompress code in ApplyModifier_Unique 1420 14212021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 1422 1423 * VERSION (_MAKE_VERSION): 20210518 1424 Merge with NetBSD make, pick up 1425 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 1426 o job.c: Print -de error information when running multiple jobs 1427 14282021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 1429 1430 * VERSION (_MAKE_VERSION): 20210420 1431 Merge with NetBSD make, pick up 1432 o use C99 bool type 1433 o convert VarEvalFlags back into an enum 1434 o cond.c: do not complain when skipping the condition 'no >= 10' 1435 o hash.c: avoid allocating memory for simple variable names 1436 o job.c: use distinct wording for writing to the shell commands file 1437 remove type name for the abort status in job handling 1438 rename PrintOutput to PrintFilteredOutput to avoid confusion 1439 o main.c: avoid double slash in name of temporary directory 1440 o var.c: use straight quotes for error 'Bad conditional expression' 1441 reduce memory allocations in the modifiers ':D' and ':U' 1442 rename members of ModifyWord_LoopArgs 1443 clean up pattern flags for the modifiers ':S' and ':C' 1444 reduce memory allocation and strlen calls in modifier ':from=to' 1445 in the ':Q' modifier, only allocate memory if necessary 1446 improve performance for LazyBuf 1447 remove redundant parameter from ParseVarnameLong 1448 migrate ParseModifierPart to use Substring 1449 avoid unnecessary calls to strlen when evaluating modifiers 1450 migrate ModifyWord functions to use Substring 1451 migrate handling of the modifier ':S,from,to,' to Substring 1452 reduce debug logging and memory allocation for ${:U...} 1453 reduce verbosity of the -dv debug logging for standard cases 1454 clean up debug logging for ':M' and ':N' 1455 disallow '$' in the variable name of the modifier ':@' 1456 simplify access to the name of an expression during evaluation 1457 14582021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1459 1460 * VERSION (_MAKE_VERSION): 20210330 1461 Merge with NetBSD make, pick up 1462 o replace enum bit-field with struct bit-field for VarEvalFlags 1463 o rename VARE_NONE to VARE_PARSE_ONLY 1464 o var.c: rename ApplyModifiersState to ModChain 1465 fix double varname expansion in the variable modifier '::=' 1466 change debug log for variable evaluation flags to lowercase 1467 14682021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 1469 1470 * VERSION (_MAKE_VERSION): 20210314 1471 Merge with NetBSD make, pick up 1472 o var.c: avoid evaluating many modifiers in parse only mode 1473 in strict mode (-dL) many variable references are parsed twice, 1474 the first time just to report parse errors early, so we want to 1475 avoid side effects and wasted effort to the extent possible. 1476 14772021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 1478 1479 * VERSION (_MAKE_VERSION): 20210226 1480 Merge with NetBSD make, pick up 1481 o remove freestanding freeIt variables 1482 link via FStr 1483 o var.c: restructure code in ParseVarname to target human readers 1484 improve error message for; 1485 bad modifier in variable expression 1486 unclosed modifier 1487 unknown modifier 1488 remove redundant parameter of ApplySingleModifier 1489 explain non-obvious code around indirect variable modifiers 1490 quote ':S' in error message about missing delimiter 1491 extract ParseModifier_Match into separate function 1492 add context information to error message about ':range' modifier 1493 add quotes around variable name in an error message 1494 reorder code in ModifyWords 1495 use more common parameter order for VarSelectWords 1496 make ModifyWord_Subst a little easier to understand 1497 do not expand variable name from the command line twice 1498 extract ExistsInCmdline from Var_SetWithFlags 1499 save a hash map lookup when defining a cmdline variable 1500 clean up VarAdd, Var_Delete, Var_ReexportVars 1501 use bit-shift expressions for VarFlags constants 1502 rename constants for VarFlags 1503 rename ExprDefined constants for debug logging 1504 rename ExprStatus to ExprDefined 1505 split parameters for evaluating variable expressions 1506 reduce redundant code around ModifyWords 1507 print error about failed shell command before overwriting variable 1508 clean up ValidShortVarname, ParseVarnameShort 1509 rename VarExprStatus to ExprStatus 1510 add functions for assigning the value of an expression 1511 rename ApplyModifiersState_Define to Expr_Define 1512 condense the code for parsing :S and :C modifiers 1513 15142021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 1515 1516 * VERSION (_MAKE_VERSION): 20210206 1517 Merge with NetBSD make, pick up 1518 o unit-tests: use private TMPDIR to avoid errors from other users 1519 15202021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1521 1522 * VERSION (_MAKE_VERSION): 20210205 1523 Merge with NetBSD make, pick up 1524 o avoid strdup in mkTempFile 1525 o always use vfork 1526 o rename context and ctxt to scope 1527 o rename some VAR constants to SCOPE 1528 o Var_ functions, move the scope to the front 1529 o use shortcut functions Global_Set and Global_Append 1530 o add shortcut Global_Delete for deleting a global variable 1531 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 1532 o compat.c: when exiting due to an error, print graph information 1533 o enum.c: remove overengineered Enum_ValueToString 1534 o make.c: remove unused INTERNAL flag 1535 remove unused return type of MakeBuildParent 1536 o parse.c: replace parse error "Need an operator" with better message 1537 o var.c: improve documentation about variable scopes 1538 rename Var_ValueDirect to GNode_ValueDirect 1539 rename old Var_SetWithFlags to Var_SetExpandWithFlags 1540 merge SetVar into Var_SetWithFlags 1541 split Var_Exists into plain Var_Exists and Var_ExistsExpand 1542 split Var_Append into Var_Append and Var_AppendExpand 1543 replace enum bit-set with bit-field 1544 o unit-tests/var-op-shell: use kill rather than kill -14 1545 which broke on darwin with recent update. 1546 15472021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 1548 1549 * configure.in: check for sig_atomic_t and define it as 'int' 1550 if missing. 1551 1552 * VERSION (_MAKE_VERSION): 20210201 1553 Merge with NetBSD make, pick up 1554 o use sig_atomic_t for caught_sigchld 1555 15562021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 1557 1558 * VERSION (_MAKE_VERSION): 20210130 1559 Merge with NetBSD make, pick up 1560 o more unit tests 1561 o convert SearchPath to struct 1562 o split Buf_Destroy into Buf_Done and Buf_DoneData 1563 o for.c: split For_Eval into separate functions 1564 rename struct For to struct ForLoop 1565 o job.c: do not create empty shell files in jobs mode 1566 rename JobOpenTmpFile to JobWriteShellCommands 1567 reduce unnecessary calls to waitpid 1568 o parse.c: in -dp mode, print stack trace with each diagnostic 1569 15702021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 1571 1572 * VERSION (_MAKE_VERSION): 20210123 1573 Merge with NetBSD make, pick up 1574 o rename Dir_Expand to SearchPath_Expand 1575 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 1576 o cond.c: fix debug output for comparison operators in conditionals 1577 o dir.c: split Dir_FindFile into separate functions 1578 15792021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 1580 1581 * VERSION (_MAKE_VERSION): 20210120 1582 Merge with NetBSD make, pick up 1583 o fix some more lint nits 1584 o refine some unit tests for portability 1585 o cond.c: rework parsing 1586 15872021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 1588 1589 * VERSION (_MAKE_VERSION): 20210110 1590 Merge with NetBSD make, pick up 1591 o fix lint warnings 1592 o consistently use boolean expressions in conditions 1593 15942021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 1595 1596 * VERSION (_MAKE_VERSION): 20210108 1597 Merge with NetBSD make, pick up 1598 o job.c: back to polling token pipe if we want a token 1599 o main.c: always print 'stopped in' on first call 1600 The execption is if we bail because of an abort token 1601 in which case just exit 6. 1602 16032021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 1604 1605 * VERSION (_MAKE_VERSION): 20210101 1606 Merge with NetBSD make, pick up 1607 o Happy New Year! 1608 o rename CmdOpts.lint to strict 1609 o exit 2 on technical errors 1610 o replace pointers in controlling conditions with booleans 1611 o replace global preserveUndefined with VARE_KEEP_UNDEF 1612 o compat.c: re-export variables from the actual make process 1613 if using vfork this is the effect anyway 1614 o cond.c: clean up VarParseResult constants 1615 o for.c: fix undefined behavior in SubstVarLong 1616 make control flow in SubstVarLong of .for loops more obvious 1617 clean up SubstVarShort in .for loops 1618 extract ForSubstBody from ForReadMore 1619 clean up ForReadMore 1620 simplify termination condition for .for loop 1621 add error handling for .for loop items 1622 job.c: re-export variables from the actual make process 1623 parse.c: remove mmap for loading files, only allow files < 1 GiB 1624 fix edge case in := with undefined in variable name 1625 skip variable expansion in ParseDependencyTargetWord 1626 var.c: split ExportVar into separate functions 1627 clean up code in extracted ExportVar functions 1628 remove dead code from ApplyModifiersIndirect 1629 split Var_Subst into easily understandable functions 1630 clean up VarParseResult constants 1631 16322020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 1633 1634 * main.c: use .MAKE.DEPENDFILE as set by makefiles 1635 16362020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1637 1638 * VERSION (_MAKE_VERSION): 20201222 1639 Merge with NetBSD make, pick up 1640 o make DEBUG macro return boolean 1641 o parse.c: fix assertion failure for files without trailing newline 1642 o var.c: allow .undef to undefine multiple variables at once 1643 remove excess newline from parse errors 1644 16452020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1646 1647 * VERSION (_MAKE_VERSION): 20201221 1648 Merge with NetBSD make, pick up 1649 o some unit-test updates 1650 16512020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1652 1653 * VERSION (_MAKE_VERSION): 20201220 1654 Merge with NetBSD make, pick up 1655 o more unit tests 1656 o return FStr from Var_Parse and Var_Value 1657 o spell nonexistent consistently 1658 o add str_basename to reduce duplicate code 1659 o compat.c: fix .ERROR_TARGET in compat -k mode 1660 extract InitSignals from Compat_Run 1661 extract UseShell from Compat_RunCommand 1662 o cond.c: error out if an '.endif' or '.else' contain extraneous text 1663 o for.c: rename ForIterate to ForReadMore 1664 o hash.c: clean up hash function for HashTable 1665 o lst.c: rename Vector.priv_cap to cap 1666 o main.c: remove constant parameter from MakeMode 1667 o make.c: use symbolic time for 0 in Make_Recheck 1668 extract MakeChildren from MakeStartJobs 1669 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 1670 fix error message for .info/.warning/.error without argument 1671 extract Var_Undef from ParseDirective 1672 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 1673 rename mode constants for ParseGetLine to be more expressive 1674 reduce debugging details in Parse_SetInput 1675 fix line numbers in .for loops 1676 split ParseGetLine into separate functions 1677 fix garbled output for failed shell command 1678 var.c: remove redundant assignment in ApplyModifier_SysV 1679 error out on unknown variable modifiers at parse time 1680 remove wrong error message for indirect modifier in lint mode 1681 extract ApplySingleModifier from ApplyModifiers 1682 use FStr for memory management in Var_SetWithFlags 1683 extract SetVar from Var_SetWithFlags 1684 use FStr in VarNew 1685 extract string functions from ApplyModifier_To 1686 error out if .undef has not exactly 1 argument 1687 extract Var_DeleteVar from Var_Delete 1688 extract Var_Undef from ParseDirective 1689 clean up memory management for expanding variable expressions 1690 16912020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 1692 1693 * avoid %zu 1694 1695 * lst.c: avoid anonymous union 1696 1697 * VERSION (_MAKE_VERSION): 20201212 1698 Merge with NetBSD make, pick up 1699 o more unit tests 1700 o inline Targ_Ignore and Targ_Silent 1701 o split JobFlags into separate fields 1702 o remove const from function parameters (left overs from refactoring) 1703 o eliminate boolean argument of Var_Export 1704 o make API of Buf_Init simpler 1705 o rename ParseRunOptions to ParseCommandFlags 1706 o replace *line with line[0] 1707 o compat.c: fix wrong exit status for multiple failed main targets 1708 refactor Compat_Run to show the error condition more clearly 1709 don't make .END if the main targets already failed (-k mode) 1710 fix exit status in -k mode if a dependency fails 1711 o for.c: clean up Buf_AddEscaped in .for loops 1712 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 1713 make Job_Touch simpler 1714 refactor JobFinish 1715 rename Shell.exitFlag to errFlag 1716 move Job.xtraced to ShellWriter 1717 make printing of shell commands independent from the job 1718 rename shell flags in struct Shell 1719 extract JobOpenTmpFile from JobStart 1720 rename RunFlags to CommandFlags 1721 split various Job.* into separate fields 1722 rename commandShell to shell 1723 extract InitShellNameAndPath from Shell_Init 1724 replace signal handling macros with local functions 1725 replace macro MESSAGE with local function 1726 parse.c: error out on null bytes in makefiles 1727 error out on misspelled directives 1728 rename IFile.nextbuf to readMore 1729 fix undefined behavior in ParseEOF 1730 str.c: remove redundant call to strlen in Str_Words 1731 var.c: error out on misspelled .unexport-env 1732 error out on misspelled .export directives 1733 extract ExportVars from Var_Export 1734 extract ExportVarsExpand from Var_Export 1735 eliminate boolean argument of Var_Export 1736 fix undefined behavior when exporting ${:U } 1737 rename Var_ExportVars to Var_ReexportVars 1738 rename Var_Export1 to ExportVar 1739 17402020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 1741 1742 * VERSION (_MAKE_VERSION): 20201206 1743 Merge with NetBSD make, pick up 1744 o more unit tests 1745 o inline macros for debug logging 1746 o use consistent variable names for list nodes 1747 o define constants for enum zero-values 1748 o dir.c: use fixed format for debug output of the directory cache 1749 remove Dir_InitDir 1750 o lst.c: inline Lst_Enqueue, Vector_Done 1751 o meta.c: remove unused parameter from meta_needed 1752 o parse.c: rename parse functions 1753 o suff.c: extract ExpandChildrenRegular from ExpandChildren 1754 o targ.c: don't concatenate identifiers in Targ_PrintType 1755 o var.c: remove comment decoration 1756 extract UnexportVars from Var_UnExport 1757 extract GetVarnamesToUnexport from Var_UnExport 1758 extract UnexportEnv from Var_UnExport 1759 extract UnexportVar from Var_UnExport 1760 move CleanEnv to UnexportVars 1761 replace pointer comparisons with enum 1762 add FStr to var.c to make memory handling simpler 1763 use FStr in Var_UnExport 1764 move type definitions in var.c to the top 1765 extract FreeEnvVar from Var_Parse 1766 extract ShuffleStrings from ApplyModifier_Order 1767 17682020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 1769 1770 * VERSION (_MAKE_VERSION): 20201130 1771 Merge with NetBSD make, pick up 1772 o add unit tests for META MODE 1773 o reduce memory allocation for dirSearchPath, GNode.parents, 1774 GNode.children, OpenDirs 1775 o reduce pointer indirection for GNode.cohorts and 1776 GNode.implicitParents 1777 o remove pointer indirection from GNode.commands 1778 o inline Lst_ForEachUntil in meta mode 1779 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 1780 clean up memory management for CachedDirs 1781 fix the reference count of dotLast going negative 1782 add debug logging for OpenDirs_Done 1783 extract CacheNewDir from Dir_AddDir 1784 add debug logging for reference counting of CachedDir 1785 rename some Dir functions to SearchPath 1786 o job.c: rename some global variables 1787 o main.c: reduce memory allocation in ReadBuiltinRules 1788 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 1789 CmdOpts.makefiles 1790 Add .MAKE.UID and .MAKE.GID 1791 o make.c: reduce memory allocation for/in toBeMade, 1792 Make_ProcessWait, Make_ExpandUse 1793 o meta.c: reduce memory allocation in meta_oodate 1794 o parse.c: reduce memory allocations for parsing dependencies and 1795 targets 1796 o suff.c: reduce memory allocation in suffix handling 1797 17982020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 1799 1800 * VERSION (_MAKE_VERSION): 20201124 1801 Merge with NetBSD make, pick up 1802 o .MAKE.{UID,GID} represent uid and gid running make. 1803 o fix error handling for .BEGIN and .END dependency in -k mode 1804 o fix missing "Stop." after failed .END node in -k mode 1805 o use properly typed comparisons in boolean contexts 1806 o replace a few HashTable_CreateEntry with HashTable_Set 1807 o add HashSet type 1808 o compat.c: split Compat_Make into smaller functions 1809 extract DebugFailedTarget from Compat_RunCommand 1810 o dir.c: refactor Dir_UpdateMTime 1811 migrate CachedDir.files from HashTable to HashSet 1812 o make.c: add high-level API for GNode.made 1813 18142020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 1815 1816 * VERSION (_MAKE_VERSION): 20201122 1817 Merge with NetBSD make, pick up 1818 o rename GNode.context to vars 1819 o suff.c: cleanup and refactor 1820 rename some functions and vars to better reflect usage 1821 add high-level API for CandidateSearcher 1822 o targ.c: add more debug logging for suffix handling 1823 o more unit tests 1824 o add debug logging for setting and resetting the main target 1825 18262020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 1827 1828 * VERSION (_MAKE_VERSION): 20201117 1829 Merge with NetBSD make, pick up 1830 o fix some unit-tests when .SHELL is dash 1831 o rename Targ_NewGN to GNode_New 1832 o make some GNode functions const 1833 o main.c: call Targ_Init before Var_Init 1834 cleanup PrintOnError, getTmpdir and ParseBoolean 1835 o var.c: fix error message of failed :!cmd! modifier 1836 18372020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 1838 1839 * VERSION (_MAKE_VERSION): 20201114 1840 Merge with NetBSD make, pick up 1841 o replace a few HashTable_CreateEntry with HashTable_Set 1842 o clean up cached_stats 1843 o rename DEFAULT to defaultNode 1844 o remove redundant struct make_stat 1845 o cond.c: in lint mode, check for ".else <cond>" 1846 use bitset for IfState 1847 replace large switch with if-else in Cond_EvalLine 1848 o job.c: clean up JobExec, JobStart, JobDoOutput 1849 use stderr for error message about failed touch 1850 clean up Job_Touch 1851 replace macro DBPRINTF with JobPrintln 1852 rename JobState to JobStatus 1853 main.c: switch cache for realpath from GNode to HashTable 1854 clean up Fatal 1855 clean up InitDefSysIncPath 1856 use progname instead of hard-coded 'make' in warning 1857 rename Main_SetVarObjdir to SetVarObjdir 1858 make.1: document the -S option 1859 make.c: fix debug output for GNode details 1860 use symbolic names in debug output of GNodes 1861 18622020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 1863 1864 * configure.in: fix --with-force-machine-arch 1865 1866 * VERSION (_MAKE_VERSION): 20201112 1867 Merge with NetBSD make, pick up 1868 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 1869 checks in InitObjdir. Explicit .OBJDIR target always allows 1870 read-only directory. 1871 o cond.c: clean up Cond_EvalLine 1872 18732020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 1874 1875 * VERSION (_MAKE_VERSION): 20201111 1876 Merge with NetBSD make, pick up 1877 o more unit-tests 1878 o style cleanup 1879 remove redundant parentheses from sizeof operator 1880 replace character literal 0 with '\0'. 1881 replace pointer literal 0 with NULL. 1882 remove redundant parentheses. 1883 replace (expr & mask) == 0 with !(expr & mask). 1884 use strict typing in conditions of the form !var 1885 o rename Make_OODate to GNode_IsOODate 1886 o rename Make_TimeStamp to GNode_UpdateYoungestChild 1887 o rename Var_Set_with_flags to Var_SetWithFlags 1888 o rename dieQuietly to shouldDieQuietly 1889 o buf.c: make API of Buf_Init simpler 1890 o compat.c: clean up Compat_Make, Compat_RunCommand, 1891 CompatDeleteTarget and CompatInterrupt 1892 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 1893 clean up CondParser_Comparison 1894 o main.c: rename getBoolean and s2Boolean 1895 rename MAKEFILE_PREFERENCE for consistency 1896 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 1897 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 1898 replace emptyString with allocated empty string 1899 error out on unclosed expressions after the colon 1900 19012020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 1902 1903 * VERSION (_MAKE_VERSION): 20201101 1904 Merge with NetBSD make, pick up 1905 o negate NoExecute to GNode_ShouldExecute 1906 o job.c: rename JobMatchShell to FindShellByName 1907 extract EscapeShellDblQuot from JobPrintCommand 1908 extract ParseRunOptions from JobPrintCommand 1909 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 1910 treat malformed :range, :ts and :[...] as errors 1911 add tests for the variable modifiers :[words] and :range 1912 19132020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 1914 1915 * VERSION (_MAKE_VERSION): 20201031 1916 Merge with NetBSD make, pick up 1917 o format #include directives consistently 1918 o do not look up local variables like .TARGET anywhere else 1919 o main.c: Main_SetObjdir is first called for curdir which may be 1920 readonly 1921 reduce the scope where recursive expressions are detected 1922 remove redundant :tl from getBoolean 1923 clean up mkTempFile 1924 o meta.c: simplify memory allocation in meta_create and meta_oodate 1925 o parse.c: extract loadedfile_mmap from loadfile 1926 o trace.c: document possible undefined behavior with .CURDIR 1927 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 1928 rename ismeta to is_shell_metachar 1929 remove debug logging for the :Q variable modifier 1930 rename VarIsDynamic to VarnameIsDynamic 1931 use consistent parameter order in varname parsing functions 1932 extract ParseVarnameLong from Var_Parse 1933 extract ParseVarnameShort from Var_Parse 1934 fix type of ParseModifierPart parameter delim 1935 extract IsEscapedModifierPart from ParseModifierPart 1936 clean up ModifyWords 1937 add test for combining the :@ and :? variable modifiers 1938 19392020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 1940 1941 * VERSION (_MAKE_VERSION): 20201030 1942 Merge with NetBSD make, pick up 1943 o change char * to void * in Var_Value 1944 o make iterating over HashTable simpler 1945 o rename VAR_CMD to VAR_CMDLINE 1946 o cond.c: clean up is_separator 1947 fix parse error in string literal in conditional 1948 o main.c: do not use objdir that is not writable 1949 in lint mode, exit with error status on errors 1950 o parse.c: clean up StrContainsWord 1951 fix out-of-bounds pointer in ParseTrackInput 1952 o var.c: rename Str_SYSVMatch and its parameters 1953 remove unsatisfiable conditions in Var_Set_with_flags 1954 document where the variable name is expanded 1955 fix documentation for VARP_SUB_ONE 1956 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 1957 document VAR_READONLY 1958 prevent appending to read-only variables 1959 extract MayExport from Var_Export1 1960 remove redundant evaluations in VarFind 1961 replace VarFindFlags with a simple Boolean 1962 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 1963 19642020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 1965 1966 * VERSION (_MAKE_VERSION): 20201028 1967 Merge with NetBSD make, pick up 1968 o rename defIncPath to defSysIncPath 1969 o initialize all CmdOpts fields 1970 o lst.c: inline Vector_Get 1971 o main.c: refactor main extract 1972 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 1973 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 1974 InitDefIncPath,CmdOpts_Init,UnlimitFiles 1975 o parse.c: merge curFile into includes 1976 rename predecessor to order_pred 1977 sort ParseSpecial alphabetically 1978 remove unused, undocumented .NOEXPORT 1979 rename ParseSpecial enum values consistently 1980 rename some fields of struct IFile 1981 19822020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 1983 1984 * VERSION (_MAKE_VERSION): 20201026 1985 Merge with NetBSD make, pick up 1986 o group the command line options and arguments into a struct 1987 o rename GNode.cmgn to youngestChild 1988 o rename hash functions to identify the type name 1989 o negate OP_NOP and rename it to GNode_IsTarget 1990 o add GNode_Path to access the path of a GNode 1991 o remove macros MIN and MAX 1992 o remove unused Lst_Find and Lst_FindFrom 1993 o arch.c: and make Arch_FindLib simpler 1994 clean up code layout 1995 make Arch_ParseArchive simpler 1996 o cond.c: inline CondFindStrMatch into FuncMake 1997 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 1998 omit trailing space in debug output for expanding file patterns 1999 refactor DirMatchFiles 2000 document that the SearchPath of Dir_FindFile may be NULL 2001 remove UNCONST from Dir_Expand 2002 inline DirFindName 2003 o for.c: clean up code for handling .for loops 2004 o hash.c: print hash in debug log with fixed width 2005 clean up hash table functions 2006 reduce amount of string hashing 2007 o job.c: refactor JobDeleteTarget 2008 use proper enum constants for aborting 2009 convert result of JobStart from macros to enum 2010 convert abort reason macros to enum 2011 rework Job_CheckCommands to reduce indentation 2012 rename Shell fields 2013 add field names in declaration of DEFSHELL_CUSTOM 2014 convert JobState and JobFlags to enum types 2015 move handling of the "..." command to JobPrintCommands 2016 o lst.c: clean up 2017 refactor LstNodeNew 2018 remove Lst_Open, Lst_Next, Lst_Close 2019 remove code for circular lists from Lst_Next 2020 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 2021 /dev/null or anything starting with "no" 2022 convert macros for debug flags into enum 2023 o make.c: inline Lst_Copy in Make_ExpandUse 2024 o meta.c: inline Lst_Find in meta_oodate 2025 make Lst_RemoveIf simpler in meta_oodate 2026 o parse.c: convert error level for Parse_Error to an enum 2027 o suff.c: properly terminate debug output with newline 2028 add more details to DEBUG_SRC log 2029 replace Dir_CopyDir with Dir_CopyDirSearchPath 2030 don't modify GNode name while rebuilding the suffix graph 2031 o var.c: reduce duplicate code in VarFind 2032 20332020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 2034 2035 * VERSION (_MAKE_VERSION): 20201022 2036 Merge with NetBSD make, pick up 2037 o more refactoring and simplification to reduce code size 2038 o var.c: extract CanonicalVarname from VarFind 2039 o make.c: extract UpdateImplicitParentsVars from Make_Update 2040 o main.c: extract PrintVar from doPrintVars 2041 extract HandlePWD from main 2042 o lst.c: inline simple Lst getters 2043 remove unused Lst_ForEach 2044 o job.c: move struct Shell from job.h to job.c 2045 o more unit tests 2046 20472020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 2048 2049 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 2050 20512020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 2052 2053 * VERSION (_MAKE_VERSION): 20201018 2054 Merge with NetBSD make, pick up 2055 o remove USE_IOVEC 2056 o rename some Hash_* apis to Hash* 2057 o replace execError with execDie 2058 o rename Lst_Init to Lst_New 2059 o add tags to enum types 2060 o rename Stack to Vector 2061 o parse.c: more refactoring 2062 o unit-tests: make some tests use line buffered stdout 2063 o unit-tests/Makefile: in meta mode do not make all tests depend on 2064 Makefile, it isn't necessary. 2065 20662020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 2067 2068 * main.c: check for CTL_HW being defined. 2069 * unit-tests/Makefile: ensure export tests output are POSIX compliant 2070 disable opt-debug-jobs test until it works on ubuntu 2071 2072 * VERSION (_MAKE_VERSION): 20201010 2073 Merge with NetBSD make, pick up 2074 o dir.c: remove pathname limit for Dir_FindHereOrAbove 2075 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 2076 o main.c: extract init_machine and init_machine_arch from main 2077 allow to disable debug logging options 2078 o parse.c: enable format string truncation warnings 2079 extract parsing of sources from ParseDoDependency 2080 split ParseDoSrc into smaller functions 2081 hide implementation details from Parse_DoVar 2082 clean up parsing of variable assignments 2083 split Parse_DoVar into manageable pieces 2084 don't modify the given line during Parse_DoVar 2085 fix out-of-bounds memory access in Parse_DoVar 2086 fix parsing of the :sh assignment modifier 2087 o var.c: rework memory allocation for the name of variables 2088 extract ApplyModifier_Literal into separate function 2089 in lint mode, reject modifiers without delimiter 2090 do not export variable names starting with '-' 2091 o fix double-free bug in -DCLEANUP mode 2092 o more cleanup to enable higher warnings level 2093 o more unit tests 2094 20952020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 2096 2097 * VERSION (_MAKE_VERSION): 20201002 2098 Merge with NetBSD make, pick up 2099 o dir.c: use hash table for looking up open directories by name 2100 o main.c: clean up option handling 2101 o parse.c: add missing const for Parse_AddIncludeDir 2102 o var.c: ApplyModifier_To, update pp in each branch 2103 o remove redundant function prototypes 2104 o more unit tests 2105 21062020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 2107 2108 * VERSION (_MAKE_VERSION): 20201001 2109 Merge with NetBSD make, pick up 2110 o compat.c: comment about "..." 2111 21122020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 2113 2114 * VERSION (_MAKE_VERSION): 20200930 2115 Merge with NetBSD make, pick up 2116 o job.c: split Job.jobPipe into 2 separate fields 2117 replace Lst_Open with direct iteration 2118 o lst.c: remove redundant assertions 2119 o targ.c: replace Lst_Open with direct iteration 2120 o var.c: fix bug in evaluation of indirect variable modifiers 2121 extract ApplyModifier_Quote into separate function 2122 o make debug logging simpler 2123 21242020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 2125 2126 * VERSION (_MAKE_VERSION): 20200927 2127 Merge with NetBSD make, pick up 2128 o parse.c: ensure parse errors result in 'stopped in' message. 2129 o compat.c: make parameter of Compat_RunCommand const 2130 o main.c: extract InitVarTarget from main 2131 o parse.c: rename ParseFinishLine to FinishDependencyGroup 2132 refactor ParseDoDependency 2133 o var.c: Var_Subst no longer returns string result 2134 rename Var_ParsePP back to Var_Parse 2135 in lint mode, improve error handling for undefined variables 2136 extract ParseVarname from Var_Parse 2137 o rename Lst_ForEach to Lst_ForEachUntil 2138 o inline Lst_ForEachUntil in several cases 2139 o clean up API for finding and creating GNodes 2140 o fix assertion failure in -j mode with .END node 2141 o inline and remove LstNode_Prev and LstNode_Next 2142 o use fine-grained type names for lists and their nodes 2143 o more unit tests 2144 21452020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 2146 2147 * VERSION (_MAKE_VERSION): 20200911 2148 Merge with NetBSD make, pick up 2149 o cond.c: split EvalComparison into smaller functions 2150 reorder parameters of condition parsing functions 2151 reduce code size in CondParser_Eval 2152 rename CondGetString to CondParser_String 2153 add CondLexer_SkipWhitespace 2154 group the condition parsing state into a struct 2155 in CondGetString, replace repeated Buf_Add with Buf_AddStr 2156 o migrate Var_Parse to Var_ParsePP 2157 o add wrappers around ctype.h functions 2158 o lst.c: use a stack instead of a list for the nested include path 2159 o more unit tests 2160 21612020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 2162 2163 * make-bootstrap.sh.in: adjust object list 2164 21652020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 2166 2167 * VERSION (_MAKE_VERSION): 20200902 2168 Merge with NetBSD make, pick up 2169 o use make_stat to ensure no confusion over valid fields 2170 returned by cached_stat 2171 o var.c: make VarQuote const-correct 2172 o add unit tests for .for 2173 21742020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 2175 2176 * VERSION (_MAKE_VERSION): 20200901 2177 Merge with NetBSD make, pick up 2178 o rename Hash_Table fields 2179 o make data types in Dir_HasWildcards more precise 2180 21812020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 2182 2183 * VERSION (_MAKE_VERSION): 20200831 2184 Merge with NetBSD make, pick up 2185 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 2186 o lst.c: Lst_Open renable assert that list isn't open 2187 o unit test for .TARGET dependent flags 2188 o var.c: fix aliasing bug in VarUniq 2189 o more unit tests for :u 2190 21912020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 2192 2193 * VERSION (_MAKE_VERSION): 20200830 2194 Merge with NetBSD make, pick up 2195 o allow for strict type checking for Boolean 2196 o Var_Parse never returns NULL 2197 o Var_Subst never returns NULL 2198 o Lst_Find now takes boolean match function 2199 o rename Lst_Memeber to Lst_FindDatum 2200 o rename LstNode functions to match their type 2201 o rename GNode.iParents to implicitParents 2202 o fix assertion failure for .SUFFIXES in archives 2203 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 2204 remove unreachable code from CompatRunCommand 2205 o main.c: simplify getBoolean 2206 o stc.c: replace brk_string with simpler Str_Words 2207 o suff.c: add debug macros 2208 22092020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 2210 2211 * VERSION (_MAKE_VERSION): 20200828 2212 Merge with NetBSD make, pick up 2213 o lst.c: inline LstIsValid and LstNodeIsValid 2214 o remove trailing S from Lst function names after migration complete 2215 o more comment cleanup/clarification 2216 o suff.c: clean up suffix handling 2217 o more unit tests 2218 22192020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 2220 2221 * VERSION (_MAKE_VERSION): 20200826 2222 Merge with NetBSD make, pick up 2223 o enum.c: distinguish between bitsets containing flags and 2224 ordinary enums 2225 o var.c: fix error message for ::!= modifier with shell error 2226 o fix bugs in -DCLEANUP mode 2227 22282020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 2229 2230 * VERSION (_MAKE_VERSION): 20200824 2231 Merge with NetBSD make, pick up 2232 o in debug mode, print GNode details in symbols 2233 22342020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 2235 2236 * VERSION (_MAKE_VERSION): 20200823 2237 Merge with NetBSD make, pick up 2238 o lst.c: more asserts, 2239 make args to Lst_Find match others. 2240 o var.c: pass flags to VarAdd 2241 o arch.c: use Buffer 2242 o str.c: brk_string return size_t for nwords 2243 o more unit tests 2244 22452020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 2246 2247 * VERSION (_MAKE_VERSION): 2248 Merge with NetBSD make, pick up 2249 o var.c: support for read-only variables eg .SHELL 2250 being the shell used to run scripts. 2251 o lst.c: more simplification 2252 o more documentation and style cleanup 2253 o more unit tests 2254 o ensure unit-test/Makefile is run by TEST_MAKE 2255 o reduce duplication of header inclusion 2256 22572020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 2258 2259 * VERSION (_MAKE_VERSION): 20200821 2260 Merge with NetBSD make, pick up 2261 o lst.c: revert invalid assertion - but document it 2262 o dir.c: split Dir_Init into two functions 2263 22642020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 2265 2266 * lst.c: needs inttypes.h on Linux 2267 2268 * VERSION (_MAKE_VERSION): 20200820 2269 Merge with NetBSD make, pick up 2270 o make.1: clarify some passages 2271 o var.c: more cleanup, clarify comments 2272 o make_malloc.c: remove unreachable code 2273 o cond.c: make CondGetString easier to debug 2274 o simplify list usage 2275 o unit-tests: more 2276 22772020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 2278 2279 * VERSION (_MAKE_VERSION): 20200816 2280 Merge with NetBSD make, pick up 2281 o refactor unit-tests to be more fine grained 2282 not all tests moved yet 2283 22842020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 2285 2286 * VERSION (_MAKE_VERSION): 20200814 2287 Merge with NetBSD make, pick up 2288 o more str_concat variants 2289 o more enums for flags 2290 o var.c: cleanup for higher warnings level 2291 22922020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 2293 2294 * VERSION (_MAKE_VERSION): 20200810 2295 Merge with NetBSD make, pick up 2296 o more unit tests 2297 o general comment and style cleanup 2298 22992020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 2300 2301 * VERSION (_MAKE_VERSION): 20200808 2302 Merge with NetBSD make, pick up 2303 o enum.[ch]: streamline, enums for use in flags and debug output 2304 o cond.c: cleanup 2305 o var.c: reduce duplicate code for modifiers 2306 debug logging for Var_Parse 2307 more detailed debug output 2308 o more unit tests 2309 23102020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 2311 2312 * unit-tests/Makefile: -r for recursive and include Makefile.inc 2313 so I can run tests in meta mode 2314 supress extra noise if in meta mode 2315 2316 * VERSION (_MAKE_VERSION): 20200806 2317 Merge with NetBSD make, pick up 2318 o parse.c: remove VARE_WANTRES for LINT 2319 we just want to check parsing (for now). 2320 23212020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 2322 2323 * VERSION (_MAKE_VERSION): 20200805 2324 Merge with NetBSD make, pick up 2325 o make.1: Rework the description of dependence operators 2326 23272020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 2328 2329 * VERSION (_MAKE_VERSION): 20200803 2330 Merge with NetBSD make, pick up 2331 o revert some C99 usage, for max portability 2332 o unit-tests/lint 2333 23342020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 2335 2336 * VERSION (_MAKE_VERSION): 20200802 2337 Merge with NetBSD make, pick up 2338 o more unit tests 2339 23402020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 2341 2342 * Remove NetBSD specific plumbing from unit-tests/Makefile 2343 2344 * VERSION (_MAKE_VERSION): 20200801 2345 Merge with NetBSD make, pick up 2346 o make Var_Value return const 2347 o size_t for buf sizes 2348 o optimize some buffer operations - avoid strlen 2349 23502020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 2351 2352 * VERSION (_MAKE_VERSION): 20200731 2353 Merge with NetBSD make, pick up 2354 o var.c: fix undefinded behavior for incomplete :t modifier 2355 fixes unit-test/moderrs on Ubuntu 2356 o parse.c: When parsing variable assignments other than := 2357 if DEBUG(LINT) test substition of value, so we get a file and 2358 line number in the resulting error. 2359 o dir.c: fix parsing of nested braces in dependency lines 2360 add unit-tests 2361 23622020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 2363 2364 * VERSION (_MAKE_VERSION): 20200730 2365 Merge with NetBSD make, pick up 2366 o var.c: minor cleanup 2367 o unit-tests: more tests to improve code coverage 2368 23692020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 2370 2371 * VERSION (_MAKE_VERSION): 20200728 2372 Merge with NetBSD make, pick up 2373 o var.c: more optimizations 2374 23752020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 2376 2377 * VERSION (_MAKE_VERSION): 20200726 2378 Merge with NetBSD make, pick up 2379 o collapse lsd.lib into lst.c - reduce code size and allow inlining 2380 o lots of function comment updates 2381 o var.c: more optimizations 2382 o make return of Var_Parse const 2383 23842020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 2385 2386 * VERSION (_MAKE_VERSION): 20200720 2387 Merge with NetBSD make, pick up 2388 o DEBUG_HASH report stats at end and tone down the noise 2389 o var.c: each flag type gets its own prefix. 2390 move SysV string matching to var.c 2391 make ampersand in ${VAR:from=to&} an ordinary character 2392 cleanup and simplify implementation of modifiers 2393 o make.1: move documentation for assignment modifiers 2394 23952020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 2396 2397 * VERSION (_MAKE_VERSION): 20200718 2398 Merge with NetBSD make, pick up 2399 o DEBUG_HASH to see how well the hash tables are working 2400 24012020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 2402 2403 * bsd.after-import.mk: make sure we update unit-tests/Makefile 2404 24052020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 2406 2407 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 2408 2409 * VERSION (_MAKE_VERSION): 20200710 2410 Merge with NetBSD make, pick up 2411 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 2412 o meta.c: target flagged .META is out-of-date if meta file missing 2413 24142020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 2415 2416 * VERSION (_MAKE_VERSION): 20200709 2417 Merge with NetBSD make, pick up 2418 o cond.c: fix for compare_expression when doEval=0 2419 o unit-tests/Makefile: rework 2420 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 2421 24222020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 2423 2424 * VERSION (_MAKE_VERSION): 20200704 2425 Merge with NetBSD make, pick up 2426 (most of this by rillig@) 2427 o lots of style and white-space cleanup 2428 o lots more unit tests for variable modifiers 2429 o simplified description of some functions 2430 o str.c: refactor Str_Match 2431 o var.c: debugging output for :@ 2432 constify VarModify parameter 2433 fix :hash modifier on 16-bit platforms 2434 remove unnecessary forward declarations 2435 refactor ApplyModifier_SysV to have less indentation 2436 simplify code for :E and :R 2437 clean up code for :H and :T 2438 refactor ApplyModifiers 2439 2440 * var.c: we need stdint.h on some platforms to get uint32_t 2441 * unit-test/Makefile: we need to supress the specific error 2442 for RE substitution error in modmisc, since it varies accross 2443 different OS. 2444 24452020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 2446 2447 * VERSION (_MAKE_VERSION): 20200702 2448 Merge with NetBSD make, pick up 2449 o var.c: more improvements to avoiding unnecessary evaluation 2450 use enums for flags 2451 o remove flags arg to Var_Set which outside of var.c is always 0 2452 24532020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 2454 2455 * VERSION (_MAKE_VERSION): 20200701 2456 Merge with NetBSD make, pick up 2457 o var.c: with change to cond.c; ensure that nested variables 2458 within a variable name are expanded. 2459 o unit-tests/varmisc.mk: test for nested varname 2460 24612020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 2462 2463 * VERSION (_MAKE_VERSION): 20200629 2464 Merge with NetBSD make, pick up 2465 o cond.c: do not eval unnecessary terms of conditionals. 2466 24672020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 2468 2469 * VERSION (_MAKE_VERSION): 20200625 2470 Merge with NetBSD make, pick up 2471 o meta.c: report error if lseek in filemon_read fails 2472 24732020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 2474 2475 * VERSION (_MAKE_VERSION): 20200622 2476 Merge with NetBSD make, pick up 2477 o dieQuietly: ignore OP_SUBMAKE as too aggressive 2478 24792020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 2480 2481 * VERSION (_MAKE_VERSION): 20200619 2482 Merge with NetBSD make, pick up 2483 o str.c: performance improvement for Str_Match for multiple '*' 2484 o dieQuietly: supress the failure output from make 2485 when failing node is a sub-make or a sibling failed. 2486 This cuts down greatly on unhelpful noise at the end of 2487 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 2488 24892020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 2490 2491 * FILES: add LICENSE to appease some packagers. 2492 This is an attempt to fairly represent the license on almost 2493 200 files, which are almost all BSD-3-Clause 2494 The few exceptions being more liberal. 2495 2496 * VERSION (_MAKE_VERSION): 20200610 2497 Merge with NetBSD make, pick up 2498 o unit test for :Or 2499 25002020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 2501 2502 * VERSION (_MAKE_VERSION): 20200606 2503 Merge with NetBSD make, pick up 2504 o make.1: cleanup 2505 2506 * Makefile: fix depends for main.o which broke MAKE_VERSION 2507 25082020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 2509 2510 * VERSION (_MAKE_VERSION): 20200605 2511 Merge with NetBSD make, pick up 2512 o dir.c: cached_stats - don't confuse stat and lstat results. 2513 o var.c: add :Or for reverse sort. 2514 25152020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 2516 2517 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 2518 also if --with-filemon= specifies path to filemon.h 2519 set use_filemon=dev 2520 * dirname.c: remove include of namespace.h 2521 25222020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 2523 2524 * VERSION (_MAKE_VERSION): 20200517 2525 Merge with NetBSD make, pick up 2526 o modified dollar tests to avoid shell dependencies 2527 o new tests for .INCLUDEFROM 2528 25292020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 2530 2531 * unit-tests/dollar.mk: tweak '1 dollar literal' test 2532 to not depend so much on shell behavior 2533 25342020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 2535 2536 * VERSION (_MAKE_VERSION): 20200510 2537 Merge with NetBSD make, pick up 2538 o unit test for dollar handling 2539 25402020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 2541 2542 * VERSION (_MAKE_VERSION): 20200506 2543 Merge with NetBSD make, pick up 2544 o str.c: empty string does not match % pattern 2545 plus unit-test changes 2546 25472020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 2548 2549 * VERSION (_MAKE_VERSION): 20200504 2550 May the 4th be with you 2551 Merge with NetBSD make, pick up 2552 o var.c: import handling of old sysV style modifier using '%' 2553 o str.c: refactor brk_string 2554 o unit-tests: add test case for lazy conditions 2555 25562020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 2557 2558 * VERSION (_MAKE_VERSION): 20200418 2559 2560 * configure.in: use_makefile=no for Cygwin et al. 2561 case insensitive filesystems just don't work if both 2562 makefile and Makefile exist. 2563 NOTE: bmake does not support Cygwin and likely never will, 2564 but if brave souls want to try it - help them out. 2565 25662020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 2567 2568 * VERSION (_MAKE_VERSION): 20200402 2569 Merge with NetBSD make, pick up 2570 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 2571 a blank command is perfectly valid. 2572 25732020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 2574 2575 * VERSION (_MAKE_VERSION): 20200330 2576 Merge with NetBSD make, pick up 2577 o make.h: extern debug_file 2578 25792020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 2580 2581 * VERSION (_MAKE_VERSION): 20200318 2582 Merge with NetBSD make, pick up 2583 o meta.c: meta_oodate, check for corrupted meta file 2584 earlier and more often. 2585 25862020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 2587 2588 * VERSION (_MAKE_VERSION): 20200220 2589 25902020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 2591 2592 * boot-strap: unset MAKEFLAGS 2593 25942020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 2595 2596 * VERSION (_MAKE_VERSION): 20200212 2597 * meta.c: meta_compat_parent check for USE_FILEMON 2598 patch from Soeren Tempel 2599 26002020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 2601 2602 * VERSION: 20200205 2603 Merge with NetBSD make, pick up 2604 o meta.c: fix compat mode, need to call meta_job_output() 2605 o job.c: extra fds for meta mode not needed if using filemon_dev 2606 26072020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 2608 2609 * VERSION: 20200122 2610 Merge with NetBSD make, pick up 2611 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 2612 returns FALSE. 2613 26142020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 2615 2616 * VERSION: 20200121 2617 Merge with NetBSD make, pick up 2618 o filemon/filemon_{dev,ktrace}.c: allow selection of 2619 filemon implementation. filemon_dev.c uses the kernel module 2620 while filemon_ktrace.c leverages the fktrace api available in 2621 NetBSD. filemon_ktrace.c can hopefully form the basis for 2622 adding support for other tracing mechanisms such as strace on 2623 Linux. 2624 o meta.c: when target is out-of-date per normal make rules 2625 record value of .OODATE in meta file. 2626 26272019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 2628 2629 * VERSION: 20190926 2630 Merge with NetBSD make, pick up 2631 o parse.c: don't pass NULL to realpath(3) 2632 some versions cannot handle it. 2633 26342019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 2635 2636 * VERSION: 20190409 2637 Merge with NetBSD make, pick up 2638 o parse.c: ParseDoDependency: free paths rather than assert 2639 26402018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 2641 2642 * VERSION: 20181222 2643 2644 * configure.in: add --without-makefile to avoid generating 2645 makefile and make-bootstrap.sh 2646 2647 * include Makefile.inc if it exists 2648 2649 * Use Makefile and Makefile.config.in in unit-tests 2650 so we can use just: make obj && make && make test 2651 when bmake is already available. 2652 We add --without-makefile to CONFIGURE_ARGS in this case. 2653 2654 * tweak bsd.after-import.mk (captures Makefile.config etc 2655 after import to FreeBSD for example) to cope with all the above. 2656 26572018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 2658 2659 * VERSION: 20181221 2660 Merge with NetBSD make, pick up 2661 o parse.c: ParseVErrorInternal use .PARSEDIR 2662 and apply if relative, and then use .PARSEFILE 2663 for consistent result. 2664 26652018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 2666 2667 * VERSION: 20181220 2668 Merge with NetBSD make, pick up 2669 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 2670 is relative 2671 o var.c: avoid SEGFAULT in .unexport-env 2672 when MAKELEVEL is not set 2673 26742018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 2675 2676 * VERSION: 20181216 2677 Merge with NetBSD make, pick up 2678 o fix for unit-tests/varquote.mk on Debian 2679 26802018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 2681 2682 * VERSION: 20180919 2683 Merge with NetBSD make, pick up 2684 o var.c: add :q 2685 o dir.c: cleanup caching of stats 2686 26872018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 2688 2689 * Makefile.config.in: use += where it makes sense. 2690 26912018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2692 2693 * VERSION: 20180512 2694 Merge with NetBSD make, pick up 2695 o job.c: skip polling job token pipe 2696 26972018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2698 2699 * VERSION: 20180405 2700 Merge with NetBSD make, pick up 2701 o parse.c: be more cautious about detecting depenency line 2702 rather than sysV style include. 2703 27042018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 2705 2706 * VERSION: 20180222 2707 Merge with NetBSD make, pick up 2708 o parse.c: avoid calling sysconf for every call to loadfile 2709 27102018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2711 2712 * VERSION: 20180218 2713 Merge with NetBSD make, pick up 2714 o var.c: Var_Set handle NULL value anytime. 2715 27162018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 2717 2718 * VERSION: 20180212 2719 Merge with NetBSD make, pick up 2720 o parse.c: do not treat .info as warning with -W 2721 27222017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 2723 2724 * VERSION: 20171207 2725 Merge with NetBSD make, pick up 2726 o var.c: Var_Append use Var_Set if var not previously set 2727 so that VAR_CMD is handled correctly. 2728 Add a suitable unit-test. 2729 27302017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2731 2732 * VERSION (_MAKE_VERSION): 20171126 2733 2734 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 2735 since AC_TRY_COMPILE puts input inside main() 2736 which upsets modern compilers. 2737 27382017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 2739 2740 * VERSION: 20171118 2741 Merge with NetBSD make, pick up 2742 o var.c: do not append to variable set on command line 2743 add unit-test to catch this. 2744 27452017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 2746 2747 * VERSION: 20171028 2748 Merge with NetBSD make, pick up 2749 o main.c: ignore empty MAKEOBJDIR 2750 2751 * Makefile.config.in: 2752 make @prefix@ @machine*@ and @default_sys_path@ defaults. 2753 27542017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 2755 2756 * VERSION: 20171005 2757 2758 * unit-tests/dotwait.mk: redirect stderr through pipe for more 2759 consistent result on some platforms. 2760 27612017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 2762 2763 * machine.sh: entry for AIX 2764 27652017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2766 2767 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 2768 to a file that can be included by configure as well as make. 2769 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 2770 27712017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 2772 2773 * Makefile (_MAKE_VERSION): 20170810 2774 Merge with NetBSD make, pick up 2775 o meta.c: if target is in subdir we only need subdir name in 2776 meta_name. 2777 27782017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 2779 2780 * Makefile (_MAKE_VERSION): 20170720 2781 Merge with NetBSD make, pick up 2782 o compat.c: pass SIGINT etc onto child and wait for it to exit 2783 before we self-terminate. 2784 27852017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 2786 2787 * Makefile (_MAKE_VERSION): 20170711 2788 forgot to update after merge on 20170708 ;-) 2789 o main.c: refactor to reduce size of main function. 2790 add -v option to always fully expand values. 2791 o meta.c: ensure command output in meta file has ending newline 2792 even when filemon not being used. 2793 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 2794 pathname via ':L' since any ':' in pathname breaks that. 2795 Instead set a '${.p.}' to pathname in the target context and 2796 use that. 2797 27982017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2799 2800 * Makefile (_MAKE_VERSION): 20170510 2801 Merge with NetBSD make, pick up 2802 o main.c: Main_SetObjdir: ensure buf2 is in scope 2803 28042017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 2805 2806 * Makefile (_MAKE_VERSION): 20170505 2807 see mk/ChangeLog 2808 28092017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2810 2811 * parse.c: not everyone has stdint.h 2812 28132017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 2814 2815 * Makefile (_MAKE_VERSION): 20170501 2816 see mk/ChangeLog 2817 28182017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2819 2820 * Makefile (_MAKE_VERSION): 20170421 2821 Merge with NetBSD make, pick up 2822 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 2823 28242017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2825 2826 * Makefile (_MAKE_VERSION): 20170420 2827 Merge with NetBSD make, pick up 2828 o main.c: only use -C arg "as is" if it contains no 2829 relative component. 2830 28312017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2832 2833 * Makefile (_MAKE_VERSION): 20170418 2834 Merge with NetBSD make, pick up 2835 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 2836 28372017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 2838 2839 * Makefile (_MAKE_VERSION): 20170417 2840 Merge with NetBSD make, pick up 2841 o fixes a number of coverity complaints 2842 - check return value of fseek, fcntl 2843 - plug memory leak in Dir_FindFile, Var_LoopExpand, 2844 JobPrintCommand, ParseTraditionalInclude 2845 - use bmake_malloc() where NULL is not tollerated 2846 - use MAKE_ATTR_UNUSED rather that kludges like 2847 return(unused ? 0 : 0) 2848 - use purge_cached_realpaths() rather than abuse cached_realpath() 2849 28502017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 2851 2852 * Makefile (_MAKE_VERSION): 20170413 2853 Merge with NetBSD make, pick up 2854 o main.c: when setting .OBJDIR ignore '$' in paths. 2855 2856 * job.c: use MALLOC_OPTIONS to set malloc_options. 2857 28582017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2859 2860 * Makefile (_MAKE_VERSION): 20170411 2861 Merge with NetBSD make, pick up 2862 o str.c: Str_Match: allow [^a-z] to behave as expected. 2863 28642017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2865 2866 * Makefile (_MAKE_VERSION): 20170326 2867 Merge with NetBSD make, pick up 2868 o main.c: purge relative paths from realpath cache when .OBJDIR 2869 is changed. 2870 28712017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 2872 2873 * Makefile (_MAKE_VERSION): 20170311 2874 Merge with NetBSD make, pick up 2875 o main.c: only use -C arg "as is" if it starts with '/'. 2876 28772017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 2878 2879 * Makefile (_MAKE_VERSION): 20170301 2880 Merge with NetBSD make, pick up 2881 o main.c: use -C arg "as is" rather than getcwd() 2882 if they identify the same directory. 2883 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 2884 28852017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 2886 2887 * Makefile (_MAKE_VERSION): 20170201 2888 Merge with NetBSD make, pick up 2889 o var.c: allow :_=var and avoid use of special context. 2890 28912017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 2892 2893 * Makefile (_MAKE_VERSION): 20170130 2894 Merge with NetBSD make, pick up 2895 o var.c: add :range and :_ 2896 o main.c: partially initialize Dir_* before MainParseArgs() 2897 can be called. 2898 If -V, skip Main_ExportMAKEFLAGS() 2899 29002017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 2901 2902 * Makefile (_MAKE_VERSION): 20170114 2903 Merge with NetBSD make, pick up 2904 o var.c: allow specifying the utc value used by :{gm,local}time 2905 29062016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2907 2908 * Makefile (_MAKE_VERSION): 20161212 2909 Merge with NetBSD make, pick up 2910 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 2911 29122016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 2913 2914 * Makefile (_MAKE_VERSION): 20161209 2915 Merge with NetBSD make, pick up 2916 o main.c: cleanup setting of .OBJDIR 2917 o parse.c: avoid coredump from (var)=val 2918 29192016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2920 2921 * Makefile (_MAKE_VERSION): 20161126 2922 Merge with NetBSD make, pick up 2923 o make.c: Make_OODate: report src node name if path not set 2924 29252016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2926 2927 * Makefile (_MAKE_VERSION): 20160926 2928 Merge with NetBSD make, pick up 2929 o support for .DELETE_ON_ERROR: (remove targets that fail) 2930 29312016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 2932 2933 * Makefile MAN: tweak .Dt to match ${PROG} 2934 29352016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2936 2937 * Makefile (_MAKE_VERSION): 20160818 2938 its a neater number; pick up whitespace fixes to man page. 2939 29402016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 2941 2942 * Makefile (_MAKE_VERSION): 20160817 2943 Merge with NetBSD make, pick up 2944 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 2945 so we can call it before adding entries to missingFiles. 2946 Thus we do not track files we have been told to ignore. 2947 29482016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 2949 2950 * Makefile (_MAKE_VERSION): 20160815 2951 Merge with NetBSD make, pick up 2952 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 2953 pathnames, and skip if the expansion is empty. 2954 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 2955 29562016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 2957 2958 * Makefile (_MAKE_VERSION): 20160812 2959 Merge with NetBSD make, pick up 2960 o meta.c: remove all missingFiles entries that match a deleted 2961 dir. 2962 o main.c: set .ERROR_CMD if possible. 2963 29642016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2965 2966 * Makefile (_MAKE_VERSION): 20160606 2967 Merge with NetBSD make, pick up 2968 o dir.c: extend mtimes cache to others via cached_stat() 2969 29702016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2971 2972 * Makefile (_MAKE_VERSION): 20160604 2973 Merge with NetBSD make, pick up 2974 o meta.c: missing filemon data is only relevant if we read a 2975 meta file. 2976 Also do not return oodate for a missing metafile if gn->path 2977 points to .CURDIR 2978 29792016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2980 2981 * Makefile (_MAKE_VERSION): 20160602 2982 Merge with NetBSD make, pick up 2983 o cached_realpath(): avoid hitting filesystem more than necessary. 2984 o meta.c: refactor need_meta decision, add knobs for 2985 missing meta file and filemon data wrt out-of-datedness. 2986 29872016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2988 2989 * Makefile (_MAKE_VERSION): 20160528 2990 2991 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 2992 29932016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 2994 2995 * Makefile (_MAKE_VERSION): 20160512 2996 Merge with NetBSD make, pick up 2997 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 2998 this is useful for gcov builds. 2999 o propagate errors from filemon(4). 3000 30012016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 3002 3003 * Makefile (_MAKE_VERSION): 20160509 3004 Merge with NetBSD make, pick up 3005 o remove use of non-standard types u_int etc. 3006 o meta.c: apply realpath() before matching against metaIgnorePaths 3007 30082016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 3009 3010 * Makefile (_MAKE_VERSION): 20160404 3011 Merge with NetBSD make, pick up 3012 o allow makefile to set .MAKE.JOBS 3013 3014 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 3015 30162016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 3017 3018 * Makefile (_MAKE_VERSION): 20160315 3019 Merge with NetBSD make, pick up 3020 o fix handling of archive members 3021 30222016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3023 3024 * Makefile (_MAKE_VERSION): rename variable to avoid interference 3025 with checks for ${MAKE_VERSION} 3026 30272016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 3028 3029 * Makefile (MAKE_VERSION): 20160310 3030 Merge with NetBSD make, pick up 3031 o meta.c: treat missing Read file same as Write, incase we Delete it. 3032 30332016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 3034 3035 * Makefile (MAKE_VERSION): 20160307 3036 Merge with NetBSD make, pick up 3037 o var.c: fix :ts\nnn to be octal by default. 3038 o meta.c: meta_finish() to cleanup memory. 3039 30402016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 3041 3042 * Makefile (MAKE_VERSION): 20160226 3043 Merge with NetBSD make, pick up 3044 o meta.c: allow meta file for makeDepend if makefiles want it. 3045 30462016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 3047 3048 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 3049 for backwards compatability. 3050 3051 * Makefile (MAKE_VERSION): 20160220 3052 Merge with NetBSD make, pick up 3053 o var.c: add knob to control handling of '$$' in := 3054 30552016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 3056 3057 * Makefile (MAKE_VERSION): 20160218 3058 Merge with NetBSD make, pick up 3059 o var.c: add .export-literal allows us to fix sys.clean-env.mk 3060 post the changes to Var_Subst. 3061 Var_Subst now takes flags, and does not consume '$$' in := 3062 30632016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 3064 3065 * Makefile (MAKE_VERSION): 20160217 3066 Merge with NetBSD make, pick up 3067 o var.c: preserve '$$' in := 3068 o parse.c: add .dinclude for handling included 3069 makefile like .depend 3070 30712015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 3072 3073 * Makefile (MAKE_VERSION): 20151220 3074 Merge with NetBSD make, pick up 3075 o suff.c: re-initialize suffNull when clearing suffixes. 3076 30772015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 3078 3079 * Makefile (MAKE_VERSION): 20151201 3080 Merge with NetBSD make, pick up 3081 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 3082 o meta.c: meta_oodate: use lstat(2) for checking link target 3083 in case it is a symlink. 3084 o var.c: avoid calling brk_string and Var_Export1 with empty 3085 strings. 3086 30872015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3088 3089 * Makefile (MAKE_VERSION): 20151126 3090 Merge with NetBSD make, pick up 3091 o parse.c: ParseTrackInput don't access beyond 3092 end of old value. 3093 30942015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 3095 3096 * Makefile (MAKE_VERSION): 20151022 3097 3098 * Add support for BSD/OS which lacks inttypes.h 3099 and really needs sys/param.h for sys/sysctl.h 3100 also 'type' is not a shell builtin. 3101 3102 * var.c: eliminate uint32_t and need for inttypes.h 3103 3104 * main.c: PrintOnError flush stdout before run .ERROR 3105 3106 * parse.c: cope with _SC_PAGESIZE not being defined. 3107 3108 31092015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 3110 3111 * Makefile (MAKE_VERSION): 20151020 3112 Merge with NetBSD make, pick up 3113 o var.c: fix uninitialized var 3114 31152015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 3116 3117 * var.c: the conditional expressions used with ':?' can be 3118 expensive, if already discarding do not evaluate or expand 3119 anything. 3120 31212015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3122 3123 * Makefile (MAKE_VERSION): 20151010 3124 Merge with NetBSD make, pick up 3125 o Add Boolean wantit flag to Var_Subst and Var_Parse 3126 when FALSE we know we are discarding the result and can 3127 skip operations like Cmd_Exec. 3128 31292015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3130 3131 * Makefile (MAKE_VERSION): 20151009 3132 Merge with NetBSD make, pick up 3133 o var.c: don't check for NULL before free() 3134 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 3135 31362015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3137 3138 * Makefile (MAKE_VERSION): 20150910 3139 Merge with NetBSD make, pick up 3140 o main.c: with -w print Enter/Leaving messages for objdir too 3141 if necessary. 3142 o centralize shell metachar handling 3143 3144 * FILES: add metachar.[ch] 3145 31462015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3147 3148 * Makefile (MAKE_VERSION): 20150606 3149 Merge with NetBSD make, pick up 3150 o make.1: document .OBJDIR target 3151 31522015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3153 3154 * Makefile (MAKE_VERSION): 20150505 3155 Merge with NetBSD make, pick up 3156 o cond.c: be strict about lhs of comparison when evaluating .if 3157 but less so when called from variable expansion. 3158 o unit-tests/cond2.mk: test various error conditions 3159 31602015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 3161 3162 * machine.sh (MACHINE): Add Bitrig 3163 patch from joerg@netbsd.org 3164 31652015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 3166 3167 * Makefile (MAKE_VERSION): 20150418 3168 Merge with NetBSD make, pick up 3169 o job.c: use memmove() rather than memcpy() 3170 3171 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 3172 case, so skip it. 3173 31742015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3175 3176 * Makefile (MAKE_VERSION): 20150411 3177 bump version - only mk/ changes. 3178 31792015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3180 3181 * Makefile (MAKE_VERSION): 20150410 3182 Merge with NetBSD make, pick up 3183 o document different handling of '-' in jobs mode vs compat 3184 o fix jobs mode so that '-' only applies to whole job 3185 when shell lacks hasErrCtl 3186 o meta.c: use separate vars to track lcwd and latestdir (read) 3187 per process 3188 31892015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 3190 3191 * Makefile (MAKE_VERSION): 20150401 3192 Merge with NetBSD make, pick up 3193 o meta.c: close meta file in child 3194 3195 * Makefile: use BINDIR.bmake if set. 3196 Same for MANDIR and SHAREDIR 3197 Handy for testing release candidates 3198 in various environments. 3199 32002015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 3201 3202 * move initialization of savederr to block where it is used 3203 to avoid spurious warning from gcc5 3204 32052014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3206 3207 * Makefile (MAKE_VERSION): 20141111 3208 just a cooler number 3209 32102014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 3211 3212 * Makefile (MAKE_VERSION): 20141105 3213 Merge with NetBSD make, pick up 3214 o revert major overhaul of suffix handling 3215 and POSIX compliance - too much breakage 3216 and impossible to make backwards compatible. 3217 o we still have the new unit test structure which is ok. 3218 o meta.c ensure "-- filemon" is at start of line. 3219 32202014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 3221 3222 * configure.in: test that result of getconf PATH_MAX is numeric 3223 and discard if not. Apparently needed for Hurd. 3224 32252014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3226 3227 * Makefile (MAKE_VERSION): 20140830 3228 Merge with NetBSD make, pick up 3229 o major overhaul of suffix handling 3230 o improved POSIX compliance 3231 o overhauled unit-tests 3232 32332014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3234 3235 * Makefile (MAKE_VERSION): 20140620 3236 Merge with NetBSD make, pick up 3237 o var.c return varNoError rather than var_Error for ::= modifiers. 3238 32392014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 3240 3241 * Makefile (MAKE_VERSION): 20140522 3242 Merge with NetBSD make, pick up 3243 o var.c detect some parse errors. 3244 32452014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 3246 3247 * Fix spelling errors - patch from Pedro Giffuni 3248 32492014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 3250 3251 * Makefile (MAKE_VERSION): 20140214 3252 Merge with NetBSD make, pick up 3253 o .INCLUDEFROM* 3254 o use Var_Value to get MAKEOBJDIR[PREFIX] 3255 o reduced realloc'ign in brk_string. 3256 * configure.in: add a check for compiler supporting __func__ 3257 32582014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3259 3260 * boot-strap: ignore mksrc=none 3261 32622014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 3263 3264 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 3265 32662014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3267 3268 * Makefile (MAKE_VERSION): 20140101 3269 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 3270 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 3271 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 3272 Hurd) 3273 * configure.in: Add AC_PREREQ and check for 3274 sysctl; patch from Andrew Shadura andrewsh at debian.org 3275 32762013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3277 3278 * Makefile (MAKE_VERSION): 20131010 3279 * lose the const from arg to systcl to avoid problems on older BSDs. 3280 32812013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3282 3283 * Makefile (MAKE_VERSION): 20131001 3284 Merge with NetBSD make, pick up 3285 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 3286 hw.machine_arch if necessary. 3287 o meta.c: meta_oodate - need to look at src of Link and target 3288 of Move as well. 3289 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 3290 provide __arraycount() if needed. 3291 32922013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 3293 3294 * Makefile (MAKE_VERSION): 20130904 3295 Merge with NetBSD make, pick up 3296 o Add VAR_INTERNAL context, so that internal setting of 3297 MAKEFILE does not override value set by makefiles. 3298 32992013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 3300 3301 * Makefile (MAKE_VERSION): 20130902 3302 Merge with NetBSD make, pick up 3303 o CompatRunCommand: only apply shellErrFlag when errCheck is true 3304 33052013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3306 3307 * Makefile (MAKE_VERSION): 20130828 3308 Merge with NetBSD make, pick up 3309 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 3310 o Call Job_SetPrefix() from Job_Init() so makefiles have 3311 opportunity to set .MAKE.JOB.PREFIX 3312 33132013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 3314 3315 * Makefile (MAKE_VERSION): 20130730 3316 Merge with NetBSD make, pick up 3317 o Allow suppression of --- job -- tokens by setting 3318 .MAKE.JOB.PREFIX empty. 3319 33202013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 3321 3322 * Makefile (MAKE_VERSION): 20130716 3323 Merge with NetBSD make, pick up 3324 o number of gmake compatibility tweaks 3325 -w for gmake style entering/leaving messages 3326 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 3327 handle MAKEFLAGS containing only letters. 3328 o when overriding a GLOBAL variable on the command line, 3329 delete it from GLOBAL context so -V doesn't show the wrong 3330 value. 3331 33322013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 3333 3334 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 3335 3336 * Makefile (MAKE_VERSION): 20130706 3337 Merge with NetBSD make, pick up 3338 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 3339 true so that CompatRunCommand() can use it, to ensure 3340 consistent behavior with jobs mode. 3341 o use MAKE_LEVEL_ENV to define the variable to propagate 3342 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 3343 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 3344 paths to ignore. 3345 33462013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3347 3348 * Makefile (MAKE_VERSION): 20130604 3349 Merge with NetBSD make, pick up 3350 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 3351 to avoid leaking descriptors. 3352 33532013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 3354 3355 * Makefile (MAKE_VERSION): 20130528 3356 Merge with NetBSD make, pick up 3357 o var.c: cleanup some left-overs in VarHash() 3358 33592013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3360 3361 * Makefile (MAKE_VERSION): 20130520 3362 generate manifest from component FILES rather than have to 3363 update FILES when mk/FILES changes. 3364 33652013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3366 3367 * Makefile (MAKE_VERSION): 20130518 3368 Merge with NetBSD make, pick up 3369 o suff.c: don't skip all processsing for .PHONY targets 3370 else wildcard srcs do not get expanded. 3371 o var.c: expand name of variable to delete if necessary. 3372 33732013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3374 3375 * Makefile (MAKE_VERSION): 20130330 3376 Merge with NetBSD make, pick up 3377 o meta.c: refine the handling of .OODATE in commands. 3378 Rather than suppress command comparison for the entire script 3379 as though .NOMETA_CMP had been used, only suppress it for the 3380 one command line. 3381 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 3382 suppress comparison of a command without otherwise affecting it. 3383 o make.1: document that 3384 33852013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 3386 3387 * Makefile (MAKE_VERSION): 20130321 3388 yes, not quite right but its a cooler number. 3389 Merge with NetBSD make, pick up 3390 o parse.c: fix ParseGmakeExport to be portable 3391 and add a unit-test. 3392 * meta.c: call meta_init() before makefiles are read and if built 3393 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 3394 this let's makefiles test for support. 3395 Call meta_mode_init() to process .MAKE.MODE. 3396 33972013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 3398 3399 * Makefile (MAKE_VERSION): 20130305 3400 Merge with NetBSD make, pick up 3401 o run .STALE: target when a dependency from .depend is missing. 3402 o job.c: add Job_RunTarget() for the above and .BEGIN 3403 34042013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 3405 3406 * Makefile (MAKE_VERSION): 20130303 3407 Merge with NetBSD make, pick up 3408 o main.c: set .MAKE.OS to utsname.sysname 3409 o job.c: more checks for read and poll errors 3410 o var.c: lose VarChangeCase() saves 4% time 3411 34122013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 3413 3414 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 3415 want to use MAKEOBJDIR 3416 34172013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 3418 3419 * Merge with NetBSD make, pick up 3420 o make.1: more info on how shell commands are handled. 3421 o job.c,main.c: detect write errors to job pipes. 3422 34232013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 3424 3425 * Makefile (MAKE_VERSION): 20130123 3426 Merge with NetBSD make, pick up 3427 o meta.c: if script uses .OODATE and meta_oodate() decides 3428 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 3429 o var.c: in debug output indicate which variabale modifiers 3430 apply to. 3431 o remove Check_Cwd logic the makefiles have been fixed. 3432 34332012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 3434 3435 * makefile.in: add a simple makefile for folk who insist on 3436 ./configure; make; make install 3437 it just runs boot-strap 3438 * include mk/* to accommodate the above 3439 * boot-strap: re-work to accommodate the above 3440 mksrc defaults to $Mydir/mk 3441 allow op={configure,build,install,clean,all} 3442 add options to facilitate install 3443 * Makefile.config.in: just the bits set by configure 3444 * Makefile: bump version to 20121212 3445 abandon Makefile.in (NetBSD Makefile) 3446 leverage mk/* instead 3447 * configure.in: ensure srcdir is absolute 3448 34492012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 3450 3451 * Makefile.in (MAKE_VERSION): 20121111 3452 fix generation of bmake.cat1 3453 34542012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 3455 3456 * Makefile.in (MAKE_VERSION): 20121109 3457 Merge with NetBSD make, pick up 3458 o make.c: MakeBuildChild: return 0 so search continues if a 3459 .ORDER dependency is detected. 3460 o unit-tests/order: test the above 3461 34622012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3463 3464 * Makefile.in (MAKE_VERSION): 20121102 3465 Merge with NetBSD make, pick up 3466 o cond.c: allow cond_state[] to grow. 3467 In meta mode with a very large tree, we can hit the limit 3468 while processing dirdeps. 3469 34702012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 3471 3472 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 3473 34742012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3475 3476 * Makefile.in (MAKE_VERSION): 20121010 3477 o protect syntax that only bmake parses correctly. 3478 o remove auto setting of FORCE_MACHINE, use configure's 3479 --with-force-machine=whatever if that is desired. 3480 34812012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 3482 3483 * Makefile.in: do not lose history from make.1 when generating bmake.1 3484 34852012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 3486 3487 * Makefile.in (MAKE_VERSION): 20121007 3488 Merge with NetBSD make, pick up 3489 o compat.c: ignore empty commands - same as jobs mode. 3490 o make.1: document meta chars that cause use of shell 3491 34922012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 3493 3494 * Makefile.in (MAKE_VERSION): bump version to 20120911 3495 * bsd.after-import.mk: include Makefile.inc early and allow it to 3496 override PROG 3497 34982012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 3499 3500 * Makefile.in (MAKE_VERSION): bump version to 20120831 3501 Merge with NetBSD make, pick up 3502 o cast sizeof() to int for comparison 3503 o minor make.1 tweak 3504 35052012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 3506 3507 * Makefile.in (MAKE_VERSION): bump version to 20120830 3508 Merge with NetBSD make, pick up 3509 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 3510 o debug flag -dV causes -V to show raw value regardless. 3511 35122012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 3513 3514 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 3515 gets SRCTOP set. 3516 35172012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 3518 3519 * Makefile.in (MAKE_VERSION): bump version to 20120704 3520 Merge with NetBSD make, pick up 3521 o Job_ParseShell should call Shell_Init if it has been 3522 previously called. 3523 * Makefile.in: set USE_META based on configure result. 3524 also .PARSEDIR is safer indicator of bmake. 3525 35262012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 3527 3528 * Makefile.in: bump version to 20120626 3529 ensure CPPFLAGS is in CFLAGS 3530 * meta.c: avoid nested externs 3531 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 3532 35332012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 3534 3535 * Makefile.in (MAKE_VERSION): bump version to 20120620 3536 Merge with NetBSD make, pick up 3537 o make_malloc.c: avoid including make_malloc.h again 3538 3539 * Makefile.in: avoid bmake only syntax or protect with 3540 .if defined(.MAKE.LEVEL) 3541 * bsd.after-import.mk: replace .-include with .sinclude 3542 ensure? SRCTOP gets a value 3543 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 3544 35452012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 3546 3547 * Makefile.in (MAKE_VERSION): bump version to 20120612 3548 Merge with NetBSD make, pick up 3549 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 3550 for greater portability. 3551 o unit-tests/forloop: check that .for works as expected wrt 3552 number of times and with "quoted strings". 3553 35542012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3555 3556 * Makefile.in (MAKE_VERSION): bump version to 20120606 3557 Merge with NetBSD make, pick up 3558 o compat.c: use kill(2) rather than raise(3). 3559 * configure.in: look for sys/dev/filemon 3560 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 3561 and pass BOOTSTRAP_XTRAS to boot-strap. 3562 35632012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3564 3565 * Makefile.in (MAKE_VERSION): bump version to 20120604 3566 Merge with NetBSD make, pick up 3567 o util.c and var.c share same var for tracking if environ 3568 has been reallocated. 3569 o util.c provide getenv with setenv. 3570 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 3571 when the shell actively strips .MAKE.* from the environment. 3572 We still refer to the variable always as .MAKE.LEVEL 3573 * util.c fix bug in findenv() was finding prefix of name. 3574 * compat.c: re-raising SIGINT etc after running .INTERRUPT 3575 results in more reliable termination of all activity on many 3576 platforms. 3577 35782012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 3579 3580 * Makefile.in (MAKE_VERSION): bump version to 20120602 3581 Merge with NetBSD make, pick up 3582 o for.c: handle quoted items in .for list 3583 35842012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 3585 3586 * Makefile.in (MAKE_VERSION): bump version to 20120530 3587 Merge with NetBSD make, pick up 3588 o compat.c: ignore empty command. 3589 35902012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3591 3592 * Makefile.in (MAKE_VERSION): bump version to 20120524 3593 * FILES: add bsd.after-import.mk: 3594 A simple means of integrating bmake into a BSD build system. 3595 35962012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 3597 3598 * Makefile.in (MAKE_VERSION): bump version to 20120520 3599 Merge with NetBSD make, pick up 3600 o increased limit for nested conditionals. 3601 36022012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 3603 3604 * Makefile.in (MAKE_VERSION): bump version to 20120518 3605 Merge with NetBSD make, pick up 3606 o use _exit(2) in signal hanlder 3607 o Don't use the [dir] cache when building nodes that might have 3608 changed since the last exec. 3609 o Avoid nested extern declaration warnings. 3610 36112012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 3612 3613 * meta.c (fgetLine): avoid %z - not portable. 3614 * parse.c: Since we moved include of sys/mman.h 3615 and def's of MAP_COPY etc. we got dups from a merge. 3616 36172012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 3618 3619 * Makefile.in (MAKE_VERSION): bump version to 20120420 3620 Merge with NetBSD make, pick up 3621 o restore duplicate supression in .MAKE.MAKEFILES 3622 runtime saving can be significant. 3623 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 3624 consumption up to 20%. 3625 36262012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3627 3628 * Makefile.in (MAKE_VERSION): bump version to 20120420 3629 Merge with NetBSD make, pick up 3630 o remove duplicate supression in .MAKE.MAKEFILES 3631 o improved dir cache behavior 3632 o gmake'ish export command 3633 36342012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 3635 3636 * Makefile.in (MAKE_VERSION): bump version to 20120325 3637 Merge with NetBSD make, pick up 3638 o fix parsing of :[#] in conditionals. 3639 36402012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 3641 3642 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 3643 since some systems cannot cope with .Nx <version> 3644 36452011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 3646 3647 * Makefile.in (MAKE_VERSION): bump version to 20111111 3648 Merge with NetBSD make, pick up 3649 o debug output for .PARSEDIR and .PARSEFILE 3650 36512011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 3652 3653 * Makefile.in (MAKE_VERSION): bump version to 20111010 3654 36552011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 3656 3657 * boot-strap: check for an expected file in the dirs we look for. 3658 * make-bootstrap.sh: pass on LDSTATIC 3659 36602011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 3661 3662 * Makefile.in (MAKE_VERSION): bump version to 20111001 3663 Merge with NetBSD make, pick up 3664 o ensure .PREFIX is set for .PHONY 3665 and .TARGET set for .PHONY run via .END 3666 o __dead used consistently 3667 36682011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 3669 3670 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 3671 36722011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 3673 3674 * Makefile.in (MAKE_VERSION): bump version to 20110905 3675 Merge with NetBSD make, pick up 3676 o meta_oodate: ignore makeDependfile 3677 36782011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 3679 3680 * Makefile.in (MAKE_VERSION): bump version to 20110828 3681 Merge with NetBSD make, pick up 3682 o silent=yes in .MAKE.MODE causes meta mode to mark targets 3683 as SILENT if a .meta file is created 3684 36852011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 3686 3687 * Makefile.in (MAKE_VERSION): bump version to 20110818 3688 Merge with NetBSD make, pick up 3689 o in meta mode, if target flagged .META a missing .meta file 3690 means target is out-of-date 3691 o fixes for gcc 4.5 warnings 3692 o simplify job printing code 3693 36942011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 3695 3696 * Makefile.in (MAKE_VERSION): bump version to 20110808 3697 Merge with NetBSD make, pick up 3698 o do not touch OP_SPECIAL targets when doing make -t 3699 37002011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 3701 3702 * Makefile.in (MAKE_VERSION): bump version to 20110622 3703 Merge with NetBSD make, pick up 3704 o meta_oodate detect corrupted .meta file and declare oodate. 3705 * configure.in: add check for setsid 3706 37072011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 3708 3709 * Merge with NetBSD make, pick up 3710 o unit-tests/modts now works on MirBSD 3711 37122011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 3713 3714 * Makefile.in (MAKE_VERSION): bump version to 20110606 3715 Merge with NetBSD make, pick up 3716 o ApplyModifiers: when we parse a variable which is not 3717 the entire modifier string, or not followed by ':', do not 3718 consider it as containing modifiers. 3719 o loadfile: ensure newline at end of mapped file. 3720 37212011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3722 3723 * Makefile.in (MAKE_VERSION): bump version to 20110505 3724 Merge with NetBSD make, pick up 3725 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 3726 of make's control. In meta mode, any generated file within 3727 said bailiwick, which is found to be missing, causes current 3728 target to be out-of-date. 3729 37302011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 3731 3732 * Makefile.in (MAKE_VERSION): bump version to 20110411 3733 Merge with NetBSD make, pick up 3734 o when long modifiers fail to match, check sysV style. 3735 - add a test case 3736 37372011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 3738 3739 * Makefile.in (MAKE_VERSION): bump version to 20110410 3740 Merge with NetBSD make, pick up 3741 o :hash - cheap 32bit hash of value 3742 o :localtime, :gmtime - use value as format string for strftime. 3743 37442011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 3745 3746 * Makefile.in (MAKE_VERSION): bump version to 20110330 3747 mostly because its a cooler version. 3748 Merge with NetBSD make, pick up 3749 o NetBSD tags for meta.[ch] 3750 o job.c call meta_job_finish() after meta_job_error(). 3751 o meta_job_error() should call meta_job_finish() to ensure 3752 .meta file is closed, and safe to copy - if .ERROR target wants. 3753 meta_job_finish() is safe to call repeatedly. 3754 37552011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 3756 3757 * unit-tests/modts: use printf if it is a builtin, 3758 to save us from MirBSD 3759 3760 * Makefile.in (MAKE_VERSION): bump version to 20110329 3761 Merge with NetBSD make, pick up 3762 o fix for use after free() in CondDoExists(). 3763 o meta_oodate() report extra commands and return earlier. 3764 37652011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 3766 3767 * Makefile.in (MAKE_VERSION): bump version to 20110327 3768 Merge with NetBSD make, pick up 3769 o meta.c, if .MAKE.MODE contains curdirOk=yes 3770 allow creating .meta files in .CURDIR 3771 * boot-strap (TOOL_DIFF): aparently at least on linux distro 3772 formats the output of 'type' differently - so eat any "()" 3773 37742011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 3775 3776 * Makefile.in (MAKE_VERSION): bump version to 20110306 3777 Merge with NetBSD make, pick up 3778 o meta.c, only do getcwd() once 3779 37802011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 3781 3782 * Makefile.in (MAKE_VERSION): bump version to 20110305 3783 Merge with NetBSD make, pick up 3784 o correct sysV substitution handling of empty lhs and variable 3785 o correct exists() check for dir with trailing / 3786 o correct handling of modifiers for non-existant variables 3787 during evaluation of conditionals. 3788 o ensure MAP_FILE is defined. 3789 o meta.c use curdir[] now exported by main.c 3790 37912011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 3792 3793 * Makefile.in (MAKE_VERSION): bump version to 20110225 3794 Merge with NetBSD make, pick up 3795 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 3796 makefiles have been read. 3797 o fix example of :? modifier in man page. 3798 37992011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 3800 3801 * Makefile.in (MAKE_VERSION): bump version to 20110214 3802 Merge with NetBSD make, pick up 3803 o meta.c handle realpath() failing when generating meta file 3804 name. 3805 3806 * sigcompat.c: convert to ansi so we can use higher warning levels. 3807 3808 38092011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 3810 3811 * Makefile.in (MAKE_VERSION): bump version to 20110207 3812 Merge with NetBSD make, pick up 3813 o fix for bug in meta mode. 3814 38152011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 3816 3817 * parse.c: SunOS 5.8 at least does not have MAP_FILE 3818 38192011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 3820 3821 * Makefile.in (MAKE_VERSION): bump version to 20110101 3822 Merge with NetBSD make, pick up 3823 o use mmap(2) if available, for reading makefiles 3824 38252010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 3826 3827 * Makefile.in (MAKE_VERSION): bump version to 20101215 3828 Merge with NetBSD make, pick up 3829 o ensure meta_job_error() does not report a previous .meta file 3830 as being culprit. 3831 38322010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 3833 3834 * Makefile.in (MAKE_VERSION): bump version to 20101210 3835 Merge with NetBSD make, pick up 3836 o meta_oodate: track cwd per process, and only consider target 3837 out-of-date if missing file is outside make's CWD. 3838 Ignore files in /tmp/ etc. 3839 o to ensure unit-tests results match, need to control LC_ALL 3840 as well as LANG. 3841 o fix for parsing bug in var.c 3842 38432010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 3844 3845 * Makefile.in (MAKE_VERSION): bump version to 20101126 3846 Merge with NetBSD make, pick up 3847 o if stale dependency is an IMPSRC, search via .PATH 3848 o meta_oodate: if a referenced file is missing, target is 3849 out-of-date. 3850 o meta_oodate: if a target uses .OODATE in its commands, 3851 it (.OODATE) needs to be recomputed. 3852 o keep a pointer to youngest child node, rather than just its 3853 mtime. 3854 38552010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 3856 3857 * Makefile.in (MAKE_VERSION): bump version to 20101101 3858 38592010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 3860 3861 * machine.sh: like os.sh, 3862 allow for uname -p producing useless drivel 3863 38642010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 3865 3866 * boot-strap: document configure knobs for meta and filemon. 3867 3868 * Makefile.in (MAKE_VERSION): bump version to 20100911 3869 Merge with NetBSD make, pick up 3870 o meta.c - meta mode 3871 3872 * make-bootstrap.sh.in: handle meta.c 3873 * configure.in: add knobs for use_meta and filemon_h 3874 also, look for dirname, str[e]sep and strlcpy 3875 * util.c: add simple err[x] and warn[x] 3876 38772010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 3878 3879 * boot-strap (TOOL_DIFF): set this to ensure tests use 3880 the same version of diff that configure tested 3881 3882 * Makefile.in (MAKE_VERSION): bump version to 20100808 3883 Merge with NetBSD make, pick up 3884 o in jobs mode, when we discover we cannot make something, 3885 call PrintOnError before exit. 3886 38872010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 3888 3889 * Makefile.in (MAKE_VERSION): bump version to 20100806 3890 Merge with NetBSD make, pick up 3891 o formatting fixes for ignored errors 3892 o ensure jobs are cleaned up regardless of where wait() was called. 3893 38942010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 3895 3896 * Makefile.in (MAKE_VERSION): bump version to 20100618 3897 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 3898 38992010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 3900 3901 * Makefile.in (MAKE_VERSION): bump version to 20100616 3902 Merge with NetBSD make, pick up 3903 o man page update 3904 o call PrintOnError from JobFinish when we detect an error we 3905 are not ignoring. 3906 39072010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 3908 3909 * Makefile.in (MAKE_VERSION): bump version to 20100606 3910 Merge with NetBSD make, pick up 3911 o man page update 3912 39132010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 3914 3915 * Makefile.in (MAKE_VERSION): bump version to 20100605 3916 Merge with NetBSD make, pick up 3917 o use bmake_signal() which is a wrapper around sigaction() 3918 in place of signal() 3919 o add .export-env to allow exporting variables to environment 3920 without tracking (so no re-export when the internal value is 3921 changed). 3922 39232010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 3924 3925 * Makefile.in (MAKE_VERSION): bump version to 20100524 3926 Merge with NetBSD make, pick up 3927 o fix for .info et al being greedy. 3928 39292010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 3930 3931 * Makefile.in (MAKE_VERSION): bump version to 20100520 3932 Merge with NetBSD make, pick up 3933 o back to using realpath on argv[0] 3934 but only if contains '/' and does not start with '/'. 3935 39362010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 3937 3938 * boot-strap: use absolute path for bmake when running tests. 3939 3940 * Makefile.in (MAKE_VERSION): bump version to 20100510 3941 Merge with NetBSD make, pick up 3942 o revert use of realpath on argv[0] 3943 too many corner cases. 3944 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 3945 39462010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 3947 3948 * Makefile.in (MAKE_VERSION): bump version to 20100505 3949 Merge with NetBSD make, pick up 3950 o fix for missed SIGCHLD when compiled with SunPRO 3951 actually for bmake, defining FORCE_POSIX_SIGNALS would have 3952 done the job. 3953 39542010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 3955 3956 * Makefile.in (MAKE_VERSION): bump version to 20100430 3957 Merge with NetBSD make, pick up 3958 o fflush stdout before writing to stdout 3959 39602010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 3961 3962 * Makefile.in (MAKE_VERSION): bump version to 20100423 3963 Merge with NetBSD make, pick up 3964 o updated unit tests for Haiku (this time for sure). 3965 * boot-strap: based on patch from joerg 3966 honor --with-default-sys-path better. 3967 * boot-strap: remove mention of --with-prefix-sys-path 3968 39692010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 3970 3971 * Makefile.in (MAKE_VERSION): bump version to 20100422 3972 * Merge with NetBSD make, pick up 3973 o fix for vfork() on Darwin. 3974 o fix for bogus $TMPDIR. 3975 o set .MAKE.MODE=compat for -B 3976 o set .MAKE.JOBS=max_jobs for -j max_jobs 3977 o allow unit-tests to run without any *.mk 3978 o unit-tests/modmisc be more conservative in dirs presumed to exist. 3979 * boot-strap: ignore /usr/share/mk except on NetBSD. 3980 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 3981 ensure sort(1) behaves as expected. 3982 39832010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 3984 3985 * boot-strap: add FindHereOrAbove so we can use -m .../mk 3986 39872010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 3988 3989 * Makefile.in (MAKE_VERSION): bump version to 20100420 3990 * Merge with NetBSD make, pick up 3991 o fix for variable realpath() behavior. 3992 we have to stat(2) the result to be sure. 3993 o fix for .export (all) when nested vars use :sh 3994 39952010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 3996 3997 * Makefile.in (MAKE_VERSION): bump version to 20100414 3998 * Merge with NetBSD make, pick up 3999 o use realpath to resolve argv[0] (for .MAKE) if needed. 4000 o add realpath from libc. 4001 o add :tA to resolve variable via realpath(3) if possible. 4002 40032010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 4004 4005 * Makefile.in (MAKE_VERSION): bump version to 20100408 4006 * Merge with NetBSD make, pick up 4007 o unit tests for .ERROR, .error 4008 o fix for .ERROR to ensure it cannot be default target. 4009 40102010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 4011 4012 * Makefile.in (MAKE_VERSION): bump version to 20100406 4013 * Merge with NetBSD make, pick up 4014 o fix for compat mode "Error code" going to debug_file. 4015 o fix for .ALLSRC being populated twice. 4016 o support for .info, .warning and .error directives 4017 o .MAKE.MODE to control make's operational mode 4018 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 4019 name(s). 4020 o .MAKE.DEPENDFILE to control the name of the depend file 4021 o .ERROR target - run on failure. 4022 40232010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 4024 4025 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 4026 4027 * os.sh,arch.c: patch for Haiku from joerg at netbsd 4028 40292010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 4030 4031 * Makefile.in (MAKE_VERSION): bump version to 20100222 4032 * Merge with NetBSD make, pick up 4033 o better error msg for .for with mutiple inter vars 4034 4035 * boot-strap: 4036 o use make-bootstrap.sh from joerg at netbsd 4037 to avoid the need for a native make when bootstrapping. 4038 o add "" everywhere ;-) 4039 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 4040 otherwise the pre-formated version. 4041 40422010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 4043 4044 * Makefile.in (MAKE_VERSION): bump version to 20100102 4045 * Merge with NetBSD make, pick up: 4046 o fix for -m .../ 4047 40482009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 4049 4050 * Makefile.in (MAKE_VERSION): bump version to 20091118 4051 * Merge with NetBSD make, pick up: 4052 o .unexport 4053 o report lines that start with '.' and should have ':' 4054 (catch typo's of .el*if). 4055 40562009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4057 4058 * configure.in: Ensure that srcdir and mksrc are absolute paths. 4059 40602009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4061 4062 * Makefile.in (MAKE_VERSION): fix version to 20091007 4063 40642009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 4065 4066 * Makefile.in (MAKE_VERSION): bump version to 200910007 4067 * Merge with NetBSD make, pick up: 4068 o fix for parsing of :S;...;...; applied to .for loop iterator 4069 appearing in a dependency line. 4070 40712009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4072 4073 * Makefile.in (MAKE_VERSION): bump version to 20090909 4074 * Merge with NetBSD make, pick up: 4075 o fix for -C, .CURDIR and .OBJDIR 4076 * boot-strap: 4077 o allow share_dir to be set independent of prefix. 4078 o select default share_dir better when prefix ends in $HOST_TARGET 4079 o if FORCE_BSD_MK etc were set, include them in the suggested 4080 install-mk command. 4081 40822009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 4083 4084 * Makefile.in (MAKE_VERSION): bump version to 20090908 4085 * Merge with NetBSD make, pick up: 4086 o .MAKE.LEVEL for recursion tracking 4087 o fix for :M scanning \: 4088 40892009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4090 4091 * configure.in: Don't -D__EXTENSIONS__ if 4092 AC_USE_SYSTEM_EXTENSIONS says "no". 4093 40942009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 4095 4096 * Makefile.in (MAKE_VERSION): bump version to 20090826 4097 Simplify MAKE_VERSION to just the bare date. 4098 * Merge with NetBSD make, pick up: 4099 o -C directory support. 4100 o support for SIGINFO 4101 o use $TMPDIR for temp files. 4102 o child of vfork should be careful about modifying parent's state. 4103 4104 41052009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 4106 4107 * Appy some patches for MiNT from David Brownlee 4108 41092009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 4110 4111 * Makefile.in (BMAKE_VERSION): bump version to 20090222 4112 * Merge with NetBSD make, pick up: 4113 o Possible null pointer de-ref in Var_Set. 4114 41152009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 4116 4117 * Makefile.in (BMAKE_VERSION): bump version to 20090204 4118 * Merge with NetBSD make, pick up: 4119 o bmake_malloc et al moved to their own .c 4120 o Count both () and {} when looking for the end of a :M pattern 4121 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 4122 o strlist.c - functions for processing extendable arrays of pointers to strings. 4123 o ClientData replaced with void *, so const void * can be used. 4124 o New debug flag C for DEBUG_CWD 4125 41262008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 4127 4128 * Makefile.in (BMAKE_VERSION): bump version to 20081111 4129 Apply patch from Joerg Sonnenberge to 4130 configure.in: 4131 o remove some redundant checks 4132 o check for emlloc etc only in libutil and require the whole family. 4133 util.c: 4134 o remove [v]asprintf which is no longer used. 4135 41362008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4137 4138 * Makefile.in (BMAKE_VERSION): bump version to 20081101 4139 * Merge with NetBSD make, pick up: 4140 o util.c: avoid use of putenv() - christos 4141 41422008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 4143 4144 * Makefile.in (BMAKE_VERSION): bump version to 20081030 4145 pick up man page tweaks. 4146 41472008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 4148 4149 * Makefile.in: move processing of LIBOBJS to after is definition! 4150 thus we'll have getenv.c in SRCS only if needed. 4151 4152 * make.1: add examples of how to use :? 4153 4154 * Makefile.in (BMAKE_VERSION): bump version to 20081029 4155 * Merge with NetBSD make, pick up: 4156 o fix for .END processing with -j 4157 o segfault from Parse_Error when no makefile is open 4158 o handle numeric expressions in any variable expansion 4159 o debug output now defaults to stderr, -dF to change it - apb 4160 o make now uses bmake_malloc etc so that it can build natively 4161 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 4162 41632008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 4164 4165 * Makefile.in (BMAKE_VERSION): bump version to 20080808 4166 * Merge with NetBSD make, pick up: 4167 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 4168 long lines in Makefiles 4169 o optimizations for VarQuote by joerg 4170 o fix for PR/38756: dominik: make dumps core on invalid makefile 4171 41722008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 4173 4174 * Makefile.in (BMAKE_VERSION): bump version to 20080515 4175 * Merge with NetBSD make, pick up: 4176 o fix skip setting vars in VAR_GLOBAL context, to handle 4177 cases where VAR_CMD is used for other than command line vars. 4178 41792008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 4180 4181 * boot-strap (make_version): we may need to look in 4182 $prefix/share/mk for sys.mk 4183 4184 * Makefile.in (BMAKE_VERSION): bump version to 20080514 4185 * Merge with NetBSD make, pick up: 4186 o skip setting vars in VAR_GLOBAL context, when already set in 4187 VAR_CMD which takes precedence. 4188 41892008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 4190 4191 * Makefile.in (BMAKE_VERSION): bump version to 20080330 4192 * Merge with NetBSD make, pick up: 4193 o fix for ?= when LHS contains variable reference. 4194 41952008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4196 4197 * merge some patches from NetBSD pkgsrc. 4198 4199 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 4200 the MAKSYSPATH used during bootstrap. 4201 4202 * Makefile.in (BMAKE_VERSION): bump version to 20080215 4203 * Merge with NetBSD make, pick up: 4204 o warn if non-space chars follow 'empty' in a conditional. 4205 42062008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4207 4208 * Makefile.in (BMAKE_VERSION): bump version to 20080118 4209 * Merge with NetBSD make, pick up: 4210 o consider dependencies read from .depend as optional - dsl 4211 o remember when buffer for reading makefile grows - dsl 4212 o add -dl (aka LOUD) - David O'Brien 4213 42142007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 4215 4216 * Makefile.in (BMAKE_VERSION): bump version to 20071022 4217 * Merge with NetBSD make, pick up: 4218 o Allow .PATH<suffix> to be used for .include "" 4219 4220 * boot-strap: source default settings from .bmake-boot-strap.rc 4221 42222007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 4223 4224 * Makefile.in: fix maninstall on various systems 4225 provided that our man.mk is used. 4226 For non-BSD systems we install the preformatted page 4227 into $MANDIR/cat1 4228 42292007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 4230 4231 * boot-strap: make bmake.1 too, so maninstall works. 4232 42332007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 4234 4235 * Makefile.in (BMAKE_VERSION): bump version to 20071014 4236 * Merge with NetBSD make, pick up: 4237 o revamped handling of defshell - configure no longer needs to 4238 know the content of the shells array - apb 4239 o stop Var_Subst modifying its input - apb 4240 o avoid calling ParseTrackInput too often - dsl 4241 42422007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 4243 4244 * Makefile.in (BMAKE_VERSION): bump version to 20071011 4245 * Merge with NetBSD make, pick up: 4246 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 4247 4248 * sigcompat.c: some tweaks for HP-UX 11.x based on 4249 patch from Tobias Nygren 4250 4251 * configure.in: update handling of --with-defshell to match 4252 new make behavior. --with-defshell=/usr/xpg4/bin/sh 4253 will now do what one might hope - provided the chosen shell 4254 behaves enough like sh. 4255 42562007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 4257 4258 * Makefile.in (BMAKE_VERSION): bump to 20071008 4259 * Merge with NetBSD make, pick up: 4260 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 4261 o .export/.MAKE.EXPORTED - export of variables - sjg 4262 o .MAKE.MAKEFILES - track all makefiles read - sjg 4263 o performance improvements - dsl 4264 o revamp parallel job scheduling - dsl 4265 42662006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4267 4268 * Makefile.in (BMAKE_VERSION): bump to 20060728 4269 * Merge with NetBSD make, pick up: 4270 o extra debug info during variable and cond processing - sjg 4271 o shell definition now covers newline - rillig 4272 o minor mem leak in PrintOnError - sjg 4273 42742006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4275 4276 * Makefile.in (BMAKE_VERSION): bump to 20060511 4277 * Merge with NetBSD make, pick up: 4278 o more memory leaks - coverity 4279 o possible overflow in ArchFindMember - coverity 4280 o extract variable modifier code out of Var_Parse() 4281 so it can be called recursively - sjg 4282 o unit-tests/moderrs - sjg 4283 42842006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 4285 4286 * Makefile.in (BMAKE_VERSION): bump to 20060412 4287 * Merge with NetBSD make, pick up: 4288 o fixes for some memory leaks - coverity 4289 o only read first sys.mk etc when searching sysIncPath - sjg 4290 4291 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 4292 setting ${MAKEFILE} - OBATA Akio 4293 42942006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 4295 4296 * Makefile.in (BMAKE_VERSION): bump to 20060318 4297 * Merge with NetBSD make, pick up: 4298 o cleanup of job.c to remove remote handling, distcc is more 4299 useful and this code was likely bit-rotting - dsl 4300 o fix for :P modifier - sjg 4301 * boot-strap: set default prefix to something reasonable 4302 (for me anyway). 4303 43042006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 4305 4306 * Makefile.in (BMAKE_VERSION): bump to 20060301 4307 * Merge with NetBSD make, pick up: 4308 o make .WAIT apply recursively, document and test case - apb 4309 o allow variable modifiers in a variable appear anywhere in 4310 modifier list, document and test case - sjg 4311 43122006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 4313 4314 * Makefile.in (BMAKE_VERSION): bump to 20060222 4315 * Merge with NetBSD make, pick up: 4316 o improved job token handling - dsl 4317 o SIG_DFL the correct signal before exec - dsl 4318 o more debug info during parsing - dsl 4319 o allow variable modifiers to be specified via variable - sjg 4320 * boot-strap: explain why we died if no mksrc 4321 43222005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 4323 4324 * Makefile.in (BMAKE_VERSION): bump to 20051105 4325 * configure.in: always set default_sys_path 4326 default is ${prefix}/share/mk 4327 - remove prefix_sys_path, anyone wanting more than above 4328 needs to set it manually. 4329 43302005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 4331 4332 * boot-strap: make this a bit easier for pkgsrc folk. 4333 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 4334 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 4335 43362005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 4337 4338 * Makefile.in (BMAKE_VERSION): bump to 20051102 4339 * job.c (JobFinish): fix likely ancient merge lossage 4340 fix from Todd Vierling. 4341 * boot-strap (srcdir): allow setting mksrc=none 4342 43432005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 4344 4345 * Makefile.in (BMAKE_VERSION): bump to 20051031 4346 * ranlib.h: skip on OSF too. 4347 (NetBSD PR 31864) 4348 43492005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 4350 4351 * Makefile.in (BMAKE_VERSION): bump to 20051002 4352 fix a silly typo 4353 43542005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 4355 4356 * Makefile.in (BMAKE_VERSION): bump to 20051001 4357 support for UnixWare and some other systems, 4358 based on patches from pkgsrc/bootstrap 4359 43602005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 4361 4362 * Makefile.in (BMAKE_VERSION): bump to 20050901 4363 * Merge with NetBSD make, pick up: 4364 o possible parse error causing us to wander off. 4365 43662005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 4367 4368 * Makefile.in (BMAKE_VERSION): bump to 20050606 4369 * Merge with NetBSD make, pick up: 4370 o :0x modifier for randomizing a list 4371 o fixes for a number of -Wuninitialized issues. 4372 43732005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 4374 4375 * Makefile.in (BMAKE_VERSION): bump to 20050530 4376 * Merge with NetBSD make, pick up: 4377 o Handle dependencies for .BEGIN, .END and .INTERRUPT 4378 4379 * README: was seriously out of date. 4380 43812005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 4382 4383 * Important to use .MAKE rather than MAKE. 4384 43852005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 4386 4387 * Makefile.in (BMAKE_VERSION): bump to 20050315 4388 * Merge with NetBSD make, pick up: 4389 o don't mistake .elsefoo for .else 4390 o use suffix-specific search path correctly 4391 o bunch of style nits 4392 43932004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 4394 4395 * boot-strap: 4396 o ensure that args to --src and --with-mksrc 4397 are resolved before giving them to configure. 4398 o add -o "objdir" so that builder can control it, 4399 default is $OS as determined by os.sh 4400 o add -q to suppress all the install instructions. 4401 44022004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 4403 4404 * Remove __IDSTRING() 4405 4406 * Makefile.in (BMAKE_VERSION): bump to 20040508 4407 * Merge with NetBSD make, pick up: 4408 o posix fixes 4409 - remove '-e' from compat mode 4410 - add support for '+' command-line prefix. 4411 o fix for handling '--' on command-line. 4412 o fix include in lst.lib/lstInt.h to simplify '-I's 4413 o we also picked up replacement of MAKE_BOOTSTRAP 4414 with !MAKE_NATIVE which is a noop, but possibly confusing. 4415 44162004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 4417 4418 * Makefile.in (BMAKE_VERSION): bump to 20040414 4419 * Merge with NetBSD make, pick up: 4420 o allow quoted strings on lhs of conditionals 4421 o issue warning when extra .else is seen 4422 o print line numer when errors encountered during parsing from 4423 string. 4424 44252004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 4426 4427 * Makefile.in (BMAKE_VERSION): bump to 20040220 4428 * Merge with NetBSD make, pick up: 4429 o fix for old :M parsing bug. 4430 o re-jigged unit-tests 4431 44322004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 4433 4434 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 4435 so that './bmake -f Makefile test' works. 4436 44372004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 4438 4439 * Makefile.in: (BMAKE_VERSION): bump to 20040214 4440 * Merge with NetBSD make, pick up: 4441 o search upwards for *.mk 4442 o fix for double free of var substitution buffers 4443 o use of getopt replaced with custom code, since the usage 4444 (re-scanning) isn't posix compatible. 4445 44462004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 4447 4448 * arch.c: don't include ranlib.h on ELF systems 4449 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 4450 44512004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 4452 4453 * Makefile.in (BMAKE_VERSION): bump to 20040118 4454 4455 * boot-strap (while): export vars we assign to on cmdline 4456 * unit-test/Makefile.in: ternary is .PHONY 4457 44582004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 4459 4460 * Makefile.in (BMAKE_VERSION): bump version to 20040108 4461 * Merge with NetBSD make, pick up: 4462 o fix for ternary modifier 4463 44642004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 4465 4466 * Makefile.in (BMAKE_VERSION): bump version to 20040105 4467 * Merge with NetBSD make, pick up: 4468 o fix for cond.c to handle compound expressions better 4469 o variable expansion within sysV style replacements 4470 44712003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 4472 4473 * Make portable snprintf safer - output to /dev/null first to 4474 check space needed. 4475 4476 * Makefile.in (BMAKE_VERSION): bump version to 20031222 4477 * Merge with NetBSD make, pick up: 4478 o -dg3 to show input graph when things go wrong. 4479 o explicitly look for makefiles in objdir if not found in curdir so 4480 that errors in .depend etc will be reported accurarely. 4481 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 4482 instead as it more accurately reflects the expected behavior and 4483 is more consistently implemented. 4484 o avoid use of asprintf. 4485 44862003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 4487 4488 * util.c: Add asprintf and vasprintf. 4489 4490 * Makefile.in (BMAKE_VERSION): bump version to 20030928 4491 * Merge with NetBSD make, pick up: 4492 :[] modifier - allows picking words from a variable. 4493 :tW modifier - allows treating value as one big word. 4494 W flag for :C and :S - allows treating value as one big word. 4495 44962003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 4497 4498 * Merge with NetBSD make 4499 pick up -de flag to enable printing failed command. 4500 don't skip 1st two dir entries (normally . and ..) since 4501 coda does not have them. 4502 45032003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 4504 4505 * Makefile.in (BMAKE_VERSION): bump version to 20030909 4506 * Merge with NetBSD make, pick up: 4507 - changes for -V '${VAR}' to print fully expanded value 4508 cf. -V VAR 4509 - CompatRunCommand now prints the command that failed. 4510 - several files got updated 3 clause Berkeley license. 4511 45122003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 4513 4514 * boot-strap: Allow setting configure args on command line. 4515 45162003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 4517 4518 * configure.in: add --with-defshell to allow sh or ksh 4519 to be selected as default shell. 4520 4521 * Makefile.in: bump version to 20030731 4522 4523 * Merge with NetBSD make 4524 Pick up .SHELL spec for ksh and associate man page changes. 4525 Also compat mode now uses the same shell specs. 4526 45272003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 4528 4529 * var.c (Var_Parse): ensure delim is initialized. 4530 4531 * unit-tests/Makefile.in: use single quotes to avoid problems from 4532 some shells. 4533 4534 * makefile.boot.in: 4535 Run the unit-tests as part of the bootstrap procedure. 4536 45372003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 4538 4539 * unit-tests/Makefile.in: always force complaints from 4540 ${TEST_MAKE} to be from 'make'. 4541 4542 * configure.in: add check for 'diff -u' 4543 also fix some old autoconf'isms 4544 4545 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 4546 if using GCC add -Wno-cast-qual to CFLAGS for var.o 4547 4548 * Merge with NetBSD make 4549 Pick up fix for :ts parsing error in some cases. 4550 Pick unit-tests. 4551 45522003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 4553 4554 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 4555 4556 * var.c (Var_Parse): fix bug in :ts modifier, after const 4557 correctness fixes, must pass nstr to VarModify. 4558 45592003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 4560 4561 * Makefile.in: BMAKE_VERSION switch to a date based version. 4562 We'll generally use the date of last import from NetBSD. 4563 4564 * Merge with NetBSD make 4565 Pick up fixes for const-correctness, now passes WARNS=3 on 4566 NetBSD. 4567 Pick up :ts modifier, allows controlling the separator used 4568 between words in variable expansion. 4569 45702003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 4571 4572 * FILES: include boot-strap and os.sh 4573 4574 * Makefile.in: only set WARNS if we are NetBSD, the effect on 4575 FreeBSD is known to be bad. 4576 4577 * makefile.boot.in (bootstrap): make this the default target. 4578 4579 * Makefile.in: bump version to 3.1.19 4580 4581 * machine.sh: avoid A-Z with tr as it is bound to lose. 4582 45832003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 4584 4585 * Merge with NetBSD make 4586 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 4587 Plus some doc fixes. 4588 45892003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 4590 4591 * Merge with NetBSD make 4592 Pick up fix for PR/1523 - don't count a library as built, if there 4593 is no way to build it 4594 4595 * Bump version to 3.1.18 4596 45972003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 4598 4599 * Merge with NetBSD make 4600 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 4601 appears in src list. 4602 46032003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 4604 4605 * Merge with NetBSD make (mmm 10th anniversary!) 4606 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 4607 pick up -X which tells us to not export VAR=val via setenv if 4608 we are already doing so via MAKEFLAGS. This saves valuable env 4609 space on systems like Darwin. 4610 set MAKE_VERSION to 3.1.17 4611 4612 * parse.c: pix up fix for suffix rules 4613 46142003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 4615 4616 * Merge with NetBSD make. 4617 pick up fix for propagating -B via MAKEFLAGS. 4618 set MAKE_VERSION to 3.1.16 4619 4620 * Apply some patches from pkgsrc-bootstrap/bmake 4621 Originally by Grant Beattie <grant@netbsd.org> 4622 I may have missed some - since they are based on bmake-3.1.12 4623 46242002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 4625 4626 * makefile.boot.in (bmake): update install targets for those that 4627 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 4628 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 4629 4630 * bmake.cat1: update the pre-formatted man page! 4631 46322002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 4633 4634 * Merge with NetBSD make. 4635 pick up fix for premature free of pointer used in call 4636 to Dir_InitCur(). 4637 set MAKE_VERSION to 3.1.15 4638 46392002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 4640 4641 * configure.in: determine suitable value for MKSRC. 4642 override using --with-mksrc=PATH. 4643 4644 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 4645 configs(8) will use 'sun4' as an alias for 'sparc'. 4646 46472002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 4648 4649 * Merge with NetBSD make. 4650 pick up ${.PATH} 4651 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 4652 set MAKE_VERSION to 3.1.14 4653 add configure checks for killpg and sys/socket.h 4654 46552002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 4656 4657 * tag bmake-3-1-13 4658 4659 * makefile.boot.in (bmake): use install-mk 4660 Also setup ./mk before trying to invoke bmake.boot incase we 4661 needed install-mk to create a sys.mk for us. 4662 4663 * configure.in: If we need to add -I${srcdir}/missing, make it an 4664 absolute path so that it works for lst.lib too. 4665 4666 * make.h: always include sys/cdefs.h since we provide one if the 4667 host does not. 4668 4669 * Makefile.in (install-mk): 4670 use MKSRC/install-mk which will do the right thing. 4671 use uname -p for ARCH if possible. 4672 since install-mk will setup links bsd.prog.mk -> prog.mk if 4673 needed, just .include bsd.prog.mk 4674 4675 * Merge with NetBSD make (NetBSD-1.6) 4676 Code is ansi-C only now. 4677 Bug in handling of dotLast is fixed. 4678 Can now assign .OBJDIR and make will reset its notions of life. 4679 New modifiers :tu :tl for toUpper and toLower. 4680 4681Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4682 4683 * Merge with NetBSD make 4684 pick up fix for .END failure in compat mode. 4685 pick up fix for extra va_end() in ParseVErrorInternal. 4686 4687Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 4688 4689 * configure.in: for systems that have sys/cdefs.h check if it is 4690 compatible. If not, include the one under missing, but tell it to 4691 include the native one too - necessary on Linux. 4692 4693 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 4694 include_next (for gcc) to get the native sys/cdefs.h 4695 4696Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4697 4698 * job.c (JobFinish): Fix an earlier merge bug that resulted in 4699 leaking descriptors when using -jN. 4700 4701 * job.c (JobPrintCommand): See if "curdir" exists before 4702 attempting to chdir(). Doing the chdir directly in make (when in 4703 compat mode) fails silently, so let the -jN version do the same. 4704 This can happen when building kernels in an object tree and 4705 playing clever games to reset .CURDIR. 4706 4707 * Merged with NetBSD make 4708 pick up .USEBEFORE 4709 4710Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4711 4712 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 4713 4714Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4715 4716 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 4717 us not to export the iterator variable when using VAR_CMD context. 4718 4719Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4720 4721 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 4722 its the wrong "fix". 4723 4724Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4725 4726 * Redesigned export of VAR_CMD's via MAKEFLAGS. 4727 We now simply append the variable names to .MAKEOVERRIDES, and 4728 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 4729 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 4730 Apart from fixing quoting bugs in previous version, this allows us 4731 to export vars to the environment by simply doing: 4732 .MAKEOVERRIDES+= PATH 4733 Merged again with NetBSD make, but the above is the only change. 4734 4735 * configure.in: added 4736 --disable-pwd-override disable $PWD overriding getcwd() 4737 --disable-check-make-chdir disable make trying to guess 4738 when it should automatically cd ${.CURDIR} 4739 4740 * Merge with NetBSD make, changes include: 4741 parse.c (ParseDoDependency): Spot that the syntax error is 4742 caused by an unresolved cvs/rcs conflict and say so. 4743 var.c: most of Var* functions now take a ctxt as 1st arg. 4744 now does variable substituion on rhs of sysv style modifiers. 4745 4746 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 4747 is now done here. We append the name='value' to .MAKEOVERRIDES 4748 rather than directly into MAKEFLAGS as this allows a Makefile to 4749 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 4750 very similar mechanism. Note that in adding name='value' to 4751 .MAKEOVERRIDES we do the moral equivalent of: 4752 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 4753 4754Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4755 4756 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 4757 4758 * Merged with NetBSD make 4759 make -dx can now be used to run commands via sh -x 4760 better error messages on exec failures. 4761 4762Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4763 4764 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 4765 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 4766 MACHINE etc otherwise they propagate from the previous bmake. 4767 4768 * configure.in (machine): allow --with-machine=generic to make 4769 configure use machine.sh to set MACHINE. 4770 4771 * job.c (JobInterrupt): convert to using WAIT_T and friends. 4772 4773 * Makefile.in: mention in bmake.1 that we use autoconf. 4774 4775 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 4776 4777Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4778 4779 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 4780 as that rather defeats the usefulness of ${MAKEFILE}. 4781 4782 * main.c (MainParseArgs): append command line variable assignments 4783 to MAKEFLAGS so that they get propagated to child make's. 4784 Apparently this is required POSIX behaviour? Its useful anyway. 4785 4786Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4787 4788 * compat.c (CompatRunCommand): don't use perror() since stdio may 4789 cause problems in child of vfork(). 4790 4791 * compat.c, main.c: Call PrintOnError() when we are going to bail. 4792 This routine prints out the .curdir where we stopped and will also 4793 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 4794 4795 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 4796 :@ expansion. 4797 4798 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 4799 4800 * Added RCSid's for the files we've touched. 4801 4802Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4803 4804 * configure.in: Thanks to some clues from mdb@juniper.net, 4805 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 4806 as well as what ends up in _PATH_DEFSYSPATH. We now have: 4807 4808 --with-machine=MACHINE explicitly set MACHINE 4809 --with-force-machine=MACHINE set FORCE_MACHINE 4810 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 4811 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 4812 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 4813 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 4814 4815 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 4816 4817 * makefile: added a pathetically simple makefile to drive 4818 bootstrapping. Running configure by hand is more useful. 4819 4820 * Makefile.in: added MAKE_VERSION, and reworked things to be less 4821 dependent on NetBSD bsd.*.mk 4822 4823 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 4824 _PATH_OBJDIRPREFIX for those that don't want a default. 4825 construct _PATH_DEFSYSPATH from the info we get from configure. 4826 4827 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 4828 if MAKE_VERSION is defined. 4829 4830 * compat.c: when we bail, print out the .CURDIR we were in. 4831 4832Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4833 4834 * Merged with NetBSD make 4835 4836 * var.c: fixed a bug in the handling of the modifier :P 4837 if the node as found but the path was null, we segfault trying to 4838 duplicate it. 4839 4840Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 4841 4842 * Merged with NetBSD make 4843 4844 * make.c: Make_OODate's test for a library out of date was using 4845 cmtime where it should have used mtime (my bug). 4846 4847 * compat.c: Use perror() to tell us what really went wrong when we 4848 cannot exec a command. 4849 4850Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4851 4852 * Merged with NetBSD make 4853 4854Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4855 4856 * Merged with NetBSD make 4857 4858Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4859 4860 * Merged with NetBSD make 4861 4862Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4863 4864 * Merged with NetBSD make 4865 4866Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4867 4868 * util.c: don't provide signal() since we use sigcompat.c 4869 4870 * Makefile.in: added a build target. 4871 4872 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 4873 These allow some quite clever magic. 4874 4875 * main.c (main): added support for getenv(MAKESYSPATH). 4876 4877Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4878 4879 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 4880 This avoids objdir having a different value depending on how a 4881 directory was reached (via command line, or subdir.mk). 4882 4883 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 4884 4885Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4886 4887 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 4888 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 4889 I've been testing this in NetBSD's make for some weeks. 4890 4891 * Turn Makefile into Makefile.in and make it useful. 4892 4893Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 4894 4895 * Imported NetBSD's -current make(1) and resolve conflicts. 4896 4897 * Applied autoconf patches from bmake v2 4898 4899 * Imported clean code base from NetBSD-1.0 4900