12022-02-08 Simon J Gerraty <sjg@beast.crufty.net> 2 3 * unit-tests/Makefile: disable opt-debug-x-trace on Linux if there 4 is any chance we have dash as .SHELL 5 6 * VERSION (_MAKE_VERSION): 20220208 7 Merge with NetBSD make, pick up 8 o more unit tests 9 o meta.c: use a variable to hold command line to be filtered 10 to avoid any side effects from content of command line. 11 122022-02-04 Simon J Gerraty <sjg@beast.crufty.net> 13 14 * VERSION (_MAKE_VERSION): 20220204 15 Merge with NetBSD make, pick up 16 o use unsigned consistently for line numbers, avoid the need for %z 17 o parse.c: do not step off end of input in Parse_IsVar 18 when checking for target local variable assignments 19 202022-02-02 Simon J Gerraty <sjg@beast.crufty.net> 21 22 * VERSION (_MAKE_VERSION): 20220202 23 Merge with NetBSD make, pick up 24 o remove redundant declaration of HashIter_Init 25 o make DEBUG0 simpler 26 272022-01-30 Simon J Gerraty <sjg@beast.crufty.net> 28 29 * cast gn->lineno to avoid %z 30 31 * VERSION (_MAKE_VERSION): 20220130 32 Merge with NetBSD make, pick up 33 o more unit tests 34 o make GNode lineno unsigned to please lint 35 o print location of recursive variable references in commands 36 o print "stack trace" (makefile includes) on fatal errors 37 o make.1: refine documentation for target local assignments 38 392022-01-28 Simon J Gerraty <sjg@beast.crufty.net> 40 41 * VERSION (_MAKE_VERSION): 20220128 42 Merge with NetBSD make, pick up 43 o inline functions called only once 44 o for.c: clean up AddEscape for building the body of a .for loop 45 o hash.c: merge duplicate code for finding an entry in a hash table 46 replace HashEntry_KeyEquals with strncmp 47 o make.1: document quirks of target local variable assignments. 48 o parse.c: cleanup white-space 49 502022-01-26 Simon J Gerraty <sjg@beast.crufty.net> 51 52 * VERSION (_MAKE_VERSION): 20220126 53 Merge with NetBSD make, pick up 54 o allow setting target local variables 55 o more unit tests 56 o add missing newline after "cannot continue" message 57 o meta.c: clean up eat_dots 58 o parse.c: fix filename in warning about duplicate script 59 o var.c: when expanding nested variables, check simple things first 60 612022-01-16 Simon J Gerraty <sjg@beast.crufty.net> 62 63 * VERSION (_MAKE_VERSION): 20220116 64 Merge with NetBSD make, pick up 65 o fix for unit-tests/varname-makeflags on non-BSD systems 66 o use Var_Exists rather than Var_Value where appropriate 67 o remove unnecessary functions for expanding variable names 68 o cond.c: inline EvalBare 69 o main.c: lint cleanup 70 o parse.c: condense code in Parse_IsVar 71 use islower for parsing directives (none have upper case) 72 732022-01-12 Simon J Gerraty <sjg@beast.crufty.net> 74 75 * VERSION (_MAKE_VERSION): 20220112 76 Merge with NetBSD make, pick up 77 o meta.c: add .MAKE.META.CMP_FILTER for filtering commands before 78 comparion, rarely needed but useful when it is. 79 802022-01-10 Simon J Gerraty <sjg@beast.crufty.net> 81 82 * VERSION (_MAKE_VERSION): 20220110 83 Merge with NetBSD make, pick up 84 o inline Buf_Clear 85 o remove redundant braces 86 o rename and inline Targ_Precious 87 o cond.c: remove redundant initializer in CondParser_ComparisonOrLeaf 88 o for.c: clean up handling of .for loops 89 fix reported line numbers of continuation lines 90 add details about .for loop variables to stack traces 91 o job.c: reduce code for initializing error handling in shell 92 o main.c: in Cmd_Exec, return error message instead of format string 93 have as few statements as possible between va_start and va_end 94 add debug logging for capturing the output of external commands 95 o make.c: use consistent variable names for varargs 96 o make_malloc.c: remove duplicate code from bmake_strdup 97 o parse.c: add missing printflike annotations 98 remove redundant lines from stack traces 99 fix stack traces in -dp mode 100 reduce confusing code in ParseForLoop 101 fix line number in debug log after returning from a file 102 rename IFile and its fields to match their actual content 103 clean up ParseDependencySources 104 o var.c: shorten ApplyModifier_Assign 105 rename is_shell_metachar, fix character conversion warning 106 merge calls to ApplyModifier_Time 107 merge duplicate code for modifiers 'gmtime' and 'localtime' 108 1092022-01-04 Simon J Gerraty <sjg@beast.crufty.net> 110 111 * parse.c: loadfile restore extra byte in buffer. 112 1132022-01-01 Simon J Gerraty <sjg@beast.crufty.net> 114 115 * VERSION (_MAKE_VERSION): 20220101 116 Merge with NetBSD make, pick up 117 o more unit-tests 118 o remove unnecessary words from command line options in CmdOpts 119 o rename eunlink to unlink_file 120 o cond.c: make ParseWord in condition parser simpler 121 internally return false for irrelevant leaves in conditions 122 replace table for function lookup in conditions with simple code 123 merge duplicate types CondEvalResult and CondResult 124 o for.c: clean up handling of .for loops and .include directives 125 o main.c: constify cached_realpath 126 clean up Cmd_Exec 127 o parse.c: sync API documentation 128 fix error message when reading more than 1 GB from stdin 129 clean up parsing of makefiles 130 fix line number in error message about open conditionals 131 unexport types VarAssignOp and VarAssign 132 clean up function names 133 remove redundant parameters in dependency parsing functions 134 reduce scope of the list of wildcard target names 135 extract OP_NOTARGET into separate function 136 clean up variable names for parsing dependency lines 137 make debug logging a bit more human-friendly 138 o var.c: condense code in ApplyModifier_Assign 139 1402021-12-21 Simon J Gerraty <sjg@beast.crufty.net> 141 142 * VERSION (_MAKE_VERSION): 20211221 143 Merge with NetBSD make, pick up 144 o more unit-tests 145 o style cleanup 146 o in CLEANUP mode, free interned strings at the very end 147 o fix memory leak for filenames in .for loops 148 o buf.c: avoid memory leak 149 o cond.c: condense CondParser_ComparisonOp 150 o hash.c: change return type of HashTable_Set to void 151 o job.c: change return type of Compat_RunCommand from int to bool 152 o main.c: remove bmake_free 153 o parse.c: condense repetetive code in ParseDirective 154 remove dead code for handling traditional include directives 155 clean up parsing of variable assignments 156 remove unreachable code for parsing the dependency operator 157 clean up loading of files 158 fix memory leak in IncludeFile 159 o var.c: fix memory leak when parsing a variable name 160 fix memory leak from ${.SUFFIXES} 161 reduce memory allocation in modifier ':?' and ':C' 162 condense RegexReplace for the modifier ':C' and avoid strlen 163 merge duplicate code for memory handling in Var_Parse 164 distinguish between short-lived and environment variables 165 rename VarFreeEnv to VarFreeShortLived 166 1672021-12-15 Simon J Gerraty <sjg@beast.crufty.net> 168 169 * cond.c: fix mem leak in CondParser_Leaf 170 1712021-12-12 Simon J Gerraty <sjg@beast.crufty.net> 172 173 * VERSION (_MAKE_VERSION): 20211212 174 Merge with NetBSD make, pick up 175 o rename Parse_SetInput to Parse_PushInput 176 o remove remove period from end of error messages and warnings 177 to be more consistent 178 o arch.c: use simpler memory management for parsing archive members 179 o cond.c: rework and reduce recursion 180 o for.c: rename some functions to better reflect purpose 181 o suff.c: add Suff_NamesStr to provide .SUFFIXES as a string. 182 o var.c: in parse errors, mark whitespace more clearly 183 inline ParseEmptyArg into CondParser_FuncCallEmpty 184 minimize calls to LazyBuf_Get in ParseVarnameLong 185 treat .SUFFIXES as a read-only variable 186 1872021-12-07 Simon J Gerraty <sjg@beast.crufty.net> 188 189 * VERSION (_MAKE_VERSION): 20211207 190 Merge with NetBSD make, pick up 191 o inline HashIter_Init 192 o parse.c: inline common subexpression in ParseRawLine 193 o var.c: merge branches for modifiers ':D' and ':U' 194 extract common code into Expr_Words 195 extract common code into Expr_Str 196 move low-level implementation details out of Var_Parse 197 1982021-12-06 Simon J Gerraty <sjg@beast.crufty.net> 199 200 * VERSION (_MAKE_VERSION): 20211206 201 Merge with NetBSD make, pick up 202 o add unit-tests/varmod-loop-delete 203 o for.c: inline Str_Words - reduce memory allocation 204 o parse.c: do not try to expand fixed variable names 205 only allocate the name of an included file if necessary 206 clean up ParseInclude 207 o var.c: fix use-after-free in modifier ':@' 208 save a memory allocation in each modifier ':O' and ':u' 209 save a memory allocation in the modifier ':[...]' 210 in UnexportVars, replace Str_Words with Substring_Words to 211 reduce allocations and copying. 212 2132021-12-04 Simon J Gerraty <sjg@beast.crufty.net> 214 215 * VERSION (_MAKE_VERSION): 20211204 216 Merge with NetBSD make, pick up 217 o flesh out a number of tests 218 o replace enums with bitfields, this simplifies a lot of code. 219 o var.c: refactor ParseModifierPartSubst 220 2212021-10-24 Simon J Gerraty <sjg@beast.crufty.net> 222 223 * VERSION (_MAKE_VERSION): 20211024 224 Merge with NetBSD make, pick up 225 o Punt on write errors - ENOSPC etc. 226 2272021-10-22 Simon J Gerraty <sjg@beast.crufty.net> 228 229 * configure.in: use_defshell, set both DEFSHELL_INDEX 230 and defshell_path if appropriate. 231 This makes it easier to use say the KSH specification with 232 and alternate path for the shell. 233 234 * configure.in compat.c: for SCO we need to force UseShell 235 236 * configure.in: SCO /bin/sh is not usable, provide a list of 237 alternatives for use as .SHELL. 238 We still have to mark some tests as broken, plus more if we end up 239 with ksh as .SHELL. 240 Issue a warning about skipped tests. 241 242 * boot-strap: leave TOOL_DIFF to configure 243 244 * configure.in: on SCO native cc is not usable, 245 gcc is to be found in /usr/gnu/bin 246 and while ancient is at least able to compile bmake. 247 Thus we add /usr/gnu/bin to PATH if it exists, and later 248 check if $CC would have been found via $PATH. 249 If not we set CC to the full path of $CC. 250 Also gnu diff is known to support -u, so if it exists use it. 251 252 * configure.in: move getopt to AC_REPLACE_FUNCS 253 also add AC_C_INLINE - in an attempt to compile using 254 native cc on SCO. 255 256 * configure.in: check for stresep as well as strsep, since we 257 define the later to the former if necessary, and if we have to 258 provide stresep we also need to provide a prototype. 259 260 * configure.in: we no longer need to worry about 261 sys/cdefs.h providing __RCSID which simplifies things quite a bit. 262 263 * make.h: make sure we have __RCSID 264 265 * unit-tests/Makefile.config.in: add TOOL_DIFF so configure 266 can control it. 267 2682021-10-20 Simon J Gerraty <sjg@beast.crufty.net> 269 270 * VERSION: 20211020 271 Merge with NetBSD make, pick up 272 o confirm sync of unit-tests 273 2742021-10-18 Simon J Gerraty <sjg@beast.crufty.net> 275 276 * configure.in: check if timezone Europe/Berlin is supported 277 if not try UTC-1 278 * configure.in: if .OBJDIR is $srcdir/obj we need to create a 279 symlink unit-tests -> ../unit-tests/obj so that 280 unit-tests/Makefile.config is put in the right place. 281 * refine filtering of .OBJDIR in unit-tests 282 2832021-10-16 Simon J Gerraty <sjg@beast.crufty.net> 284 285 * Fix unit-tests on Minix 3.2.0 286 o job.c: do not punt if read of token pipe fails for EAGAIN. 287 On Minix at least, we are not ready to read the childExitJob pipe 288 when poll says we are. 289 There should actually be no reason for this pipe to be 290 non-blocking, but while that works fine on {Net,Free}BSD it 291 breaks another test case on Minix. 292 o unit-tests/Makefile: deal with variants of error messages 293 and use of obj as .OBJDIR 294 2952021-10-14 Simon J Gerraty <sjg@beast.crufty.net> 296 297 * configure.in: add sigaction to AC_REPLACE_FUNCS 298 we also need to check for sigaddset etc just for the benefit of 299 sigact.c 300 301 * Add sigact.c as sigaction.c so this "just works". 302 This should have been done back when bmake_signal started using 303 sigaction (I only just noticed that sigact.c wasn't here ;-) 304 Note: I no longer have access to any system where this would matter. 305 3062021-10-13 Simon J Gerraty <sjg@beast.crufty.net> 307 308 * VERSION (_MAKE_VERSION): 20211011 309 310 * Makefile: cleanup a little 311 312 * configure.in: check for sigsetmask 313 3142021-10-01 Simon J Gerraty <sjg@beast.crufty.net> 315 316 * VERSION (_MAKE_VERSION): 20211001 317 Merge with NetBSD make, pick up 318 o reduce locations reducing text size 319 o remove unnecessary const 320 o cond.c: fix lint warning on i386 321 do not allow unquoted 'left == right' after modifier ':?' 322 o hash.c: fix build for DEBUG_HASH_LOOKUP 323 o var.c: fix memory leak in error case of the ':?' modifier 324 3252021-09-11 Simon J Gerraty <sjg@beast.crufty.net> 326 327 * VERSION (_MAKE_VERSION): 20210911 328 Merge with NetBSD make, pick up 329 o var.c: replace remaining ModChain_ShouldEval with Expr_ShouldEval 330 3312021-09-08 Simon J Gerraty <sjg@beast.crufty.net> 332 333 * VERSION (_MAKE_VERSION): 20210906 334 Merge with NetBSD make, pick up 335 o more unit tests 336 o lint cleanup 337 o rename some functions to better fit purpose 338 o for.c: cleanup - remove unnecessary optimization 339 fix embedded newlines 340 o parse.c: correct case for CVS/RCS 341 3422021-08-11 Simon J Gerraty <sjg@beast.crufty.net> 343 344 * VERSION (_MAKE_VERSION): 20210808 345 Merge with NetBSD make, pick up 346 o var.c: remove redundant initialization in ApplyModifier_Order 347 348 * mk/options.mk: issue warning for incorrect usage 349 3502021-08-03 Simon J Gerraty <sjg@beast.crufty.net> 351 352 * var.c: use long for :On if we don't have a 64bit int type 353 354 * VERSION (_MAKE_VERSION): 20210803 355 Merge with NetBSD make, pick up 356 o rework varmod-order tests to avoid qsort instability 357 o make.1: clarify :On entry 358 3592021-07-31 Simon J Gerraty <sjg@beast.crufty.net> 360 361 * VERSION (_MAKE_VERSION): 20210731 362 Merge with NetBSD make, pick up 363 o fix some lint issues 364 o more unit tests 365 o var.c: rework of ApplyModifier_Order 366 3672021-07-30 Simon J Gerraty <sjg@beast.crufty.net> 368 369 * util.c: add strto*l if HAVE_STRTO*L not defined 370 371 * VERSION (_MAKE_VERSION): 20210730 372 Merge with NetBSD make, pick up 373 o var.c: add :On and :Orn for numeric sort 374 disabled if no 64bit type available. 375 o _strtol.h: to implement strto*l functions 376 3772021-07-04 Simon J Gerraty <sjg@beast.crufty.net> 378 379 * VERSION (_MAKE_VERSION): 20210704 380 Merge with NetBSD make, pick up 381 o unit-tests: fix some tests to be more portable 382 - job-output-null not all shells do the same number of write calls 383 - objdir-writable if TMPDIR is set; /tmp may not be usable 384 3852021-07-01 Simon J Gerraty <sjg@beast.crufty.net> 386 387 * VERSION (_MAKE_VERSION): 20210701 388 Merge with NetBSD make, pick up 389 o unit-tests: allow for BROKEN_TESTS to list TESTS to be skipped; 390 some tests just cannot work in some environments. 391 o buf.c: simpler upper bound for length in Buf_AddInt 392 o cond.c: fix grammar in error message for malformed conditional 393 o for.c: prevent newline injection (from ${.newline}) in .for loops 394 o var.c: use more practical data type in RegexReplace 395 (avoid need for %zu) 396 extract RegexReplace from ModifyWord_SubstRegex 397 3982021-06-21 Simon J Gerraty <sjg@beast.crufty.net> 399 400 * VERSION (_MAKE_VERSION): 20210621 401 Merge with NetBSD make, pick up 402 o var.c: only report error for unmatched regex subexpression 403 when linting (-dL) since we cannot tell when an unmatched 404 subexpression is an expected result. 405 o move unmatched regex subexpression tests to 406 varmod-subst-regex.mk and enable strict (lint) mode 407 4082021-06-16 Simon J Gerraty <sjg@beast.crufty.net> 409 410 * VERSION (_MAKE_VERSION): 20210616 411 Merge with NetBSD make, pick up 412 o more unit tests 413 o cond.c: rename If_Eval to EvalBare 414 improve function names for parsing conditions 415 o job.c: fix error handling of targets that cannot be made 416 o var.c: uncompress code in ApplyModifier_Unique 417 4182021-05-18 Simon J Gerraty <sjg@beast.crufty.net> 419 420 * VERSION (_MAKE_VERSION): 20210518 421 Merge with NetBSD make, pick up 422 o fix unit-tests/opt-chdir to cope with /nonexistent existing. 423 o job.c: Print -de error information when running multiple jobs 424 4252021-04-20 Simon J Gerraty <sjg@beast.crufty.net> 426 427 * VERSION (_MAKE_VERSION): 20210420 428 Merge with NetBSD make, pick up 429 o use C99 bool type 430 o convert VarEvalFlags back into an enum 431 o cond.c: do not complain when skipping the condition 'no >= 10' 432 o hash.c: avoid allocating memory for simple variable names 433 o job.c: use distinct wording for writing to the shell commands file 434 remove type name for the abort status in job handling 435 rename PrintOutput to PrintFilteredOutput to avoid confusion 436 o main.c: avoid double slash in name of temporary directory 437 o var.c: use straight quotes for error 'Bad conditional expression' 438 reduce memory allocations in the modifiers ':D' and ':U' 439 rename members of ModifyWord_LoopArgs 440 clean up pattern flags for the modifiers ':S' and ':C' 441 reduce memory allocation and strlen calls in modifier ':from=to' 442 in the ':Q' modifier, only allocate memory if necessary 443 improve performance for LazyBuf 444 remove redundant parameter from ParseVarnameLong 445 migrate ParseModifierPart to use Substring 446 avoid unnecessary calls to strlen when evaluating modifiers 447 migrate ModifyWord functions to use Substring 448 migrate handling of the modifier ':S,from,to,' to Substring 449 reduce debug logging and memory allocation for ${:U...} 450 reduce verbosity of the -dv debug logging for standard cases 451 clean up debug logging for ':M' and ':N' 452 disallow '$' in the variable name of the modifier ':@' 453 simplify access to the name of an expression during evaluation 454 4552021-03-30 Simon J Gerraty <sjg@beast.crufty.net> 456 457 * VERSION (_MAKE_VERSION): 20210330 458 Merge with NetBSD make, pick up 459 o replace enum bit-field with struct bit-field for VarEvalFlags 460 o rename VARE_NONE to VARE_PARSE_ONLY 461 o var.c: rename ApplyModifiersState to ModChain 462 fix double varname expansion in the variable modifier '::=' 463 change debug log for variable evaluation flags to lowercase 464 4652021-03-14 Simon J Gerraty <sjg@beast.crufty.net> 466 467 * VERSION (_MAKE_VERSION): 20210314 468 Merge with NetBSD make, pick up 469 o var.c: avoid evaluating many modifiers in parse only mode 470 in strict mode (-dL) many variable references are parsed twice, 471 the first time just to report parse errors early, so we want to 472 avoid side effects and wasted effort to the extent possible. 473 4742021-02-26 Simon J Gerraty <sjg@beast.crufty.net> 475 476 * VERSION (_MAKE_VERSION): 20210226 477 Merge with NetBSD make, pick up 478 o remove freestanding freeIt variables 479 link via FStr 480 o var.c: restructure code in ParseVarname to target human readers 481 improve error message for; 482 bad modifier in variable expression 483 unclosed modifier 484 unknown modifier 485 remove redundant parameter of ApplySingleModifier 486 explain non-obvious code around indirect variable modifiers 487 quote ':S' in error message about missing delimiter 488 extract ParseModifier_Match into separate function 489 add context information to error message about ':range' modifier 490 add quotes around variable name in an error message 491 reorder code in ModifyWords 492 use more common parameter order for VarSelectWords 493 make ModifyWord_Subst a little easier to understand 494 do not expand variable name from the command line twice 495 extract ExistsInCmdline from Var_SetWithFlags 496 save a hash map lookup when defining a cmdline variable 497 clean up VarAdd, Var_Delete, Var_ReexportVars 498 use bit-shift expressions for VarFlags constants 499 rename constants for VarFlags 500 rename ExprDefined constants for debug logging 501 rename ExprStatus to ExprDefined 502 split parameters for evaluating variable expressions 503 reduce redundant code around ModifyWords 504 print error about failed shell command before overwriting variable 505 clean up ValidShortVarname, ParseVarnameShort 506 rename VarExprStatus to ExprStatus 507 add functions for assigning the value of an expression 508 rename ApplyModifiersState_Define to Expr_Define 509 condense the code for parsing :S and :C modifiers 510 5112021-02-06 Simon J Gerraty <sjg@beast.crufty.net> 512 513 * VERSION (_MAKE_VERSION): 20210206 514 Merge with NetBSD make, pick up 515 o unit-tests: use private TMPDIR to avoid errors from other users 516 5172021-02-05 Simon J Gerraty <sjg@beast.crufty.net> 518 519 * VERSION (_MAKE_VERSION): 20210205 520 Merge with NetBSD make, pick up 521 o avoid strdup in mkTempFile 522 o always use vfork 523 o rename context and ctxt to scope 524 o rename some VAR constants to SCOPE 525 o Var_ functions, move the scope to the front 526 o use shortcut functions Global_Set and Global_Append 527 o add shortcut Global_Delete for deleting a global variable 528 o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete 529 o compat.c: when exiting due to an error, print graph information 530 o enum.c: remove overengineered Enum_ValueToString 531 o make.c: remove unused INTERNAL flag 532 remove unused return type of MakeBuildParent 533 o parse.c: replace parse error "Need an operator" with better message 534 o var.c: improve documentation about variable scopes 535 rename Var_ValueDirect to GNode_ValueDirect 536 rename old Var_SetWithFlags to Var_SetExpandWithFlags 537 merge SetVar into Var_SetWithFlags 538 split Var_Exists into plain Var_Exists and Var_ExistsExpand 539 split Var_Append into Var_Append and Var_AppendExpand 540 replace enum bit-set with bit-field 541 o unit-tests/var-op-shell: use kill rather than kill -14 542 which broke on darwin with recent update. 543 5442021-02-01 Simon J Gerraty <sjg@beast.crufty.net> 545 546 * configure.in: check for sig_atomic_t and define it as 'int' 547 if missing. 548 549 * VERSION (_MAKE_VERSION): 20210201 550 Merge with NetBSD make, pick up 551 o use sig_atomic_t for caught_sigchld 552 5532021-01-30 Simon J Gerraty <sjg@beast.crufty.net> 554 555 * VERSION (_MAKE_VERSION): 20210130 556 Merge with NetBSD make, pick up 557 o more unit tests 558 o convert SearchPath to struct 559 o split Buf_Destroy into Buf_Done and Buf_DoneData 560 o for.c: split For_Eval into separate functions 561 rename struct For to struct ForLoop 562 o job.c: do not create empty shell files in jobs mode 563 rename JobOpenTmpFile to JobWriteShellCommands 564 reduce unnecessary calls to waitpid 565 o parse.c: in -dp mode, print stack trace with each diagnostic 566 5672021-01-23 Simon J Gerraty <sjg@beast.crufty.net> 568 569 * VERSION (_MAKE_VERSION): 20210123 570 Merge with NetBSD make, pick up 571 o rename Dir_Expand to SearchPath_Expand 572 o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags 573 o cond.c: fix debug output for comparison operators in conditionals 574 o dir.c: split Dir_FindFile into separate functions 575 5762021-01-20 Simon J Gerraty <sjg@beast.crufty.net> 577 578 * VERSION (_MAKE_VERSION): 20210120 579 Merge with NetBSD make, pick up 580 o fix some more lint nits 581 o refine some unit tests for portability 582 o cond.c: rework parsing 583 5842021-01-10 Simon J Gerraty <sjg@beast.crufty.net> 585 586 * VERSION (_MAKE_VERSION): 20210110 587 Merge with NetBSD make, pick up 588 o fix lint warnings 589 o consistently use boolean expressions in conditions 590 5912021-01-08 Simon J Gerraty <sjg@beast.crufty.net> 592 593 * VERSION (_MAKE_VERSION): 20210108 594 Merge with NetBSD make, pick up 595 o job.c: back to polling token pipe if we want a token 596 o main.c: always print 'stopped in' on first call 597 The execption is if we bail because of an abort token 598 in which case just exit 6. 599 6002021-01-01 Simon J Gerraty <sjg@beast.crufty.net> 601 602 * VERSION (_MAKE_VERSION): 20210101 603 Merge with NetBSD make, pick up 604 o Happy New Year! 605 o rename CmdOpts.lint to strict 606 o exit 2 on technical errors 607 o replace pointers in controlling conditions with booleans 608 o replace global preserveUndefined with VARE_KEEP_UNDEF 609 o compat.c: re-export variables from the actual make process 610 if using vfork this is the effect anyway 611 o cond.c: clean up VarParseResult constants 612 o for.c: fix undefined behavior in SubstVarLong 613 make control flow in SubstVarLong of .for loops more obvious 614 clean up SubstVarShort in .for loops 615 extract ForSubstBody from ForReadMore 616 clean up ForReadMore 617 simplify termination condition for .for loop 618 add error handling for .for loop items 619 job.c: re-export variables from the actual make process 620 parse.c: remove mmap for loading files, only allow files < 1 GiB 621 fix edge case in := with undefined in variable name 622 skip variable expansion in ParseDependencyTargetWord 623 var.c: split ExportVar into separate functions 624 clean up code in extracted ExportVar functions 625 remove dead code from ApplyModifiersIndirect 626 split Var_Subst into easily understandable functions 627 clean up VarParseResult constants 628 6292020-12-25 Simon J Gerraty <sjg@beast.crufty.net> 630 631 * main.c: use .MAKE.DEPENDFILE as set by makefiles 632 6332020-12-22 Simon J Gerraty <sjg@beast.crufty.net> 634 635 * VERSION (_MAKE_VERSION): 20201222 636 Merge with NetBSD make, pick up 637 o make DEBUG macro return boolean 638 o parse.c: fix assertion failure for files without trailing newline 639 o var.c: allow .undef to undefine multiple variables at once 640 remove excess newline from parse errors 641 6422020-12-21 Simon J Gerraty <sjg@beast.crufty.net> 643 644 * VERSION (_MAKE_VERSION): 20201221 645 Merge with NetBSD make, pick up 646 o some unit-test updates 647 6482020-12-20 Simon J Gerraty <sjg@beast.crufty.net> 649 650 * VERSION (_MAKE_VERSION): 20201220 651 Merge with NetBSD make, pick up 652 o more unit tests 653 o return FStr from Var_Parse and Var_Value 654 o spell nonexistent consistently 655 o add str_basename to reduce duplicate code 656 o compat.c: fix .ERROR_TARGET in compat -k mode 657 extract InitSignals from Compat_Run 658 extract UseShell from Compat_RunCommand 659 o cond.c: error out if an '.endif' or '.else' contain extraneous text 660 o for.c: rename ForIterate to ForReadMore 661 o hash.c: clean up hash function for HashTable 662 o lst.c: rename Vector.priv_cap to cap 663 o main.c: remove constant parameter from MakeMode 664 o make.c: use symbolic time for 0 in Make_Recheck 665 extract MakeChildren from MakeStartJobs 666 o parse.c: clean up memory handling in VarAssign_EvalShell, Parse_DoVar 667 fix error message for .info/.warning/.error without argument 668 extract Var_Undef from ParseDirective 669 extract ParseSkippedBranches, ParseForLoop from ParseReadLine 670 rename mode constants for ParseGetLine to be more expressive 671 reduce debugging details in Parse_SetInput 672 fix line numbers in .for loops 673 split ParseGetLine into separate functions 674 fix garbled output for failed shell command 675 var.c: remove redundant assignment in ApplyModifier_SysV 676 error out on unknown variable modifiers at parse time 677 remove wrong error message for indirect modifier in lint mode 678 extract ApplySingleModifier from ApplyModifiers 679 use FStr for memory management in Var_SetWithFlags 680 extract SetVar from Var_SetWithFlags 681 use FStr in VarNew 682 extract string functions from ApplyModifier_To 683 error out if .undef has not exactly 1 argument 684 extract Var_DeleteVar from Var_Delete 685 extract Var_Undef from ParseDirective 686 clean up memory management for expanding variable expressions 687 6882020-12-12 Simon J Gerraty <sjg@beast.crufty.net> 689 690 * avoid %zu 691 692 * lst.c: avoid anonymous union 693 694 * VERSION (_MAKE_VERSION): 20201212 695 Merge with NetBSD make, pick up 696 o more unit tests 697 o inline Targ_Ignore and Targ_Silent 698 o split JobFlags into separate fields 699 o remove const from function parameters (left overs from refactoring) 700 o eliminate boolean argument of Var_Export 701 o make API of Buf_Init simpler 702 o rename ParseRunOptions to ParseCommandFlags 703 o replace *line with line[0] 704 o compat.c: fix wrong exit status for multiple failed main targets 705 refactor Compat_Run to show the error condition more clearly 706 don't make .END if the main targets already failed (-k mode) 707 fix exit status in -k mode if a dependency fails 708 o for.c: clean up Buf_AddEscaped in .for loops 709 o job.c: extract ShellWriter_ErrOn from JobPrintCommand 710 make Job_Touch simpler 711 refactor JobFinish 712 rename Shell.exitFlag to errFlag 713 move Job.xtraced to ShellWriter 714 make printing of shell commands independent from the job 715 rename shell flags in struct Shell 716 extract JobOpenTmpFile from JobStart 717 rename RunFlags to CommandFlags 718 split various Job.* into separate fields 719 rename commandShell to shell 720 extract InitShellNameAndPath from Shell_Init 721 replace signal handling macros with local functions 722 replace macro MESSAGE with local function 723 parse.c: error out on null bytes in makefiles 724 error out on misspelled directives 725 rename IFile.nextbuf to readMore 726 fix undefined behavior in ParseEOF 727 str.c: remove redundant call to strlen in Str_Words 728 var.c: error out on misspelled .unexport-env 729 error out on misspelled .export directives 730 extract ExportVars from Var_Export 731 extract ExportVarsExpand from Var_Export 732 eliminate boolean argument of Var_Export 733 fix undefined behavior when exporting ${:U } 734 rename Var_ExportVars to Var_ReexportVars 735 rename Var_Export1 to ExportVar 736 7372020-12-06 Simon J Gerraty <sjg@beast.crufty.net> 738 739 * VERSION (_MAKE_VERSION): 20201206 740 Merge with NetBSD make, pick up 741 o more unit tests 742 o inline macros for debug logging 743 o use consistent variable names for list nodes 744 o define constants for enum zero-values 745 o dir.c: use fixed format for debug output of the directory cache 746 remove Dir_InitDir 747 o lst.c: inline Lst_Enqueue, Vector_Done 748 o meta.c: remove unused parameter from meta_needed 749 o parse.c: rename parse functions 750 o suff.c: extract ExpandChildrenRegular from ExpandChildren 751 o targ.c: don't concatenate identifiers in Targ_PrintType 752 o var.c: remove comment decoration 753 extract UnexportVars from Var_UnExport 754 extract GetVarnamesToUnexport from Var_UnExport 755 extract UnexportEnv from Var_UnExport 756 extract UnexportVar from Var_UnExport 757 move CleanEnv to UnexportVars 758 replace pointer comparisons with enum 759 add FStr to var.c to make memory handling simpler 760 use FStr in Var_UnExport 761 move type definitions in var.c to the top 762 extract FreeEnvVar from Var_Parse 763 extract ShuffleStrings from ApplyModifier_Order 764 7652020-11-30 Simon J Gerraty <sjg@beast.crufty.net> 766 767 * VERSION (_MAKE_VERSION): 20201130 768 Merge with NetBSD make, pick up 769 o add unit tests for META MODE 770 o reduce memory allocation for dirSearchPath, GNode.parents, 771 GNode.children, OpenDirs 772 o reduce pointer indirection for GNode.cohorts and 773 GNode.implicitParents 774 o remove pointer indirection from GNode.commands 775 o inline Lst_ForEachUntil in meta mode 776 o dir.c: fix memory leak for lstat cache in -DCLEANUP mode 777 clean up memory management for CachedDirs 778 fix the reference count of dotLast going negative 779 add debug logging for OpenDirs_Done 780 extract CacheNewDir from Dir_AddDir 781 add debug logging for reference counting of CachedDir 782 rename some Dir functions to SearchPath 783 o job.c: rename some global variables 784 o main.c: reduce memory allocation in ReadBuiltinRules 785 reduce memory allocation in CmdOpts.create, CmdOpts.variables, 786 CmdOpts.makefiles 787 Add .MAKE.UID and .MAKE.GID 788 o make.c: reduce memory allocation for/in toBeMade, 789 Make_ProcessWait, Make_ExpandUse 790 o meta.c: reduce memory allocation in meta_oodate 791 o parse.c: reduce memory allocations for parsing dependencies and 792 targets 793 o suff.c: reduce memory allocation in suffix handling 794 7952020-11-24 Simon J Gerraty <sjg@beast.crufty.net> 796 797 * VERSION (_MAKE_VERSION): 20201124 798 Merge with NetBSD make, pick up 799 o .MAKE.{UID,GID} represent uid and gid running make. 800 o fix error handling for .BEGIN and .END dependency in -k mode 801 o fix missing "Stop." after failed .END node in -k mode 802 o use properly typed comparisons in boolean contexts 803 o replace a few HashTable_CreateEntry with HashTable_Set 804 o add HashSet type 805 o compat.c: split Compat_Make into smaller functions 806 extract DebugFailedTarget from Compat_RunCommand 807 o dir.c: refactor Dir_UpdateMTime 808 migrate CachedDir.files from HashTable to HashSet 809 o make.c: add high-level API for GNode.made 810 8112020-11-22 Simon J Gerraty <sjg@beast.crufty.net> 812 813 * VERSION (_MAKE_VERSION): 20201122 814 Merge with NetBSD make, pick up 815 o rename GNode.context to vars 816 o suff.c: cleanup and refactor 817 rename some functions and vars to better reflect usage 818 add high-level API for CandidateSearcher 819 o targ.c: add more debug logging for suffix handling 820 o more unit tests 821 o add debug logging for setting and resetting the main target 822 8232020-11-17 Simon J Gerraty <sjg@beast.crufty.net> 824 825 * VERSION (_MAKE_VERSION): 20201117 826 Merge with NetBSD make, pick up 827 o fix some unit-tests when .SHELL is dash 828 o rename Targ_NewGN to GNode_New 829 o make some GNode functions const 830 o main.c: call Targ_Init before Var_Init 831 cleanup PrintOnError, getTmpdir and ParseBoolean 832 o var.c: fix error message of failed :!cmd! modifier 833 8342020-11-14 Simon J Gerraty <sjg@beast.crufty.net> 835 836 * VERSION (_MAKE_VERSION): 20201114 837 Merge with NetBSD make, pick up 838 o replace a few HashTable_CreateEntry with HashTable_Set 839 o clean up cached_stats 840 o rename DEFAULT to defaultNode 841 o remove redundant struct make_stat 842 o cond.c: in lint mode, check for ".else <cond>" 843 use bitset for IfState 844 replace large switch with if-else in Cond_EvalLine 845 o job.c: clean up JobExec, JobStart, JobDoOutput 846 use stderr for error message about failed touch 847 clean up Job_Touch 848 replace macro DBPRINTF with JobPrintln 849 rename JobState to JobStatus 850 main.c: switch cache for realpath from GNode to HashTable 851 clean up Fatal 852 clean up InitDefSysIncPath 853 use progname instead of hard-coded 'make' in warning 854 rename Main_SetVarObjdir to SetVarObjdir 855 make.1: document the -S option 856 make.c: fix debug output for GNode details 857 use symbolic names in debug output of GNodes 858 8592020-11-12 Simon J Gerraty <sjg@beast.crufty.net> 860 861 * configure.in: fix --with-force-machine-arch 862 863 * VERSION (_MAKE_VERSION): 20201112 864 Merge with NetBSD make, pick up 865 o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable 866 checks in InitObjdir. Explicit .OBJDIR target always allows 867 read-only directory. 868 o cond.c: clean up Cond_EvalLine 869 8702020-11-11 Simon J Gerraty <sjg@beast.crufty.net> 871 872 * VERSION (_MAKE_VERSION): 20201111 873 Merge with NetBSD make, pick up 874 o more unit-tests 875 o style cleanup 876 remove redundant parentheses from sizeof operator 877 replace character literal 0 with '\0'. 878 replace pointer literal 0 with NULL. 879 remove redundant parentheses. 880 replace (expr & mask) == 0 with !(expr & mask). 881 use strict typing in conditions of the form !var 882 o rename Make_OODate to GNode_IsOODate 883 o rename Make_TimeStamp to GNode_UpdateYoungestChild 884 o rename Var_Set_with_flags to Var_SetWithFlags 885 o rename dieQuietly to shouldDieQuietly 886 o buf.c: make API of Buf_Init simpler 887 o compat.c: clean up Compat_Make, Compat_RunCommand, 888 CompatDeleteTarget and CompatInterrupt 889 o cond.c: in lint mode, only allow '&&' and '||', not '&' and '|' 890 clean up CondParser_Comparison 891 o main.c: rename getBoolean and s2Boolean 892 rename MAKEFILE_PREFERENCE for consistency 893 o parse.c: replace strstr in ParseMaybeSubMake with optimized code 894 o var.c: rename VARE_ASSIGN to VARE_KEEP_DOLLAR 895 replace emptyString with allocated empty string 896 error out on unclosed expressions after the colon 897 8982020-11-01 Simon J Gerraty <sjg@beast.crufty.net> 899 900 * VERSION (_MAKE_VERSION): 20201101 901 Merge with NetBSD make, pick up 902 o negate NoExecute to GNode_ShouldExecute 903 o job.c: rename JobMatchShell to FindShellByName 904 extract EscapeShellDblQuot from JobPrintCommand 905 extract ParseRunOptions from JobPrintCommand 906 o var.c: extract ApplyModifiersIndirect from ApplyModifiers 907 treat malformed :range, :ts and :[...] as errors 908 add tests for the variable modifiers :[words] and :range 909 9102020-10-31 Simon J Gerraty <sjg@beast.crufty.net> 911 912 * VERSION (_MAKE_VERSION): 20201031 913 Merge with NetBSD make, pick up 914 o format #include directives consistently 915 o do not look up local variables like .TARGET anywhere else 916 o main.c: Main_SetObjdir is first called for curdir which may be 917 readonly 918 reduce the scope where recursive expressions are detected 919 remove redundant :tl from getBoolean 920 clean up mkTempFile 921 o meta.c: simplify memory allocation in meta_create and meta_oodate 922 o parse.c: extract loadedfile_mmap from loadfile 923 o trace.c: document possible undefined behavior with .CURDIR 924 o var.c: make parsing of the :gmtime and :localtime modifiers stricter 925 rename ismeta to is_shell_metachar 926 remove debug logging for the :Q variable modifier 927 rename VarIsDynamic to VarnameIsDynamic 928 use consistent parameter order in varname parsing functions 929 extract ParseVarnameLong from Var_Parse 930 extract ParseVarnameShort from Var_Parse 931 fix type of ParseModifierPart parameter delim 932 extract IsEscapedModifierPart from ParseModifierPart 933 clean up ModifyWords 934 add test for combining the :@ and :? variable modifiers 935 9362020-10-30 Simon J Gerraty <sjg@beast.crufty.net> 937 938 * VERSION (_MAKE_VERSION): 20201030 939 Merge with NetBSD make, pick up 940 o change char * to void * in Var_Value 941 o make iterating over HashTable simpler 942 o rename VAR_CMD to VAR_CMDLINE 943 o cond.c: clean up is_separator 944 fix parse error in string literal in conditional 945 o main.c: do not use objdir that is not writable 946 in lint mode, exit with error status on errors 947 o parse.c: clean up StrContainsWord 948 fix out-of-bounds pointer in ParseTrackInput 949 o var.c: rename Str_SYSVMatch and its parameters 950 remove unsatisfiable conditions in Var_Set_with_flags 951 document where the variable name is expanded 952 fix documentation for VARP_SUB_ONE 953 rename VAR_EXPORTED_YES to VAR_EXPORTED_SOME 954 document VAR_READONLY 955 prevent appending to read-only variables 956 extract MayExport from Var_Export1 957 remove redundant evaluations in VarFind 958 replace VarFindFlags with a simple Boolean 959 rename FIND_CMD to FIND_CMDLINE, to match VAR_CMDLINE 960 9612020-10-28 Simon J Gerraty <sjg@beast.crufty.net> 962 963 * VERSION (_MAKE_VERSION): 20201028 964 Merge with NetBSD make, pick up 965 o rename defIncPath to defSysIncPath 966 o initialize all CmdOpts fields 967 o lst.c: inline Vector_Get 968 o main.c: refactor main extract 969 InitMaxJobs,InitObjdir,InitVarMake,InitRandom, 970 ReadMakefiles,CleanUp,InitVpath,ReadBuiltinRules, 971 InitDefIncPath,CmdOpts_Init,UnlimitFiles 972 o parse.c: merge curFile into includes 973 rename predecessor to order_pred 974 sort ParseSpecial alphabetically 975 remove unused, undocumented .NOEXPORT 976 rename ParseSpecial enum values consistently 977 rename some fields of struct IFile 978 9792020-10-26 Simon J Gerraty <sjg@beast.crufty.net> 980 981 * VERSION (_MAKE_VERSION): 20201026 982 Merge with NetBSD make, pick up 983 o group the command line options and arguments into a struct 984 o rename GNode.cmgn to youngestChild 985 o rename hash functions to identify the type name 986 o negate OP_NOP and rename it to GNode_IsTarget 987 o add GNode_Path to access the path of a GNode 988 o remove macros MIN and MAX 989 o remove unused Lst_Find and Lst_FindFrom 990 o arch.c: and make Arch_FindLib simpler 991 clean up code layout 992 make Arch_ParseArchive simpler 993 o cond.c: inline CondFindStrMatch into FuncMake 994 o dir.c: replace Dir_CopyDir with Dir_CopyDirSearchPath 995 omit trailing space in debug output for expanding file patterns 996 refactor DirMatchFiles 997 document that the SearchPath of Dir_FindFile may be NULL 998 remove UNCONST from Dir_Expand 999 inline DirFindName 1000 o for.c: clean up code for handling .for loops 1001 o hash.c: print hash in debug log with fixed width 1002 clean up hash table functions 1003 reduce amount of string hashing 1004 o job.c: refactor JobDeleteTarget 1005 use proper enum constants for aborting 1006 convert result of JobStart from macros to enum 1007 convert abort reason macros to enum 1008 rework Job_CheckCommands to reduce indentation 1009 rename Shell fields 1010 add field names in declaration of DEFSHELL_CUSTOM 1011 convert JobState and JobFlags to enum types 1012 move handling of the "..." command to JobPrintCommands 1013 o lst.c: clean up 1014 refactor LstNodeNew 1015 remove Lst_Open, Lst_Next, Lst_Close 1016 remove code for circular lists from Lst_Next 1017 o main.c: do not attempt to read .MAKE.DEPENFILE if set to 1018 /dev/null or anything starting with "no" 1019 convert macros for debug flags into enum 1020 o make.c: inline Lst_Copy in Make_ExpandUse 1021 o meta.c: inline Lst_Find in meta_oodate 1022 make Lst_RemoveIf simpler in meta_oodate 1023 o parse.c: convert error level for Parse_Error to an enum 1024 o suff.c: properly terminate debug output with newline 1025 add more details to DEBUG_SRC log 1026 replace Dir_CopyDir with Dir_CopyDirSearchPath 1027 don't modify GNode name while rebuilding the suffix graph 1028 o var.c: reduce duplicate code in VarFind 1029 10302020-10-22 Simon J Gerraty <sjg@beast.crufty.net> 1031 1032 * VERSION (_MAKE_VERSION): 20201022 1033 Merge with NetBSD make, pick up 1034 o more refactoring and simplification to reduce code size 1035 o var.c: extract CanonicalVarname from VarFind 1036 o make.c: extract UpdateImplicitParentsVars from Make_Update 1037 o main.c: extract PrintVar from doPrintVars 1038 extract HandlePWD from main 1039 o lst.c: inline simple Lst getters 1040 remove unused Lst_ForEach 1041 o job.c: move struct Shell from job.h to job.c 1042 o more unit tests 1043 10442020-10-19 Simon J Gerraty <sjg@beast.crufty.net> 1045 1046 * configure.in: remove inappropriate use of AC_INCLUDES_DEFAULT 1047 10482020-10-18 Simon J Gerraty <sjg@beast.crufty.net> 1049 1050 * VERSION (_MAKE_VERSION): 20201018 1051 Merge with NetBSD make, pick up 1052 o remove USE_IOVEC 1053 o rename some Hash_* apis to Hash* 1054 o replace execError with execDie 1055 o rename Lst_Init to Lst_New 1056 o add tags to enum types 1057 o rename Stack to Vector 1058 o parse.c: more refactoring 1059 o unit-tests: make some tests use line buffered stdout 1060 o unit-tests/Makefile: in meta mode do not make all tests depend on 1061 Makefile, it isn't necessary. 1062 10632020-10-10 Simon J Gerraty <sjg@beast.crufty.net> 1064 1065 * main.c: check for CTL_HW being defined. 1066 * unit-tests/Makefile: ensure export tests output are POSIX compliant 1067 disable opt-debug-jobs test until it works on ubuntu 1068 1069 * VERSION (_MAKE_VERSION): 20201010 1070 Merge with NetBSD make, pick up 1071 o dir.c: remove pathname limit for Dir_FindHereOrAbove 1072 o hash.c: replace strcpy with memcpy in Hash_CreateEntry 1073 o main.c: extract init_machine and init_machine_arch from main 1074 allow to disable debug logging options 1075 o parse.c: enable format string truncation warnings 1076 extract parsing of sources from ParseDoDependency 1077 split ParseDoSrc into smaller functions 1078 hide implementation details from Parse_DoVar 1079 clean up parsing of variable assignments 1080 split Parse_DoVar into manageable pieces 1081 don't modify the given line during Parse_DoVar 1082 fix out-of-bounds memory access in Parse_DoVar 1083 fix parsing of the :sh assignment modifier 1084 o var.c: rework memory allocation for the name of variables 1085 extract ApplyModifier_Literal into separate function 1086 in lint mode, reject modifiers without delimiter 1087 do not export variable names starting with '-' 1088 o fix double-free bug in -DCLEANUP mode 1089 o more cleanup to enable higher warnings level 1090 o more unit tests 1091 10922020-10-02 Simon J Gerraty <sjg@beast.crufty.net> 1093 1094 * VERSION (_MAKE_VERSION): 20201002 1095 Merge with NetBSD make, pick up 1096 o dir.c: use hash table for looking up open directories by name 1097 o main.c: clean up option handling 1098 o parse.c: add missing const for Parse_AddIncludeDir 1099 o var.c: ApplyModifier_To, update pp in each branch 1100 o remove redundant function prototypes 1101 o more unit tests 1102 11032020-10-01 Simon J Gerraty <sjg@beast.crufty.net> 1104 1105 * VERSION (_MAKE_VERSION): 20201001 1106 Merge with NetBSD make, pick up 1107 o compat.c: comment about "..." 1108 11092020-09-30 Simon J Gerraty <sjg@beast.crufty.net> 1110 1111 * VERSION (_MAKE_VERSION): 20200930 1112 Merge with NetBSD make, pick up 1113 o job.c: split Job.jobPipe into 2 separate fields 1114 replace Lst_Open with direct iteration 1115 o lst.c: remove redundant assertions 1116 o targ.c: replace Lst_Open with direct iteration 1117 o var.c: fix bug in evaluation of indirect variable modifiers 1118 extract ApplyModifier_Quote into separate function 1119 o make debug logging simpler 1120 11212020-09-27 Simon J Gerraty <sjg@beast.crufty.net> 1122 1123 * VERSION (_MAKE_VERSION): 20200927 1124 Merge with NetBSD make, pick up 1125 o parse.c: ensure parse errors result in 'stopped in' message. 1126 o compat.c: make parameter of Compat_RunCommand const 1127 o main.c: extract InitVarTarget from main 1128 o parse.c: rename ParseFinishLine to FinishDependencyGroup 1129 refactor ParseDoDependency 1130 o var.c: Var_Subst no longer returns string result 1131 rename Var_ParsePP back to Var_Parse 1132 in lint mode, improve error handling for undefined variables 1133 extract ParseVarname from Var_Parse 1134 o rename Lst_ForEach to Lst_ForEachUntil 1135 o inline Lst_ForEachUntil in several cases 1136 o clean up API for finding and creating GNodes 1137 o fix assertion failure in -j mode with .END node 1138 o inline and remove LstNode_Prev and LstNode_Next 1139 o use fine-grained type names for lists and their nodes 1140 o more unit tests 1141 11422020-09-11 Simon J Gerraty <sjg@beast.crufty.net> 1143 1144 * VERSION (_MAKE_VERSION): 20200911 1145 Merge with NetBSD make, pick up 1146 o cond.c: split EvalComparison into smaller functions 1147 reorder parameters of condition parsing functions 1148 reduce code size in CondParser_Eval 1149 rename CondGetString to CondParser_String 1150 add CondLexer_SkipWhitespace 1151 group the condition parsing state into a struct 1152 in CondGetString, replace repeated Buf_Add with Buf_AddStr 1153 o migrate Var_Parse to Var_ParsePP 1154 o add wrappers around ctype.h functions 1155 o lst.c: use a stack instead of a list for the nested include path 1156 o more unit tests 1157 11582020-09-04 Simon J Gerraty <sjg@beast.crufty.net> 1159 1160 * make-bootstrap.sh.in: adjust object list 1161 11622020-09-02 Simon J Gerraty <sjg@beast.crufty.net> 1163 1164 * VERSION (_MAKE_VERSION): 20200902 1165 Merge with NetBSD make, pick up 1166 o use make_stat to ensure no confusion over valid fields 1167 returned by cached_stat 1168 o var.c: make VarQuote const-correct 1169 o add unit tests for .for 1170 11712020-09-01 Simon J Gerraty <sjg@beast.crufty.net> 1172 1173 * VERSION (_MAKE_VERSION): 20200901 1174 Merge with NetBSD make, pick up 1175 o rename Hash_Table fields 1176 o make data types in Dir_HasWildcards more precise 1177 11782020-08-31 Simon J Gerraty <sjg@beast.crufty.net> 1179 1180 * VERSION (_MAKE_VERSION): 20200831 1181 Merge with NetBSD make, pick up 1182 o suff.c: fix unbalanced Lst_Open/Lst_Close in SuffFindCmds 1183 o lst.c: Lst_Open renable assert that list isn't open 1184 o unit test for .TARGET dependent flags 1185 o var.c: fix aliasing bug in VarUniq 1186 o more unit tests for :u 1187 11882020-08-30 Simon J Gerraty <sjg@beast.crufty.net> 1189 1190 * VERSION (_MAKE_VERSION): 20200830 1191 Merge with NetBSD make, pick up 1192 o allow for strict type checking for Boolean 1193 o Var_Parse never returns NULL 1194 o Var_Subst never returns NULL 1195 o Lst_Find now takes boolean match function 1196 o rename Lst_Memeber to Lst_FindDatum 1197 o rename LstNode functions to match their type 1198 o rename GNode.iParents to implicitParents 1199 o fix assertion failure for .SUFFIXES in archives 1200 o compat.c: clean up documentation for CompatInterrupt and Compat_Run 1201 remove unreachable code from CompatRunCommand 1202 o main.c: simplify getBoolean 1203 o stc.c: replace brk_string with simpler Str_Words 1204 o suff.c: add debug macros 1205 12062020-08-28 Simon J Gerraty <sjg@beast.crufty.net> 1207 1208 * VERSION (_MAKE_VERSION): 20200828 1209 Merge with NetBSD make, pick up 1210 o lst.c: inline LstIsValid and LstNodeIsValid 1211 o remove trailing S from Lst function names after migration complete 1212 o more comment cleanup/clarification 1213 o suff.c: clean up suffix handling 1214 o more unit tests 1215 12162020-08-26 Simon J Gerraty <sjg@beast.crufty.net> 1217 1218 * VERSION (_MAKE_VERSION): 20200826 1219 Merge with NetBSD make, pick up 1220 o enum.c: distinguish between bitsets containing flags and 1221 ordinary enums 1222 o var.c: fix error message for ::!= modifier with shell error 1223 o fix bugs in -DCLEANUP mode 1224 12252020-08-24 Simon J Gerraty <sjg@beast.crufty.net> 1226 1227 * VERSION (_MAKE_VERSION): 20200824 1228 Merge with NetBSD make, pick up 1229 o in debug mode, print GNode details in symbols 1230 12312020-08-23 Simon J Gerraty <sjg@beast.crufty.net> 1232 1233 * VERSION (_MAKE_VERSION): 20200823 1234 Merge with NetBSD make, pick up 1235 o lst.c: more asserts, 1236 make args to Lst_Find match others. 1237 o var.c: pass flags to VarAdd 1238 o arch.c: use Buffer 1239 o str.c: brk_string return size_t for nwords 1240 o more unit tests 1241 12422020-08-22 Simon J Gerraty <sjg@beast.crufty.net> 1243 1244 * VERSION (_MAKE_VERSION): 1245 Merge with NetBSD make, pick up 1246 o var.c: support for read-only variables eg .SHELL 1247 being the shell used to run scripts. 1248 o lst.c: more simplification 1249 o more documentation and style cleanup 1250 o more unit tests 1251 o ensure unit-test/Makefile is run by TEST_MAKE 1252 o reduce duplication of header inclusion 1253 12542020-08-21 Simon J Gerraty <sjg@beast.crufty.net> 1255 1256 * VERSION (_MAKE_VERSION): 20200821 1257 Merge with NetBSD make, pick up 1258 o lst.c: revert invalid assertion - but document it 1259 o dir.c: split Dir_Init into two functions 1260 12612020-08-20 Simon J Gerraty <sjg@beast.crufty.net> 1262 1263 * lst.c: needs inttypes.h on Linux 1264 1265 * VERSION (_MAKE_VERSION): 20200820 1266 Merge with NetBSD make, pick up 1267 o make.1: clarify some passages 1268 o var.c: more cleanup, clarify comments 1269 o make_malloc.c: remove unreachable code 1270 o cond.c: make CondGetString easier to debug 1271 o simplify list usage 1272 o unit-tests: more 1273 12742020-08-16 Simon J Gerraty <sjg@beast.crufty.net> 1275 1276 * VERSION (_MAKE_VERSION): 20200816 1277 Merge with NetBSD make, pick up 1278 o refactor unit-tests to be more fine grained 1279 not all tests moved yet 1280 12812020-08-14 Simon J Gerraty <sjg@beast.crufty.net> 1282 1283 * VERSION (_MAKE_VERSION): 20200814 1284 Merge with NetBSD make, pick up 1285 o more str_concat variants 1286 o more enums for flags 1287 o var.c: cleanup for higher warnings level 1288 12892020-08-10 Simon J Gerraty <sjg@beast.crufty.net> 1290 1291 * VERSION (_MAKE_VERSION): 20200810 1292 Merge with NetBSD make, pick up 1293 o more unit tests 1294 o general comment and style cleanup 1295 12962020-08-08 Simon J Gerraty <sjg@beast.crufty.net> 1297 1298 * VERSION (_MAKE_VERSION): 20200808 1299 Merge with NetBSD make, pick up 1300 o enum.[ch]: streamline, enums for use in flags and debug output 1301 o cond.c: cleanup 1302 o var.c: reduce duplicate code for modifiers 1303 debug logging for Var_Parse 1304 more detailed debug output 1305 o more unit tests 1306 13072020-08-06 Simon J Gerraty <sjg@beast.crufty.net> 1308 1309 * unit-tests/Makefile: -r for recursive and include Makefile.inc 1310 so I can run tests in meta mode 1311 supress extra noise if in meta mode 1312 1313 * VERSION (_MAKE_VERSION): 20200806 1314 Merge with NetBSD make, pick up 1315 o parse.c: remove VARE_WANTRES for LINT 1316 we just want to check parsing (for now). 1317 13182020-08-05 Simon J Gerraty <sjg@beast.crufty.net> 1319 1320 * VERSION (_MAKE_VERSION): 20200805 1321 Merge with NetBSD make, pick up 1322 o make.1: Rework the description of dependence operators 1323 13242020-08-03 Simon J Gerraty <sjg@beast.crufty.net> 1325 1326 * VERSION (_MAKE_VERSION): 20200803 1327 Merge with NetBSD make, pick up 1328 o revert some C99 usage, for max portability 1329 o unit-tests/lint 1330 13312020-08-02 Simon J Gerraty <sjg@beast.crufty.net> 1332 1333 * VERSION (_MAKE_VERSION): 20200802 1334 Merge with NetBSD make, pick up 1335 o more unit tests 1336 13372020-08-01 Simon J Gerraty <sjg@beast.crufty.net> 1338 1339 * Remove NetBSD specific plumbing from unit-tests/Makefile 1340 1341 * VERSION (_MAKE_VERSION): 20200801 1342 Merge with NetBSD make, pick up 1343 o make Var_Value return const 1344 o size_t for buf sizes 1345 o optimize some buffer operations - avoid strlen 1346 13472020-07-31 Simon J Gerraty <sjg@beast.crufty.net> 1348 1349 * VERSION (_MAKE_VERSION): 20200731 1350 Merge with NetBSD make, pick up 1351 o var.c: fix undefinded behavior for incomplete :t modifier 1352 fixes unit-test/moderrs on Ubuntu 1353 o parse.c: When parsing variable assignments other than := 1354 if DEBUG(LINT) test substition of value, so we get a file and 1355 line number in the resulting error. 1356 o dir.c: fix parsing of nested braces in dependency lines 1357 add unit-tests 1358 13592020-07-30 Simon J Gerraty <sjg@beast.crufty.net> 1360 1361 * VERSION (_MAKE_VERSION): 20200730 1362 Merge with NetBSD make, pick up 1363 o var.c: minor cleanup 1364 o unit-tests: more tests to improve code coverage 1365 13662020-07-28 Simon J Gerraty <sjg@beast.crufty.net> 1367 1368 * VERSION (_MAKE_VERSION): 20200728 1369 Merge with NetBSD make, pick up 1370 o var.c: more optimizations 1371 13722020-07-26 Simon J Gerraty <sjg@beast.crufty.net> 1373 1374 * VERSION (_MAKE_VERSION): 20200726 1375 Merge with NetBSD make, pick up 1376 o collapse lsd.lib into lst.c - reduce code size and allow inlining 1377 o lots of function comment updates 1378 o var.c: more optimizations 1379 o make return of Var_Parse const 1380 13812020-07-20 Simon J Gerraty <sjg@beast.crufty.net> 1382 1383 * VERSION (_MAKE_VERSION): 20200720 1384 Merge with NetBSD make, pick up 1385 o DEBUG_HASH report stats at end and tone down the noise 1386 o var.c: each flag type gets its own prefix. 1387 move SysV string matching to var.c 1388 make ampersand in ${VAR:from=to&} an ordinary character 1389 cleanup and simplify implementation of modifiers 1390 o make.1: move documentation for assignment modifiers 1391 13922020-07-18 Simon J Gerraty <sjg@beast.crufty.net> 1393 1394 * VERSION (_MAKE_VERSION): 20200718 1395 Merge with NetBSD make, pick up 1396 o DEBUG_HASH to see how well the hash tables are working 1397 13982020-07-11 Simon J Gerraty <sjg@beast.crufty.net> 1399 1400 * bsd.after-import.mk: make sure we update unit-tests/Makefile 1401 14022020-07-10 Simon J Gerraty <sjg@beast.crufty.net> 1403 1404 * configure.in: use AC_INCLUDES_DEFAULT rather than AC_HEADER_STDC 1405 1406 * VERSION (_MAKE_VERSION): 20200710 1407 Merge with NetBSD make, pick up 1408 o filemon/filemon_dev.c: use O_CLOEXEC rather than extra syscall 1409 o meta.c: target flagged .META is out-of-date if meta file missing 1410 14112020-07-09 Simon J Gerraty <sjg@beast.crufty.net> 1412 1413 * VERSION (_MAKE_VERSION): 20200709 1414 Merge with NetBSD make, pick up 1415 o cond.c: fix for compare_expression when doEval=0 1416 o unit-tests/Makefile: rework 1417 o filemon/filemon_dev.c: ensure filemon fd is closed on exec. 1418 14192020-07-04 Simon J Gerraty <sjg@beast.crufty.net> 1420 1421 * VERSION (_MAKE_VERSION): 20200704 1422 Merge with NetBSD make, pick up 1423 (most of this by rillig@) 1424 o lots of style and white-space cleanup 1425 o lots more unit tests for variable modifiers 1426 o simplified description of some functions 1427 o str.c: refactor Str_Match 1428 o var.c: debugging output for :@ 1429 constify VarModify parameter 1430 fix :hash modifier on 16-bit platforms 1431 remove unnecessary forward declarations 1432 refactor ApplyModifier_SysV to have less indentation 1433 simplify code for :E and :R 1434 clean up code for :H and :T 1435 refactor ApplyModifiers 1436 1437 * var.c: we need stdint.h on some platforms to get uint32_t 1438 * unit-test/Makefile: we need to supress the specific error 1439 for RE substitution error in modmisc, since it varies accross 1440 different OS. 1441 14422020-07-02 Simon J Gerraty <sjg@beast.crufty.net> 1443 1444 * VERSION (_MAKE_VERSION): 20200702 1445 Merge with NetBSD make, pick up 1446 o var.c: more improvements to avoiding unnecessary evaluation 1447 use enums for flags 1448 o remove flags arg to Var_Set which outside of var.c is always 0 1449 14502020-07-01 Simon J Gerraty <sjg@beast.crufty.net> 1451 1452 * VERSION (_MAKE_VERSION): 20200701 1453 Merge with NetBSD make, pick up 1454 o var.c: with change to cond.c; ensure that nested variables 1455 within a variable name are expanded. 1456 o unit-tests/varmisc.mk: test for nested varname 1457 14582020-06-29 Simon J Gerraty <sjg@beast.crufty.net> 1459 1460 * VERSION (_MAKE_VERSION): 20200629 1461 Merge with NetBSD make, pick up 1462 o cond.c: do not eval unnecessary terms of conditionals. 1463 14642020-06-25 Simon J Gerraty <sjg@beast.crufty.net> 1465 1466 * VERSION (_MAKE_VERSION): 20200625 1467 Merge with NetBSD make, pick up 1468 o meta.c: report error if lseek in filemon_read fails 1469 14702020-06-22 Simon J Gerraty <sjg@beast.crufty.net> 1471 1472 * VERSION (_MAKE_VERSION): 20200622 1473 Merge with NetBSD make, pick up 1474 o dieQuietly: ignore OP_SUBMAKE as too aggressive 1475 14762020-06-19 Simon J Gerraty <sjg@beast.crufty.net> 1477 1478 * VERSION (_MAKE_VERSION): 20200619 1479 Merge with NetBSD make, pick up 1480 o str.c: performance improvement for Str_Match for multiple '*' 1481 o dieQuietly: supress the failure output from make 1482 when failing node is a sub-make or a sibling failed. 1483 This cuts down greatly on unhelpful noise at the end of 1484 build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no 1485 14862020-06-10 Simon J Gerraty <sjg@beast.crufty.net> 1487 1488 * FILES: add LICENSE to appease some packagers. 1489 This is an attempt to fairly represent the license on almost 1490 200 files, which are almost all BSD-3-Clause 1491 The few exceptions being more liberal. 1492 1493 * VERSION (_MAKE_VERSION): 20200610 1494 Merge with NetBSD make, pick up 1495 o unit test for :Or 1496 14972020-06-06 Simon J Gerraty <sjg@beast.crufty.net> 1498 1499 * VERSION (_MAKE_VERSION): 20200606 1500 Merge with NetBSD make, pick up 1501 o make.1: cleanup 1502 1503 * Makefile: fix depends for main.o which broke MAKE_VERSION 1504 15052020-06-05 Simon J Gerraty <sjg@beast.crufty.net> 1506 1507 * VERSION (_MAKE_VERSION): 20200605 1508 Merge with NetBSD make, pick up 1509 o dir.c: cached_stats - don't confuse stat and lstat results. 1510 o var.c: add :Or for reverse sort. 1511 15122020-05-24 Simon J Gerraty <sjg@beast.crufty.net> 1513 1514 * configure.in: add AC_PROG_CC_C99 for mipspro compiler 1515 also if --with-filemon= specifies path to filemon.h 1516 set use_filemon=dev 1517 * dirname.c: remove include of namespace.h 1518 15192020-05-17 Simon J Gerraty <sjg@beast.crufty.net> 1520 1521 * VERSION (_MAKE_VERSION): 20200517 1522 Merge with NetBSD make, pick up 1523 o modified dollar tests to avoid shell dependencies 1524 o new tests for .INCLUDEFROM 1525 15262020-05-16 Simon J Gerraty <sjg@beast.crufty.net> 1527 1528 * unit-tests/dollar.mk: tweak '1 dollar literal' test 1529 to not depend so much on shell behavior 1530 15312020-05-10 Simon J Gerraty <sjg@beast.crufty.net> 1532 1533 * VERSION (_MAKE_VERSION): 20200510 1534 Merge with NetBSD make, pick up 1535 o unit test for dollar handling 1536 15372020-05-06 Simon J Gerraty <sjg@beast.crufty.net> 1538 1539 * VERSION (_MAKE_VERSION): 20200506 1540 Merge with NetBSD make, pick up 1541 o str.c: empty string does not match % pattern 1542 plus unit-test changes 1543 15442020-05-04 Simon J Gerraty <sjg@beast.crufty.net> 1545 1546 * VERSION (_MAKE_VERSION): 20200504 1547 May the 4th be with you 1548 Merge with NetBSD make, pick up 1549 o var.c: import handling of old sysV style modifier using '%' 1550 o str.c: refactor brk_string 1551 o unit-tests: add test case for lazy conditions 1552 15532020-04-18 Simon J Gerraty <sjg@beast.crufty.net> 1554 1555 * VERSION (_MAKE_VERSION): 20200418 1556 1557 * configure.in: use_makefile=no for cygwin et al. 1558 case insensitive filesystems just don't work if both 1559 makefile and Makefile exist. 1560 NOTE: bmake does not support cygwin and likely never will, 1561 but if brave souls want to try it - help them out. 1562 15632020-04-02 Simon J Gerraty <sjg@beast.crufty.net> 1564 1565 * VERSION (_MAKE_VERSION): 20200402 1566 Merge with NetBSD make, pick up 1567 o meta.c: meta_oodate, CHECK_VALID_META is too aggressive for CMD 1568 a blank command is perfectly valid. 1569 15702020-03-30 Simon J Gerraty <sjg@beast.crufty.net> 1571 1572 * VERSION (_MAKE_VERSION): 20200330 1573 Merge with NetBSD make, pick up 1574 o make.h: extern debug_file 1575 15762020-03-18 Simon J Gerraty <sjg@beast.crufty.net> 1577 1578 * VERSION (_MAKE_VERSION): 20200318 1579 Merge with NetBSD make, pick up 1580 o meta.c: meta_oodate, check for corrupted meta file 1581 earlier and more often. 1582 15832020-02-20 Simon J Gerraty <sjg@beast.crufty.net> 1584 1585 * VERSION (_MAKE_VERSION): 20200220 1586 15872020-02-19 Simon J Gerraty <sjg@beast.crufty.net> 1588 1589 * boot-strap: unset MAKEFLAGS 1590 15912020-02-12 Simon J Gerraty <sjg@beast.crufty.net> 1592 1593 * VERSION (_MAKE_VERSION): 20200212 1594 * meta.c: meta_compat_parent check for USE_FILEMON 1595 patch from Soeren Tempel 1596 15972020-02-05 Simon J Gerraty <sjg@beast.crufty.net> 1598 1599 * VERSION: 20200205 1600 Merge with NetBSD make, pick up 1601 o meta.c: fix compat mode, need to call meta_job_output() 1602 o job.c: extra fds for meta mode not needed if using filemon_dev 1603 16042020-01-22 Simon J Gerraty <sjg@beast.crufty.net> 1605 1606 * VERSION: 20200122 1607 Merge with NetBSD make, pick up 1608 o meta.c: avoid passing NULL to filemon_*() when meta_needed() 1609 returns FALSE. 1610 16112020-01-21 Simon J Gerraty <sjg@beast.crufty.net> 1612 1613 * VERSION: 20200121 1614 Merge with NetBSD make, pick up 1615 o filemon/filemon_{dev,ktrace}.c: allow selection of 1616 filemon implementation. filemon_dev.c uses the kernel module 1617 while filemon_ktrace.c leverages the fktrace api available in 1618 NetBSD. filemon_ktrace.c can hopefully form the basis for 1619 adding support for other tracing mechanisms such as strace on 1620 Linux. 1621 o meta.c: when target is out-of-date per normal make rules 1622 record value of .OODATE in meta file. 1623 16242019-09-26 Simon J Gerraty <sjg@beast.crufty.net> 1625 1626 * VERSION: 20190926 1627 Merge with NetBSD make, pick up 1628 o parse.c: don't pass NULL to realpath(3) 1629 some versions cannot handle it. 1630 16312019-04-09 Simon J Gerraty <sjg@beast.crufty.net> 1632 1633 * VERSION: 20190409 1634 Merge with NetBSD make, pick up 1635 o parse.c: ParseDoDependency: free paths rather than assert 1636 16372018-12-22 Simon J Gerraty <sjg@beast.crufty.net> 1638 1639 * VERSION: 20181222 1640 1641 * configure.in: add --without-makefile to avoid generating 1642 makefile and make-bootstrap.sh 1643 1644 * include Makefile.inc if it exists 1645 1646 * Use Makefile and Makefile.config.in in unit-tests 1647 so we can use just: make obj && make && make test 1648 when bmake is already available. 1649 We add --without-makefile to CONFIGURE_ARGS in this case. 1650 1651 * tweak bsd.after-import.mk (captures Makefile.config etc 1652 after import to FreeBSD for example) to cope with all the above. 1653 16542018-12-21 Simon J Gerraty <sjg@beast.crufty.net> 1655 1656 * VERSION: 20181221 1657 Merge with NetBSD make, pick up 1658 o parse.c: ParseVErrorInternal use .PARSEDIR 1659 and apply if relative, and then use .PARSEFILE 1660 for consistent result. 1661 16622018-12-20 Simon J Gerraty <sjg@beast.crufty.net> 1663 1664 * VERSION: 20181220 1665 Merge with NetBSD make, pick up 1666 o parse.c: ParseVErrorInternal use .CURDIR if .PARSEDIR 1667 is relative 1668 o var.c: avoid SEGFAULT in .unexport-env 1669 when MAKELEVEL is not set 1670 16712018-12-16 Simon J Gerraty <sjg@beast.crufty.net> 1672 1673 * VERSION: 20181216 1674 Merge with NetBSD make, pick up 1675 o fix for unit-tests/varquote.mk on Debian 1676 16772018-09-21 Simon J. Gerraty <sjg@bad.crufty.net> 1678 1679 * VERSION: 20180919 1680 Merge with NetBSD make, pick up 1681 o var.c: add :q 1682 o dir.c: cleanup caching of stats 1683 16842018-09-21 Simon J Gerraty <sjg@beast.crufty.net> 1685 1686 * Makefile.config.in: use += where it makes sense. 1687 16882018-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 1689 1690 * VERSION: 20180512 1691 Merge with NetBSD make, pick up 1692 o job.c: skip polling job token pipe 1693 16942018-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 1695 1696 * VERSION: 20180405 1697 Merge with NetBSD make, pick up 1698 o parse.c: be more cautious about detecting depenency line 1699 rather than sysV style include. 1700 17012018-02-22 Simon J. Gerraty <sjg@bad.crufty.net> 1702 1703 * VERSION: 20180222 1704 Merge with NetBSD make, pick up 1705 o parse.c: avoid calling sysconf for every call to loadfile 1706 17072018-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 1708 1709 * VERSION: 20180218 1710 Merge with NetBSD make, pick up 1711 o var.c: Var_Set handle NULL value anytime. 1712 17132018-02-12 Simon J. Gerraty <sjg@bad.crufty.net> 1714 1715 * VERSION: 20180212 1716 Merge with NetBSD make, pick up 1717 o parse.c: do not treat .info as warning with -W 1718 17192017-12-07 Simon J. Gerraty <sjg@bad.crufty.net> 1720 1721 * VERSION: 20171207 1722 Merge with NetBSD make, pick up 1723 o var.c: Var_Append use Var_Set if var not previously set 1724 so that VAR_CMD is handled correctly. 1725 Add a suitable unit-test. 1726 17272017-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 1728 1729 * VERSION (_MAKE_VERSION): 20171126 1730 1731 * aclocal.m4: use AC_LINK_IFELSE for AC_C___ATTRIBUTE__ 1732 since AC_TRY_COMPILE puts input inside main() 1733 which upsets modern compilers. 1734 17352017-11-18 Simon J. Gerraty <sjg@bad.crufty.net> 1736 1737 * VERSION: 20171118 1738 Merge with NetBSD make, pick up 1739 o var.c: do not append to variable set on command line 1740 add unit-test to catch this. 1741 17422017-10-28 Simon J. Gerraty <sjg@bad.crufty.net> 1743 1744 * VERSION: 20171028 1745 Merge with NetBSD make, pick up 1746 o main.c: ignore empty MAKEOBJDIR 1747 1748 * Makefile.config.in: 1749 make @prefix@ @machine*@ and @default_sys_path@ defaults. 1750 17512017-10-05 Simon J. Gerraty <sjg@bad.crufty.net> 1752 1753 * VERSION: 20171005 1754 1755 * unit-tests/dotwait.mk: redirect stderr through pipe for more 1756 consistent result on some platforms. 1757 17582017-08-13 Simon J. Gerraty <sjg@bad.crufty.net> 1759 1760 * machine.sh: entry for AIX 1761 17622017-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 1763 1764 * VERSION (_MAKE_VERSION): Move the setting of _MAKE_VERSION 1765 to a file that can be included by configure as well as make. 1766 This allows configure to set set _MAKE_VERSION in make-bootstrap.sh 1767 17682017-08-10 Simon J. Gerraty <sjg@bad.crufty.net> 1769 1770 * Makefile (_MAKE_VERSION): 20170810 1771 Merge with NetBSD make, pick up 1772 o meta.c: if target is in subdir we only need subdir name in 1773 meta_name. 1774 17752017-07-20 Simon J. Gerraty <sjg@bad.crufty.net> 1776 1777 * Makefile (_MAKE_VERSION): 20170720 1778 Merge with NetBSD make, pick up 1779 o compat.c: pass SIGINT etc onto child and wait for it to exit 1780 before we self-terminate. 1781 17822017-07-11 Simon J. Gerraty <sjg@bad.crufty.net> 1783 1784 * Makefile (_MAKE_VERSION): 20170711 1785 forgot to update after merge on 20170708 ;-) 1786 o main.c: refactor to reduce size of main function. 1787 add -v option to always fully expand values. 1788 o meta.c: ensure command output in meta file has ending newline 1789 even when filemon not being used. 1790 When matching ${.MAKE.META.IGNORE_PATTERNS} do not use 1791 pathname via ':L' since any ':' in pathname breaks that. 1792 Instead set a '${.p.}' to pathname in the target context and 1793 use that. 1794 17952017-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 1796 1797 * Makefile (_MAKE_VERSION): 20170510 1798 Merge with NetBSD make, pick up 1799 o main.c: Main_SetObjdir: ensure buf2 is in scope 1800 18012017-05-08 Simon J. Gerraty <sjg@bad.crufty.net> 1802 1803 * Makefile (_MAKE_VERSION): 20170505 1804 see mk/ChangeLog 1805 18062017-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 1807 1808 * parse.c: not everyone has stdint.h 1809 18102017-05-01 Simon J. Gerraty <sjg@bad.crufty.net> 1811 1812 * Makefile (_MAKE_VERSION): 20170501 1813 see mk/ChangeLog 1814 18152017-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 1816 1817 * Makefile (_MAKE_VERSION): 20170421 1818 Merge with NetBSD make, pick up 1819 o str.c: Str_Match: fix closure tests for [^] and add unit-test. 1820 18212017-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 1822 1823 * Makefile (_MAKE_VERSION): 20170420 1824 Merge with NetBSD make, pick up 1825 o main.c: only use -C arg "as is" if it contains no 1826 relative component. 1827 18282017-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 1829 1830 * Makefile (_MAKE_VERSION): 20170418 1831 Merge with NetBSD make, pick up 1832 o main.c: fix Main_SetObjdir() for relative paths (eg obj). 1833 18342017-04-17 Simon J. Gerraty <sjg@bad.crufty.net> 1835 1836 * Makefile (_MAKE_VERSION): 20170417 1837 Merge with NetBSD make, pick up 1838 o fixes a number of coverity complaints 1839 - check return value of fseek, fcntl 1840 - plug memory leak in Dir_FindFile, Var_LoopExpand, 1841 JobPrintCommand, ParseTraditionalInclude 1842 - use bmake_malloc() where NULL is not tollerated 1843 - use MAKE_ATTR_UNUSED rather that kludges like 1844 return(unused ? 0 : 0) 1845 - use purge_cached_realpaths() rather than abuse cached_realpath() 1846 18472017-04-13 Simon J. Gerraty <sjg@bad.crufty.net> 1848 1849 * Makefile (_MAKE_VERSION): 20170413 1850 Merge with NetBSD make, pick up 1851 o main.c: when setting .OBJDIR ignore '$' in paths. 1852 1853 * job.c: use MALLOC_OPTIONS to set malloc_options. 1854 18552017-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 1856 1857 * Makefile (_MAKE_VERSION): 20170411 1858 Merge with NetBSD make, pick up 1859 o str.c: Str_Match: allow [^a-z] to behave as expected. 1860 18612017-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 1862 1863 * Makefile (_MAKE_VERSION): 20170326 1864 Merge with NetBSD make, pick up 1865 o main.c: purge relative paths from realpath cache when .OBJDIR 1866 is changed. 1867 18682017-03-11 Simon J. Gerraty <sjg@bad.crufty.net> 1869 1870 * Makefile (_MAKE_VERSION): 20170311 1871 Merge with NetBSD make, pick up 1872 o main.c: only use -C arg "as is" if it starts with '/'. 1873 18742017-03-01 Simon J. Gerraty <sjg@bad.crufty.net> 1875 1876 * Makefile (_MAKE_VERSION): 20170301 1877 Merge with NetBSD make, pick up 1878 o main.c: use -C arg "as is" rather than getcwd() 1879 if they identify the same directory. 1880 o parse.c: ensure loadfile buffer is \n terminated in non-mmap case 1881 18822017-02-01 Simon J. Gerraty <sjg@bad.crufty.net> 1883 1884 * Makefile (_MAKE_VERSION): 20170201 1885 Merge with NetBSD make, pick up 1886 o var.c: allow :_=var and avoid use of special context. 1887 18882017-01-30 Simon J. Gerraty <sjg@bad.crufty.net> 1889 1890 * Makefile (_MAKE_VERSION): 20170130 1891 Merge with NetBSD make, pick up 1892 o var.c: add :range and :_ 1893 o main.c: partially initialize Dir_* before MainParseArgs() 1894 can be called. 1895 If -V, skip Main_ExportMAKEFLAGS() 1896 18972017-01-14 Simon J. Gerraty <sjg@bad.crufty.net> 1898 1899 * Makefile (_MAKE_VERSION): 20170114 1900 Merge with NetBSD make, pick up 1901 o var.c: allow specifying the utc value used by :{gm,local}time 1902 19032016-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 1904 1905 * Makefile (_MAKE_VERSION): 20161212 1906 Merge with NetBSD make, pick up 1907 o main.c: look for obj.${MACHINE}-${MACHINE_ARCH} too. 1908 19092016-12-09 Simon J. Gerraty <sjg@bad.crufty.net> 1910 1911 * Makefile (_MAKE_VERSION): 20161209 1912 Merge with NetBSD make, pick up 1913 o main.c: cleanup setting of .OBJDIR 1914 o parse.c: avoid coredump from (var)=val 1915 19162016-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 1917 1918 * Makefile (_MAKE_VERSION): 20161126 1919 Merge with NetBSD make, pick up 1920 o make.c: Make_OODate: report src node name if path not set 1921 19222016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 1923 1924 * Makefile (_MAKE_VERSION): 20160926 1925 Merge with NetBSD make, pick up 1926 o support for .DELETE_ON_ERROR: (remove targets that fail) 1927 19282016-09-26 Simon J. Gerraty <sjg@bad.crufty.net> 1929 1930 * Makefile MAN: tweak .Dt to match ${PROG} 1931 19322016-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 1933 1934 * Makefile (_MAKE_VERSION): 20160818 1935 its a neater number; pick up whitespace fixes to man page. 1936 19372016-08-17 Simon J. Gerraty <sjg@bad.crufty.net> 1938 1939 * Makefile (_MAKE_VERSION): 20160817 1940 Merge with NetBSD make, pick up 1941 o meta.c: move handling of .MAKE.META.IGNORE_* to meta_ignore() 1942 so we can call it before adding entries to missingFiles. 1943 Thus we do not track files we have been told to ignore. 1944 19452016-08-15 Simon J. Gerraty <sjg@bad.crufty.net> 1946 1947 * Makefile (_MAKE_VERSION): 20160815 1948 Merge with NetBSD make, pick up 1949 o meta_oodate: apply .MAKE.META.IGNORE_FILTER (if defined) to 1950 pathnames, and skip if the expansion is empty. 1951 Useful for dirdeps.mk when checking DIRDEPS_CACHE. 1952 19532016-08-12 Simon J. Gerraty <sjg@bad.crufty.net> 1954 1955 * Makefile (_MAKE_VERSION): 20160812 1956 Merge with NetBSD make, pick up 1957 o meta.c: remove all missingFiles entries that match a deleted 1958 dir. 1959 o main.c: set .ERROR_CMD if possible. 1960 19612016-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 1962 1963 * Makefile (_MAKE_VERSION): 20160606 1964 Merge with NetBSD make, pick up 1965 o dir.c: extend mtimes cache to others via cached_stat() 1966 19672016-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 1968 1969 * Makefile (_MAKE_VERSION): 20160604 1970 Merge with NetBSD make, pick up 1971 o meta.c: missing filemon data is only relevant if we read a 1972 meta file. 1973 Also do not return oodate for a missing metafile if gn->path 1974 points to .CURDIR 1975 19762016-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 1977 1978 * Makefile (_MAKE_VERSION): 20160602 1979 Merge with NetBSD make, pick up 1980 o cached_realpath(): avoid hitting filesystem more than necessary. 1981 o meta.c: refactor need_meta decision, add knobs for 1982 missing meta file and filemon data wrt out-of-datedness. 1983 19842016-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 1985 1986 * Makefile (_MAKE_VERSION): 20160528 1987 1988 * boot-strap, make-bootstrap.sh.in: Makefile now uses _MAKE_VERSION 1989 19902016-05-12 Simon J. Gerraty <sjg@bad.crufty.net> 1991 1992 * Makefile (_MAKE_VERSION): 20160512 1993 Merge with NetBSD make, pick up 1994 o meta.c: ignore paths that match .MAKE.META.IGNORE_PATTERNS 1995 this is useful for gcov builds. 1996 o propagate errors from filemon(4). 1997 19982016-05-09 Simon J. Gerraty <sjg@bad.crufty.net> 1999 2000 * Makefile (_MAKE_VERSION): 20160509 2001 Merge with NetBSD make, pick up 2002 o remove use of non-standard types u_int etc. 2003 o meta.c: apply realpath() before matching against metaIgnorePaths 2004 20052016-04-04 Simon J. Gerraty <sjg@bad.crufty.net> 2006 2007 * Makefile (_MAKE_VERSION): 20160404 2008 Merge with NetBSD make, pick up 2009 o allow makefile to set .MAKE.JOBS 2010 2011 * Makefile (PROG_NAME): use ${_MAKE_VERSION} 2012 20132016-03-15 Simon J. Gerraty <sjg@bad.crufty.net> 2014 2015 * Makefile (_MAKE_VERSION): 20160315 2016 Merge with NetBSD make, pick up 2017 o fix handling of archive members 2018 20192016-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2020 2021 * Makefile (_MAKE_VERSION): rename variable to avoid interference 2022 with checks for ${MAKE_VERSION} 2023 20242016-03-10 Simon J. Gerraty <sjg@bad.crufty.net> 2025 2026 * Makefile (MAKE_VERSION): 20160310 2027 Merge with NetBSD make, pick up 2028 o meta.c: treat missing Read file same as Write, incase we Delete it. 2029 20302016-03-07 Simon J. Gerraty <sjg@bad.crufty.net> 2031 2032 * Makefile (MAKE_VERSION): 20160307 2033 Merge with NetBSD make, pick up 2034 o var.c: fix :ts\nnn to be octal by default. 2035 o meta.c: meta_finish() to cleanup memory. 2036 20372016-02-26 Simon J. Gerraty <sjg@bad.crufty.net> 2038 2039 * Makefile (MAKE_VERSION): 20160226 2040 Merge with NetBSD make, pick up 2041 o meta.c: allow meta file for makeDepend if makefiles want it. 2042 20432016-02-19 Simon J. Gerraty <sjg@bad.crufty.net> 2044 2045 * var.c: default .MAKE.SAVE_DOLLARS to FALSE 2046 for backwards compatability. 2047 2048 * Makefile (MAKE_VERSION): 20160220 2049 Merge with NetBSD make, pick up 2050 o var.c: add knob to control handling of '$$' in := 2051 20522016-02-18 Simon J. Gerraty <sjg@bad.crufty.net> 2053 2054 * Makefile (MAKE_VERSION): 20160218 2055 Merge with NetBSD make, pick up 2056 o var.c: add .export-literal allows us to fix sys.clean-env.mk 2057 post the changes to Var_Subst. 2058 Var_Subst now takes flags, and does not consume '$$' in := 2059 20602016-02-17 Simon J. Gerraty <sjg@bad.crufty.net> 2061 2062 * Makefile (MAKE_VERSION): 20160217 2063 Merge with NetBSD make, pick up 2064 o var.c: preserve '$$' in := 2065 o parse.c: add .dinclude for handling included 2066 makefile like .depend 2067 20682015-12-20 Simon J. Gerraty <sjg@bad.crufty.net> 2069 2070 * Makefile (MAKE_VERSION): 20151220 2071 Merge with NetBSD make, pick up 2072 o suff.c: re-initialize suffNull when clearing suffixes. 2073 20742015-12-01 Simon J. Gerraty <sjg@bad.crufty.net> 2075 2076 * Makefile (MAKE_VERSION): 20151201 2077 Merge with NetBSD make, pick up 2078 o cond.c: CondCvtArg: avoid access beyond end of empty buffer. 2079 o meta.c: meta_oodate: use lstat(2) for checking link target 2080 in case it is a symlink. 2081 o var.c: avoid calling brk_string and Var_Export1 with empty 2082 strings. 2083 20842015-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2085 2086 * Makefile (MAKE_VERSION): 20151126 2087 Merge with NetBSD make, pick up 2088 o parse.c: ParseTrackInput don't access beyond 2089 end of old value. 2090 20912015-10-22 Simon J. Gerraty <sjg@bad.crufty.net> 2092 2093 * Makefile (MAKE_VERSION): 20151022 2094 2095 * Add support for BSD/OS which lacks inttypes.h 2096 and really needs sys/param.h for sys/sysctl.h 2097 also 'type' is not a shell builtin. 2098 2099 * var.c: eliminate uint32_t and need for inttypes.h 2100 2101 * main.c: PrintOnError flush stdout before run .ERROR 2102 2103 * parse.c: cope with _SC_PAGESIZE not being defined. 2104 2105 21062015-10-20 Simon J. Gerraty <sjg@bad.crufty.net> 2107 2108 * Makefile (MAKE_VERSION): 20151020 2109 Merge with NetBSD make, pick up 2110 o var.c: fix uninitialized var 2111 21122015-10-12 Simon J. Gerraty <sjg@bad.crufty.net> 2113 2114 * var.c: the conditional expressions used with ':?' can be 2115 expensive, if already discarding do not evaluate or expand 2116 anything. 2117 21182015-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2119 2120 * Makefile (MAKE_VERSION): 20151010 2121 Merge with NetBSD make, pick up 2122 o Add Boolean wantit flag to Var_Subst and Var_Parse 2123 when FALSE we know we are discarding the result and can 2124 skip operations like Cmd_Exec. 2125 21262015-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2127 2128 * Makefile (MAKE_VERSION): 20151009 2129 Merge with NetBSD make, pick up 2130 o var.c: don't check for NULL before free() 2131 o meta.c: meta_oodate, do not hard code ignore of makeDependfile 2132 21332015-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2134 2135 * Makefile (MAKE_VERSION): 20150910 2136 Merge with NetBSD make, pick up 2137 o main.c: with -w print Enter/Leaving messages for objdir too 2138 if necessary. 2139 o centralize shell metachar handling 2140 2141 * FILES: add metachar.[ch] 2142 21432015-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2144 2145 * Makefile (MAKE_VERSION): 20150606 2146 Merge with NetBSD make, pick up 2147 o make.1: document .OBJDIR target 2148 21492015-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2150 2151 * Makefile (MAKE_VERSION): 20150505 2152 Merge with NetBSD make, pick up 2153 o cond.c: be strict about lhs of comparison when evaluating .if 2154 but less so when called from variable expansion. 2155 o unit-tests/cond2.mk: test various error conditions 2156 21572015-05-04 Simon J. Gerraty <sjg@bad.crufty.net> 2158 2159 * machine.sh (MACHINE): Add Bitrig 2160 patch from joerg@netbsd.org 2161 21622015-04-18 Simon J. Gerraty <sjg@bad.crufty.net> 2163 2164 * Makefile (MAKE_VERSION): 20150418 2165 Merge with NetBSD make, pick up 2166 o job.c: use memmove() rather than memcpy() 2167 2168 * unit-tests/varshell.mk: SunOS cannot handle the TERMINATED_BY_SIGNAL 2169 case, so skip it. 2170 21712015-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2172 2173 * Makefile (MAKE_VERSION): 20150411 2174 bump version - only mk/ changes. 2175 21762015-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2177 2178 * Makefile (MAKE_VERSION): 20150410 2179 Merge with NetBSD make, pick up 2180 o document different handling of '-' in jobs mode vs compat 2181 o fix jobs mode so that '-' only applies to whole job 2182 when shell lacks hasErrCtl 2183 o meta.c: use separate vars to track lcwd and latestdir (read) 2184 per process 2185 21862015-04-01 Simon J. Gerraty <sjg@bad.crufty.net> 2187 2188 * Makefile (MAKE_VERSION): 20150401 2189 Merge with NetBSD make, pick up 2190 o meta.c: close meta file in child 2191 2192 * Makefile: use BINDIR.bmake if set. 2193 Same for MANDIR and SHAREDIR 2194 Handy for testing release candidates 2195 in various environments. 2196 21972015-03-26 Simon J. Gerraty <sjg@bad.crufty.net> 2198 2199 * move initialization of savederr to block where it is used 2200 to avoid spurious warning from gcc5 2201 22022014-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2203 2204 * Makefile (MAKE_VERSION): 20141111 2205 just a cooler number 2206 22072014-11-05 Simon J. Gerraty <sjg@bad.crufty.net> 2208 2209 * Makefile (MAKE_VERSION): 20141105 2210 Merge with NetBSD make, pick up 2211 o revert major overhaul of suffix handling 2212 and POSIX compliance - too much breakage 2213 and impossible to make backwards compatible. 2214 o we still have the new unit test structure which is ok. 2215 o meta.c ensure "-- filemon" is at start of line. 2216 22172014-09-17 Simon J. Gerraty <sjg@bad.crufty.net> 2218 2219 * configure.in: test that result of getconf PATH_MAX is numeric 2220 and discard if not. Apparently needed for Hurd. 2221 22222014-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2223 2224 * Makefile (MAKE_VERSION): 20140830 2225 Merge with NetBSD make, pick up 2226 o major overhaul of suffix handling 2227 o improved POSIX compliance 2228 o overhauled unit-tests 2229 22302014-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2231 2232 * Makefile (MAKE_VERSION): 20140620 2233 Merge with NetBSD make, pick up 2234 o var.c return varNoError rather than var_Error for ::= modifiers. 2235 22362014-05-22 Simon J. Gerraty <sjg@bad.crufty.net> 2237 2238 * Makefile (MAKE_VERSION): 20140522 2239 Merge with NetBSD make, pick up 2240 o var.c detect some parse errors. 2241 22422014-04-05 Simon J. Gerraty <sjg@bad.crufty.net> 2243 2244 * Fix spelling errors - patch from Pedro Giffuni 2245 22462014-02-14 Simon J. Gerraty <sjg@bad.crufty.net> 2247 2248 * Makefile (MAKE_VERSION): 20140214 2249 Merge with NetBSD make, pick up 2250 o .INCLUDEFROM* 2251 o use Var_Value to get MAKEOBJDIR[PREFIX] 2252 o reduced realloc'ign in brk_string. 2253 * configure.in: add a check for compiler supporting __func__ 2254 22552014-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2256 2257 * boot-strap: ignore mksrc=none 2258 22592014-01-02 Simon J. Gerraty <sjg@bad.crufty.net> 2260 2261 * Makefile (DEFAULT_SYS_PATH?): use just ${prefix}/share/mk 2262 22632014-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2264 2265 * Makefile (MAKE_VERSION): 20140101 2266 * configure.in: set bmake_path_max to min(_SC_PATH_MAX,1024) 2267 * Makefile.config: defined BMAKE_PATH_MAX to bmake_path_max 2268 * make.h: use BMAKE_PATH_MAX if MAXPATHLEN not defined (needed for 2269 Hurd) 2270 * configure.in: Add AC_PREREQ and check for 2271 sysctl; patch from Andrew Shadura andrewsh at debian.org 2272 22732013-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2274 2275 * Makefile (MAKE_VERSION): 20131010 2276 * lose the const from arg to systcl to avoid problems on older BSDs. 2277 22782013-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2279 2280 * Makefile (MAKE_VERSION): 20131001 2281 Merge with NetBSD make, pick up 2282 o main.c: for NATIVE build sysctl to get MACHINE_ARCH from 2283 hw.machine_arch if necessary. 2284 o meta.c: meta_oodate - need to look at src of Link and target 2285 of Move as well. 2286 * main.c: check that CTL_HW and HW_MACHINE_ARCH exist. 2287 provide __arraycount() if needed. 2288 22892013-09-04 Simon J. Gerraty <sjg@bad.crufty.net> 2290 2291 * Makefile (MAKE_VERSION): 20130904 2292 Merge with NetBSD make, pick up 2293 o Add VAR_INTERNAL context, so that internal setting of 2294 MAKEFILE does not override value set by makefiles. 2295 22962013-09-02 Simon J. Gerraty <sjg@bad.crufty.net> 2297 2298 * Makefile (MAKE_VERSION): 20130902 2299 Merge with NetBSD make, pick up 2300 o CompatRunCommand: only apply shellErrFlag when errCheck is true 2301 23022013-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2303 2304 * Makefile (MAKE_VERSION): 20130828 2305 Merge with NetBSD make, pick up 2306 o Fix VAR :sh = syntax from Will Andrews at freebsd.org 2307 o Call Job_SetPrefix() from Job_Init() so makefiles have 2308 opportunity to set .MAKE.JOB.PREFIX 2309 23102013-07-30 Simon J. Gerraty <sjg@bad.crufty.net> 2311 2312 * Makefile (MAKE_VERSION): 20130730 2313 Merge with NetBSD make, pick up 2314 o Allow suppression of --- job -- tokens by setting 2315 .MAKE.JOB.PREFIX empty. 2316 23172013-07-16 Simon J. Gerraty <sjg@bad.crufty.net> 2318 2319 * Makefile (MAKE_VERSION): 20130716 2320 Merge with NetBSD make, pick up 2321 o number of gmake compatibility tweaks 2322 -w for gmake style entering/leaving messages 2323 if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. 2324 handle MAKEFLAGS containing only letters. 2325 o when overriding a GLOBAL variable on the command line, 2326 delete it from GLOBAL context so -V doesn't show the wrong 2327 value. 2328 23292013-07-06 Simon J. Gerraty <sjg@bad.crufty.net> 2330 2331 * configure.in: We don't need MAKE_LEVEL_SAFE anymore. 2332 2333 * Makefile (MAKE_VERSION): 20130706 2334 Merge with NetBSD make, pick up 2335 o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is 2336 true so that CompatRunCommand() can use it, to ensure 2337 consistent behavior with jobs mode. 2338 o use MAKE_LEVEL_ENV to define the variable to propagate 2339 .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). 2340 o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of 2341 paths to ignore. 2342 23432013-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2344 2345 * Makefile (MAKE_VERSION): 20130604 2346 Merge with NetBSD make, pick up 2347 o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's 2348 to avoid leaking descriptors. 2349 23502013-05-28 Simon J. Gerraty <sjg@bad.crufty.net> 2351 2352 * Makefile (MAKE_VERSION): 20130528 2353 Merge with NetBSD make, pick up 2354 o var.c: cleanup some left-overs in VarHash() 2355 23562013-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2357 2358 * Makefile (MAKE_VERSION): 20130520 2359 generate manifest from component FILES rather than have to 2360 update FILES when mk/FILES changes. 2361 23622013-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2363 2364 * Makefile (MAKE_VERSION): 20130518 2365 Merge with NetBSD make, pick up 2366 o suff.c: don't skip all processsing for .PHONY targets 2367 else wildcard srcs do not get expanded. 2368 o var.c: expand name of variable to delete if necessary. 2369 23702013-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2371 2372 * Makefile (MAKE_VERSION): 20130330 2373 Merge with NetBSD make, pick up 2374 o meta.c: refine the handling of .OODATE in commands. 2375 Rather than suppress command comparison for the entire script 2376 as though .NOMETA_CMP had been used, only suppress it for the 2377 one command line. 2378 This allows something like ${.OODATE:M.NOMETA_CMP} to be used to 2379 suppress comparison of a command without otherwise affecting it. 2380 o make.1: document that 2381 23822013-03-22 Simon J. Gerraty <sjg@bad.crufty.net> 2383 2384 * Makefile (MAKE_VERSION): 20130321 2385 yes, not quite right but its a cooler number. 2386 Merge with NetBSD make, pick up 2387 o parse.c: fix ParseGmakeExport to be portable 2388 and add a unit-test. 2389 * meta.c: call meta_init() before makefiles are read and if built 2390 with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON 2391 this let's makefiles test for support. 2392 Call meta_mode_init() to process .MAKE.MODE. 2393 23942013-03-13 Simon J. Gerraty <sjg@bad.crufty.net> 2395 2396 * Makefile (MAKE_VERSION): 20130305 2397 Merge with NetBSD make, pick up 2398 o run .STALE: target when a dependency from .depend is missing. 2399 o job.c: add Job_RunTarget() for the above and .BEGIN 2400 24012013-03-03 Simon J. Gerraty <sjg@bad.crufty.net> 2402 2403 * Makefile (MAKE_VERSION): 20130303 2404 Merge with NetBSD make, pick up 2405 o main.c: set .MAKE.OS to utsname.sysname 2406 o job.c: more checks for read and poll errors 2407 o var.c: lose VarChangeCase() saves 4% time 2408 24092013-03-02 Simon J. Gerraty <sjg@bad.crufty.net> 2410 2411 * boot-strap: remove MAKEOBJDIRPREFIX from environment since we 2412 want to use MAKEOBJDIR 2413 24142013-01-27 Simon J. Gerraty <sjg@bad.crufty.net> 2415 2416 * Merge with NetBSD make, pick up 2417 o make.1: more info on how shell commands are handled. 2418 o job.c,main.c: detect write errors to job pipes. 2419 24202013-01-25 Simon J. Gerraty <sjg@bad.crufty.net> 2421 2422 * Makefile (MAKE_VERSION): 20130123 2423 Merge with NetBSD make, pick up 2424 o meta.c: if script uses .OODATE and meta_oodate() decides 2425 rebuild is needed, .OODATE will be empty - set it to .ALLSRC. 2426 o var.c: in debug output indicate which variabale modifiers 2427 apply to. 2428 o remove Check_Cwd logic the makefiles have been fixed. 2429 24302012-12-12 Simon J. Gerraty <sjg@bad.crufty.net> 2431 2432 * makefile.in: add a simple makefile for folk who insist on 2433 ./configure; make; make install 2434 it just runs boot-strap 2435 * include mk/* to accommodate the above 2436 * boot-strap: re-work to accommodate the above 2437 mksrc defaults to $Mydir/mk 2438 allow op={configure,build,install,clean,all} 2439 add options to facilitate install 2440 * Makefile.config.in: just the bits set by configure 2441 * Makefile: bump version to 20121212 2442 abandon Makefile.in (NetBSD Makefile) 2443 leverage mk/* instead 2444 * configure.in: ensure srcdir is absolute 2445 24462012-11-11 Simon J. Gerraty <sjg@bad.crufty.net> 2447 2448 * Makefile.in (MAKE_VERSION): 20121111 2449 fix generation of bmake.cat1 2450 24512012-11-09 Simon J. Gerraty <sjg@bad.crufty.net> 2452 2453 * Makefile.in (MAKE_VERSION): 20121109 2454 Merge with NetBSD make, pick up 2455 o make.c: MakeBuildChild: return 0 so search continues if a 2456 .ORDER dependency is detected. 2457 o unit-tests/order: test the above 2458 24592012-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 2460 2461 * Makefile.in (MAKE_VERSION): 20121102 2462 Merge with NetBSD make, pick up 2463 o cond.c: allow cond_state[] to grow. 2464 In meta mode with a very large tree, we can hit the limit 2465 while processing dirdeps. 2466 24672012-10-25 Simon J. Gerraty <sjg@bad.crufty.net> 2468 2469 * Makefile.in: we need to use ${srcdir} not ${.CURDIR} 2470 24712012-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2472 2473 * Makefile.in (MAKE_VERSION): 20121010 2474 o protect syntax that only bmake parses correctly. 2475 o remove auto setting of FORCE_MACHINE, use configure's 2476 --with-force-machine=whatever if that is desired. 2477 24782012-10-08 Simon J. Gerraty <sjg@bad.crufty.net> 2479 2480 * Makefile.in: do not lose history from make.1 when generating bmake.1 2481 24822012-10-07 Simon J. Gerraty <sjg@bad.crufty.net> 2483 2484 * Makefile.in (MAKE_VERSION): 20121007 2485 Merge with NetBSD make, pick up 2486 o compat.c: ignore empty commands - same as jobs mode. 2487 o make.1: document meta chars that cause use of shell 2488 24892012-09-11 Simon J. Gerraty <sjg@bad.crufty.net> 2490 2491 * Makefile.in (MAKE_VERSION): bump version to 20120911 2492 * bsd.after-import.mk: include Makefile.inc early and allow it to 2493 override PROG 2494 24952012-08-31 Simon J. Gerraty <sjg@bad.crufty.net> 2496 2497 * Makefile.in (MAKE_VERSION): bump version to 20120831 2498 Merge with NetBSD make, pick up 2499 o cast sizeof() to int for comparison 2500 o minor make.1 tweak 2501 25022012-08-30 Simon J. Gerraty <sjg@bad.crufty.net> 2503 2504 * Makefile.in (MAKE_VERSION): bump version to 20120830 2505 Merge with NetBSD make, pick up 2506 o .MAKE.EXPAND_VARIABLES knob can control default behavior of -V 2507 o debug flag -dV causes -V to show raw value regardless. 2508 25092012-07-05 Simon J. Gerraty <sjg@bad.crufty.net> 2510 2511 * bsd.after-import.mk (after-import): ensure unit-tests/Makefile 2512 gets SRCTOP set. 2513 25142012-07-04 Simon J. Gerraty <sjg@bad.crufty.net> 2515 2516 * Makefile.in (MAKE_VERSION): bump version to 20120704 2517 Merge with NetBSD make, pick up 2518 o Job_ParseShell should call Shell_Init if it has been 2519 previously called. 2520 * Makefile.in: set USE_META based on configure result. 2521 also .PARSEDIR is safer indicator of bmake. 2522 25232012-06-26 Simon J. Gerraty <sjg@bad.crufty.net> 2524 2525 * Makefile.in: bump version to 20120626 2526 ensure CPPFLAGS is in CFLAGS 2527 * meta.c: avoid nested externs 2528 * bsd.after-import.mk: avoid ${.CURDIR}/Makefile as target 2529 25302012-06-20 Simon J. Gerraty <sjg@bad.crufty.net> 2531 2532 * Makefile.in (MAKE_VERSION): bump version to 20120620 2533 Merge with NetBSD make, pick up 2534 o make_malloc.c: avoid including make_malloc.h again 2535 2536 * Makefile.in: avoid bmake only syntax or protect with 2537 .if defined(.MAKE.LEVEL) 2538 * bsd.after-import.mk: replace .-include with .sinclude 2539 ensure? SRCTOP gets a value 2540 * configure.in: look for filemon.h in /usr/include/dev/filemon first. 2541 25422012-06-19 Simon J. Gerraty <sjg@bad.crufty.net> 2543 2544 * Makefile.in (MAKE_VERSION): bump version to 20120612 2545 Merge with NetBSD make, pick up 2546 o use MAKE_ATTR_* rather than those defined by cdefs.h or compiler 2547 for greater portability. 2548 o unit-tests/forloop: check that .for works as expected wrt 2549 number of times and with "quoted strings". 2550 25512012-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2552 2553 * Makefile.in (MAKE_VERSION): bump version to 20120606 2554 Merge with NetBSD make, pick up 2555 o compat.c: use kill(2) rather than raise(3). 2556 * configure.in: look for sys/dev/filemon 2557 * bsd.after-import.mk: add a .-include "Makefile.inc" to Makefile 2558 and pass BOOTSTRAP_XTRAS to boot-strap. 2559 25602012-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2561 2562 * Makefile.in (MAKE_VERSION): bump version to 20120604 2563 Merge with NetBSD make, pick up 2564 o util.c and var.c share same var for tracking if environ 2565 has been reallocated. 2566 o util.c provide getenv with setenv. 2567 * Add MAKE_LEVEL_SAFE as an alternate means of passing MAKE_LEVEL 2568 when the shell actively strips .MAKE.* from the environment. 2569 We still refer to the variable always as .MAKE.LEVEL 2570 * util.c fix bug in findenv() was finding prefix of name. 2571 * compat.c: re-raising SIGINT etc after running .INTERRUPT 2572 results in more reliable termination of all activity on many 2573 platforms. 2574 25752012-06-02 Simon J. Gerraty <sjg@bad.crufty.net> 2576 2577 * Makefile.in (MAKE_VERSION): bump version to 20120602 2578 Merge with NetBSD make, pick up 2579 o for.c: handle quoted items in .for list 2580 25812012-05-30 Simon J. Gerraty <sjg@bad.crufty.net> 2582 2583 * Makefile.in (MAKE_VERSION): bump version to 20120530 2584 Merge with NetBSD make, pick up 2585 o compat.c: ignore empty command. 2586 25872012-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 2588 2589 * Makefile.in (MAKE_VERSION): bump version to 20120524 2590 * FILES: add bsd.after-import.mk: 2591 A simple means of integrating bmake into a BSD build system. 2592 25932012-05-20 Simon J. Gerraty <sjg@bad.crufty.net> 2594 2595 * Makefile.in (MAKE_VERSION): bump version to 20120520 2596 Merge with NetBSD make, pick up 2597 o increased limit for nested conditionals. 2598 25992012-05-18 Simon J. Gerraty <sjg@bad.crufty.net> 2600 2601 * Makefile.in (MAKE_VERSION): bump version to 20120518 2602 Merge with NetBSD make, pick up 2603 o use _exit(2) in signal hanlder 2604 o Don't use the [dir] cache when building nodes that might have 2605 changed since the last exec. 2606 o Avoid nested extern declaration warnings. 2607 26082012-04-27 Simon J. Gerraty <sjg@bad.crufty.net> 2609 2610 * meta.c (fgetLine): avoid %z - not portable. 2611 * parse.c: Since we moved include of sys/mman.h 2612 and def's of MAP_COPY etc. we got dups from a merge. 2613 26142012-04-24 Simon J. Gerraty <sjg@bad.crufty.net> 2615 2616 * Makefile.in (MAKE_VERSION): bump version to 20120420 2617 Merge with NetBSD make, pick up 2618 o restore duplicate supression in .MAKE.MAKEFILES 2619 runtime saving can be significant. 2620 o Var_Subst() uses Buf_DestroyCompact() to reduce memory 2621 consumption up to 20%. 2622 26232012-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2624 2625 * Makefile.in (MAKE_VERSION): bump version to 20120420 2626 Merge with NetBSD make, pick up 2627 o remove duplicate supression in .MAKE.MAKEFILES 2628 o improved dir cache behavior 2629 o gmake'ish export command 2630 26312012-03-25 Simon J. Gerraty <sjg@bad.crufty.net> 2632 2633 * Makefile.in (MAKE_VERSION): bump version to 20120325 2634 Merge with NetBSD make, pick up 2635 o fix parsing of :[#] in conditionals. 2636 26372012-02-10 Simon J. Gerraty <sjg@bad.crufty.net> 2638 2639 * Makefile.in: replace use of .Nx in bmake.1 with NetBSD 2640 since some systems cannot cope with .Nx <version> 2641 26422011-11-14 Simon J. Gerraty <sjg@bad.crufty.net> 2643 2644 * Makefile.in (MAKE_VERSION): bump version to 20111111 2645 Merge with NetBSD make, pick up 2646 o debug output for .PARSEDIR and .PARSEFILE 2647 26482011-10-10 Simon J. Gerraty <sjg@bad.crufty.net> 2649 2650 * Makefile.in (MAKE_VERSION): bump version to 20111010 2651 26522011-10-09 Simon J. Gerraty <sjg@bad.crufty.net> 2653 2654 * boot-strap: check for an expected file in the dirs we look for. 2655 * make-bootstrap.sh: pass on LDSTATIC 2656 26572011-10-01 Simon J. Gerraty <sjg@bad.crufty.net> 2658 2659 * Makefile.in (MAKE_VERSION): bump version to 20111001 2660 Merge with NetBSD make, pick up 2661 o ensure .PREFIX is set for .PHONY 2662 and .TARGET set for .PHONY run via .END 2663 o __dead used consistently 2664 26652011-09-10 Simon J. Gerraty <sjg@bad.crufty.net> 2666 2667 * Makefile.in (MAKE_VERSION): 20110909 is a better number ;-) 2668 26692011-09-05 Simon J. Gerraty <sjg@bad.crufty.net> 2670 2671 * Makefile.in (MAKE_VERSION): bump version to 20110905 2672 Merge with NetBSD make, pick up 2673 o meta_oodate: ignore makeDependfile 2674 26752011-08-28 Simon J. Gerraty <sjg@bad.crufty.net> 2676 2677 * Makefile.in (MAKE_VERSION): bump version to 20110828 2678 Merge with NetBSD make, pick up 2679 o silent=yes in .MAKE.MODE causes meta mode to mark targets 2680 as SILENT if a .meta file is created 2681 26822011-08-18 Simon J. Gerraty <sjg@bad.crufty.net> 2683 2684 * Makefile.in (MAKE_VERSION): bump version to 20110818 2685 Merge with NetBSD make, pick up 2686 o in meta mode, if target flagged .META a missing .meta file 2687 means target is out-of-date 2688 o fixes for gcc 4.5 warnings 2689 o simplify job printing code 2690 26912011-08-09 Simon J. Gerraty <sjg@bad.crufty.net> 2692 2693 * Makefile.in (MAKE_VERSION): bump version to 20110808 2694 Merge with NetBSD make, pick up 2695 o do not touch OP_SPECIAL targets when doing make -t 2696 26972011-06-22 Simon J. Gerraty <sjg@bad.crufty.net> 2698 2699 * Makefile.in (MAKE_VERSION): bump version to 20110622 2700 Merge with NetBSD make, pick up 2701 o meta_oodate detect corrupted .meta file and declare oodate. 2702 * configure.in: add check for setsid 2703 27042011-06-07 Simon J. Gerraty <sjg@bad.crufty.net> 2705 2706 * Merge with NetBSD make, pick up 2707 o unit-tests/modts now works on MirBSD 2708 27092011-06-04 Simon J. Gerraty <sjg@bad.crufty.net> 2710 2711 * Makefile.in (MAKE_VERSION): bump version to 20110606 2712 Merge with NetBSD make, pick up 2713 o ApplyModifiers: when we parse a variable which is not 2714 the entire modifier string, or not followed by ':', do not 2715 consider it as containing modifiers. 2716 o loadfile: ensure newline at end of mapped file. 2717 27182011-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2719 2720 * Makefile.in (MAKE_VERSION): bump version to 20110505 2721 Merge with NetBSD make, pick up 2722 o .MAKE.META.BAILIWICK - list of prefixes which define the scope 2723 of make's control. In meta mode, any generated file within 2724 said bailiwick, which is found to be missing, causes current 2725 target to be out-of-date. 2726 27272011-04-11 Simon J. Gerraty <sjg@bad.crufty.net> 2728 2729 * Makefile.in (MAKE_VERSION): bump version to 20110411 2730 Merge with NetBSD make, pick up 2731 o when long modifiers fail to match, check sysV style. 2732 - add a test case 2733 27342011-04-10 Simon J. Gerraty <sjg@bad.crufty.net> 2735 2736 * Makefile.in (MAKE_VERSION): bump version to 20110410 2737 Merge with NetBSD make, pick up 2738 o :hash - cheap 32bit hash of value 2739 o :localtime, :gmtime - use value as format string for strftime. 2740 27412011-03-30 Simon J. Gerraty <sjg@bad.crufty.net> 2742 2743 * Makefile.in (MAKE_VERSION): bump version to 20110330 2744 mostly because its a cooler version. 2745 Merge with NetBSD make, pick up 2746 o NetBSD tags for meta.[ch] 2747 o job.c call meta_job_finish() after meta_job_error(). 2748 o meta_job_error() should call meta_job_finish() to ensure 2749 .meta file is closed, and safe to copy - if .ERROR target wants. 2750 meta_job_finish() is safe to call repeatedly. 2751 27522011-03-29 Simon J. Gerraty <sjg@bad.crufty.net> 2753 2754 * unit-tests/modts: use printf if it is a builtin, 2755 to save us from MirBSD 2756 2757 * Makefile.in (MAKE_VERSION): bump version to 20110329 2758 Merge with NetBSD make, pick up 2759 o fix for use after free() in CondDoExists(). 2760 o meta_oodate() report extra commands and return earlier. 2761 27622011-03-27 Simon J. Gerraty <sjg@bad.crufty.net> 2763 2764 * Makefile.in (MAKE_VERSION): bump version to 20110327 2765 Merge with NetBSD make, pick up 2766 o meta.c, if .MAKE.MODE contains curdirOk=yes 2767 allow creating .meta files in .CURDIR 2768 * boot-strap (TOOL_DIFF): aparently at least on linux distro 2769 formats the output of 'type' differently - so eat any "()" 2770 27712011-03-06 Simon J. Gerraty <sjg@bad.crufty.net> 2772 2773 * Makefile.in (MAKE_VERSION): bump version to 20110306 2774 Merge with NetBSD make, pick up 2775 o meta.c, only do getcwd() once 2776 27772011-03-05 Simon J. Gerraty <sjg@bad.crufty.net> 2778 2779 * Makefile.in (MAKE_VERSION): bump version to 20110305 2780 Merge with NetBSD make, pick up 2781 o correct sysV substitution handling of empty lhs and variable 2782 o correct exists() check for dir with trailing / 2783 o correct handling of modifiers for non-existant variables 2784 during evaluation of conditionals. 2785 o ensure MAP_FILE is defined. 2786 o meta.c use curdir[] now exported by main.c 2787 27882011-02-25 Simon J. Gerraty <sjg@bad.crufty.net> 2789 2790 * Makefile.in (MAKE_VERSION): bump version to 20110225 2791 Merge with NetBSD make, pick up 2792 o fix for incorrect .PARSEDIR when .OBJDIR is re-computed after 2793 makefiles have been read. 2794 o fix example of :? modifier in man page. 2795 27962011-02-13 Simon J. Gerraty <sjg@bad.crufty.net> 2797 2798 * Makefile.in (MAKE_VERSION): bump version to 20110214 2799 Merge with NetBSD make, pick up 2800 o meta.c handle realpath() failing when generating meta file 2801 name. 2802 2803 * sigcompat.c: convert to ansi so we can use higher warning levels. 2804 2805 28062011-02-07 Simon J. Gerraty <sjg@bad.crufty.net> 2807 2808 * Makefile.in (MAKE_VERSION): bump version to 20110207 2809 Merge with NetBSD make, pick up 2810 o fix for bug in meta mode. 2811 28122011-01-03 Simon J. Gerraty <sjg@bad.crufty.net> 2813 2814 * parse.c: SunOS 5.8 at least does not have MAP_FILE 2815 28162011-01-01 Simon J. Gerraty <sjg@bad.crufty.net> 2817 2818 * Makefile.in (MAKE_VERSION): bump version to 20110101 2819 Merge with NetBSD make, pick up 2820 o use mmap(2) if available, for reading makefiles 2821 28222010-12-15 Simon J. Gerraty <sjg@bad.crufty.net> 2823 2824 * Makefile.in (MAKE_VERSION): bump version to 20101215 2825 Merge with NetBSD make, pick up 2826 o ensure meta_job_error() does not report a previous .meta file 2827 as being culprit. 2828 28292010-12-10 Simon J. Gerraty <sjg@bad.crufty.net> 2830 2831 * Makefile.in (MAKE_VERSION): bump version to 20101210 2832 Merge with NetBSD make, pick up 2833 o meta_oodate: track cwd per process, and only consider target 2834 out-of-date if missing file is outside make's CWD. 2835 Ignore files in /tmp/ etc. 2836 o to ensure unit-tests results match, need to control LC_ALL 2837 as well as LANG. 2838 o fix for parsing bug in var.c 2839 28402010-11-26 Simon J. Gerraty <sjg@bad.crufty.net> 2841 2842 * Makefile.in (MAKE_VERSION): bump version to 20101126 2843 Merge with NetBSD make, pick up 2844 o if stale dependency is an IMPSRC, search via .PATH 2845 o meta_oodate: if a referenced file is missing, target is 2846 out-of-date. 2847 o meta_oodate: if a target uses .OODATE in its commands, 2848 it (.OODATE) needs to be recomputed. 2849 o keep a pointer to youngest child node, rather than just its 2850 mtime. 2851 28522010-11-02 Simon J. Gerraty <sjg@bad.crufty.net> 2853 2854 * Makefile.in (MAKE_VERSION): bump version to 20101101 2855 28562010-10-16 Simon J. Gerraty <sjg@bad.crufty.net> 2857 2858 * machine.sh: like os.sh, 2859 allow for uname -p producing useless drivel 2860 28612010-09-13 Simon J. Gerraty <sjg@bad.crufty.net> 2862 2863 * boot-strap: document configure knobs for meta and filemon. 2864 2865 * Makefile.in (MAKE_VERSION): bump version to 20100911 2866 Merge with NetBSD make, pick up 2867 o meta.c - meta mode 2868 2869 * make-bootstrap.sh.in: handle meta.c 2870 * configure.in: add knobs for use_meta and filemon_h 2871 also, look for dirname, str[e]sep and strlcpy 2872 * util.c: add simple err[x] and warn[x] 2873 28742010-08-08 Simon J. Gerraty <sjg@bad.crufty.net> 2875 2876 * boot-strap (TOOL_DIFF): set this to ensure tests use 2877 the same version of diff that configure tested 2878 2879 * Makefile.in (MAKE_VERSION): bump version to 20100808 2880 Merge with NetBSD make, pick up 2881 o in jobs mode, when we discover we cannot make something, 2882 call PrintOnError before exit. 2883 28842010-08-06 Simon J. Gerraty <sjg@bad.crufty.net> 2885 2886 * Makefile.in (MAKE_VERSION): bump version to 20100806 2887 Merge with NetBSD make, pick up 2888 o formatting fixes for ignored errors 2889 o ensure jobs are cleaned up regardless of where wait() was called. 2890 28912010-06-28 Simon J. Gerraty <sjg@bad.crufty.net> 2892 2893 * Makefile.in (MAKE_VERSION): bump version to 20100618 2894 * os.sh (MACHINE_ARCH): watch out for drivel from uname -p 2895 28962010-06-16 Simon J. Gerraty <sjg@bad.crufty.net> 2897 2898 * Makefile.in (MAKE_VERSION): bump version to 20100616 2899 Merge with NetBSD make, pick up 2900 o man page update 2901 o call PrintOnError from JobFinish when we detect an error we 2902 are not ignoring. 2903 29042010-06-06 Simon J. Gerraty <sjg@bad.crufty.net> 2905 2906 * Makefile.in (MAKE_VERSION): bump version to 20100606 2907 Merge with NetBSD make, pick up 2908 o man page update 2909 29102010-06-05 Simon J. Gerraty <sjg@bad.crufty.net> 2911 2912 * Makefile.in (MAKE_VERSION): bump version to 20100605 2913 Merge with NetBSD make, pick up 2914 o use bmake_signal() which is a wrapper around sigaction() 2915 in place of signal() 2916 o add .export-env to allow exporting variables to environment 2917 without tracking (so no re-export when the internal value is 2918 changed). 2919 29202010-05-24 Simon J. Gerraty <sjg@bad.crufty.net> 2921 2922 * Makefile.in (MAKE_VERSION): bump version to 20100524 2923 Merge with NetBSD make, pick up 2924 o fix for .info et al being greedy. 2925 29262010-05-23 Simon J. Gerraty <sjg@bad.crufty.net> 2927 2928 * Makefile.in (MAKE_VERSION): bump version to 20100520 2929 Merge with NetBSD make, pick up 2930 o back to using realpath on argv[0] 2931 but only if contains '/' and does not start with '/'. 2932 29332010-05-10 Simon J. Gerraty <sjg@bad.crufty.net> 2934 2935 * boot-strap: use absolute path for bmake when running tests. 2936 2937 * Makefile.in (MAKE_VERSION): bump version to 20100510 2938 Merge with NetBSD make, pick up 2939 o revert use of realpath on argv[0] 2940 too many corner cases. 2941 o print MAKE_PRINT_VAR_ON_ERROR before running .ERROR target. 2942 29432010-05-05 Simon J. Gerraty <sjg@bad.crufty.net> 2944 2945 * Makefile.in (MAKE_VERSION): bump version to 20100505 2946 Merge with NetBSD make, pick up 2947 o fix for missed SIGCHLD when compiled with SunPRO 2948 actually for bmake, defining FORCE_POSIX_SIGNALS would have 2949 done the job. 2950 29512010-04-30 Simon J. Gerraty <sjg@bad.crufty.net> 2952 2953 * Makefile.in (MAKE_VERSION): bump version to 20100430 2954 Merge with NetBSD make, pick up 2955 o fflush stdout before writing to stdout 2956 29572010-04-23 Simon J. Gerraty <sjg@bad.crufty.net> 2958 2959 * Makefile.in (MAKE_VERSION): bump version to 20100423 2960 Merge with NetBSD make, pick up 2961 o updated unit tests for Haiku (this time for sure). 2962 * boot-strap: based on patch from joerg 2963 honor --with-default-sys-path better. 2964 * boot-strap: remove mention of --with-prefix-sys-path 2965 29662010-04-22 Simon J. Gerraty <sjg@bad.crufty.net> 2967 2968 * Makefile.in (MAKE_VERSION): bump version to 20100422 2969 * Merge with NetBSD make, pick up 2970 o fix for vfork() on Darwin. 2971 o fix for bogus $TMPDIR. 2972 o set .MAKE.MODE=compat for -B 2973 o set .MAKE.JOBS=max_jobs for -j max_jobs 2974 o allow unit-tests to run without any *.mk 2975 o unit-tests/modmisc be more conservative in dirs presumed to exist. 2976 * boot-strap: ignore /usr/share/mk except on NetBSD. 2977 * unit-tests/Makefile.in: set LANG=C when running unit-tests to 2978 ensure sort(1) behaves as expected. 2979 29802010-04-21 Simon J. Gerraty <sjg@bad.crufty.net> 2981 2982 * boot-strap: add FindHereOrAbove so we can use -m .../mk 2983 29842010-04-20 Simon J. Gerraty <sjg@bad.crufty.net> 2985 2986 * Makefile.in (MAKE_VERSION): bump version to 20100420 2987 * Merge with NetBSD make, pick up 2988 o fix for variable realpath() behavior. 2989 we have to stat(2) the result to be sure. 2990 o fix for .export (all) when nested vars use :sh 2991 29922010-04-14 Simon J. Gerraty <sjg@bad.crufty.net> 2993 2994 * Makefile.in (MAKE_VERSION): bump version to 20100414 2995 * Merge with NetBSD make, pick up 2996 o use realpath to resolve argv[0] (for .MAKE) if needed. 2997 o add realpath from libc. 2998 o add :tA to resolve variable via realpath(3) if possible. 2999 30002010-04-08 Simon J. Gerraty <sjg@bad.crufty.net> 3001 3002 * Makefile.in (MAKE_VERSION): bump version to 20100408 3003 * Merge with NetBSD make, pick up 3004 o unit tests for .ERROR, .error 3005 o fix for .ERROR to ensure it cannot be default target. 3006 30072010-04-06 Simon J. Gerraty <sjg@bad.crufty.net> 3008 3009 * Makefile.in (MAKE_VERSION): bump version to 20100406 3010 * Merge with NetBSD make, pick up 3011 o fix for compat mode "Error code" going to debug_file. 3012 o fix for .ALLSRC being populated twice. 3013 o support for .info, .warning and .error directives 3014 o .MAKE.MODE to control make's operational mode 3015 o .MAKE.MAKEFILE_PREFERENCE to control the preferred makefile 3016 name(s). 3017 o .MAKE.DEPENDFILE to control the name of the depend file 3018 o .ERROR target - run on failure. 3019 30202010-03-18 Simon J. Gerraty <sjg@bad.crufty.net> 3021 3022 * make-bootstrap.sh.in: extract MAKE_VERSION from Makefile 3023 3024 * os.sh,arch.c: patch for Haiku from joerg at netbsd 3025 30262010-03-17 Simon J. Gerraty <sjg@bad.crufty.net> 3027 3028 * Makefile.in (MAKE_VERSION): bump version to 20100222 3029 * Merge with NetBSD make, pick up 3030 o better error msg for .for with mutiple inter vars 3031 3032 * boot-strap: 3033 o use make-bootstrap.sh from joerg at netbsd 3034 to avoid the need for a native make when bootstrapping. 3035 o add "" everywhere ;-) 3036 o if /usr/share/tmac/andoc.tmac exists install nroff bmake.1 3037 otherwise the pre-formated version. 3038 30392010-01-04 Simon J. Gerraty <sjg@bad.crufty.net> 3040 3041 * Makefile.in (MAKE_VERSION): bump version to 20100102 3042 * Merge with NetBSD make, pick up: 3043 o fix for -m .../ 3044 30452009-11-18 Simon J. Gerraty <sjg@void.crufty.net> 3046 3047 * Makefile.in (MAKE_VERSION): bump version to 20091118 3048 * Merge with NetBSD make, pick up: 3049 o .unexport 3050 o report lines that start with '.' and should have ':' 3051 (catch typo's of .el*if). 3052 30532009-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3054 3055 * configure.in: Ensure that srcdir and mksrc are absolute paths. 3056 30572009-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3058 3059 * Makefile.in (MAKE_VERSION): fix version to 20091007 3060 30612009-10-07 Simon J. Gerraty <sjg@void.crufty.net> 3062 3063 * Makefile.in (MAKE_VERSION): bump version to 200910007 3064 * Merge with NetBSD make, pick up: 3065 o fix for parsing of :S;...;...; applied to .for loop iterator 3066 appearing in a dependency line. 3067 30682009-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3069 3070 * Makefile.in (MAKE_VERSION): bump version to 20090909 3071 * Merge with NetBSD make, pick up: 3072 o fix for -C, .CURDIR and .OBJDIR 3073 * boot-strap: 3074 o allow share_dir to be set independent of prefix. 3075 o select default share_dir better when prefix ends in $HOST_TARGET 3076 o if FORCE_BSD_MK etc were set, include them in the suggested 3077 install-mk command. 3078 30792009-09-08 Simon J. Gerraty <sjg@void.crufty.net> 3080 3081 * Makefile.in (MAKE_VERSION): bump version to 20090908 3082 * Merge with NetBSD make, pick up: 3083 o .MAKE.LEVEL for recursion tracking 3084 o fix for :M scanning \: 3085 30862009-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3087 3088 * configure.in: Don't -D__EXTENSIONS__ if 3089 AC_USE_SYSTEM_EXTENSIONS says "no". 3090 30912009-08-26 Simon J. Gerraty <sjg@void.crufty.net> 3092 3093 * Makefile.in (MAKE_VERSION): bump version to 20090826 3094 Simplify MAKE_VERSION to just the bare date. 3095 * Merge with NetBSD make, pick up: 3096 o -C directory support. 3097 o support for SIGINFO 3098 o use $TMPDIR for temp files. 3099 o child of vfork should be careful about modifying parent's state. 3100 3101 31022009-03-26 Simon J. Gerraty <sjg@void.crufty.net> 3103 3104 * Appy some patches for MiNT from David Brownlee 3105 31062009-02-26 Simon J. Gerraty <sjg@void.crufty.net> 3107 3108 * Makefile.in (BMAKE_VERSION): bump version to 20090222 3109 * Merge with NetBSD make, pick up: 3110 o Possible null pointer de-ref in Var_Set. 3111 31122009-02-08 Simon J. Gerraty <sjg@void.crufty.net> 3113 3114 * Makefile.in (BMAKE_VERSION): bump version to 20090204 3115 * Merge with NetBSD make, pick up: 3116 o bmake_malloc et al moved to their own .c 3117 o Count both () and {} when looking for the end of a :M pattern 3118 o Change 'Buffer' so that it is the actual struct, not a pointer to it. 3119 o strlist.c - functions for processing extendable arrays of pointers to strings. 3120 o ClientData replaced with void *, so const void * can be used. 3121 o New debug flag C for DEBUG_CWD 3122 31232008-11-11 Simon J. Gerraty <sjg@void.crufty.net> 3124 3125 * Makefile.in (BMAKE_VERSION): bump version to 20081111 3126 Apply patch from Joerg Sonnenberge to 3127 configure.in: 3128 o remove some redundant checks 3129 o check for emlloc etc only in libutil and require the whole family. 3130 util.c: 3131 o remove [v]asprintf which is no longer used. 3132 31332008-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3134 3135 * Makefile.in (BMAKE_VERSION): bump version to 20081101 3136 * Merge with NetBSD make, pick up: 3137 o util.c: avoid use of putenv() - christos 3138 31392008-10-30 Simon J. Gerraty <sjg@void.crufty.net> 3140 3141 * Makefile.in (BMAKE_VERSION): bump version to 20081030 3142 pick up man page tweaks. 3143 31442008-10-29 Simon J. Gerraty <sjg@void.crufty.net> 3145 3146 * Makefile.in: move processing of LIBOBJS to after is definition! 3147 thus we'll have getenv.c in SRCS only if needed. 3148 3149 * make.1: add examples of how to use :? 3150 3151 * Makefile.in (BMAKE_VERSION): bump version to 20081029 3152 * Merge with NetBSD make, pick up: 3153 o fix for .END processing with -j 3154 o segfault from Parse_Error when no makefile is open 3155 o handle numeric expressions in any variable expansion 3156 o debug output now defaults to stderr, -dF to change it - apb 3157 o make now uses bmake_malloc etc so that it can build natively 3158 on A/UX - wasn't an issue for bmake, but we want to keep in sync. 3159 31602008-09-27 Simon J. Gerraty <sjg@void.crufty.net> 3161 3162 * Makefile.in (BMAKE_VERSION): bump version to 20080808 3163 * Merge with NetBSD make, pick up: 3164 o fix for PR/38840: Pierre Pronchery: make crashes while parsing 3165 long lines in Makefiles 3166 o optimizations for VarQuote by joerg 3167 o fix for PR/38756: dominik: make dumps core on invalid makefile 3168 31692008-05-15 Simon J. Gerraty <sjg@void.crufty.net> 3170 3171 * Makefile.in (BMAKE_VERSION): bump version to 20080515 3172 * Merge with NetBSD make, pick up: 3173 o fix skip setting vars in VAR_GLOBAL context, to handle 3174 cases where VAR_CMD is used for other than command line vars. 3175 31762008-05-14 Simon J. Gerraty <sjg@void.crufty.net> 3177 3178 * boot-strap (make_version): we may need to look in 3179 $prefix/share/mk for sys.mk 3180 3181 * Makefile.in (BMAKE_VERSION): bump version to 20080514 3182 * Merge with NetBSD make, pick up: 3183 o skip setting vars in VAR_GLOBAL context, when already set in 3184 VAR_CMD which takes precedence. 3185 31862008-03-30 Simon J. Gerraty <sjg@void.crufty.net> 3187 3188 * Makefile.in (BMAKE_VERSION): bump version to 20080330 3189 * Merge with NetBSD make, pick up: 3190 o fix for ?= when LHS contains variable reference. 3191 31922008-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3193 3194 * merge some patches from NetBSD pkgsrc. 3195 3196 * makefile.boot.in (BOOTSTRAP_SYS_PATH): Allow better control of 3197 the MAKSYSPATH used during bootstrap. 3198 3199 * Makefile.in (BMAKE_VERSION): bump version to 20080215 3200 * Merge with NetBSD make, pick up: 3201 o warn if non-space chars follow 'empty' in a conditional. 3202 32032008-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3204 3205 * Makefile.in (BMAKE_VERSION): bump version to 20080118 3206 * Merge with NetBSD make, pick up: 3207 o consider dependencies read from .depend as optional - dsl 3208 o remember when buffer for reading makefile grows - dsl 3209 o add -dl (aka LOUD) - David O'Brien 3210 32112007-10-22 Simon J. Gerraty <sjg@void.crufty.net> 3212 3213 * Makefile.in (BMAKE_VERSION): bump version to 20071022 3214 * Merge with NetBSD make, pick up: 3215 o Allow .PATH<suffix> to be used for .include "" 3216 3217 * boot-strap: source default settings from .bmake-boot-strap.rc 3218 32192007-10-16 Simon J. Gerraty <sjg@void.crufty.net> 3220 3221 * Makefile.in: fix maninstall on various systems 3222 provided that our man.mk is used. 3223 For non-BSD systems we install the preformatted page 3224 into $MANDIR/cat1 3225 32262007-10-15 Simon J. Gerraty <sjg@void.crufty.net> 3227 3228 * boot-strap: make bmake.1 too, so maninstall works. 3229 32302007-10-14 Simon J. Gerraty <sjg@void.crufty.net> 3231 3232 * Makefile.in (BMAKE_VERSION): bump version to 20071014 3233 * Merge with NetBSD make, pick up: 3234 o revamped handling of defshell - configure no longer needs to 3235 know the content of the shells array - apb 3236 o stop Var_Subst modifying its input - apb 3237 o avoid calling ParseTrackInput too often - dsl 3238 32392007-10-11 Simon J. Gerraty <sjg@void.crufty.net> 3240 3241 * Makefile.in (BMAKE_VERSION): bump version to 20071011 3242 * Merge with NetBSD make, pick up: 3243 o fix Shell_Init for case that _BASENAME_DEFSHELL is absolute path. 3244 3245 * sigcompat.c: some tweaks for HP-UX 11.x based on 3246 patch from Tobias Nygren 3247 3248 * configure.in: update handling of --with-defshell to match 3249 new make behavior. --with-defshell=/usr/xpg4/bin/sh 3250 will now do what one might hope - provided the chosen shell 3251 behaves enough like sh. 3252 32532007-10-08 Simon J. Gerraty <sjg@void.crufty.net> 3254 3255 * Makefile.in (BMAKE_VERSION): bump to 20071008 3256 * Merge with NetBSD make, pick up: 3257 o .MAKE.JOB.PREFIX - control the token output before jobs - sjg 3258 o .export/.MAKE.EXPORTED - export of variables - sjg 3259 o .MAKE.MAKEFILES - track all makefiles read - sjg 3260 o performance improvements - dsl 3261 o revamp parallel job scheduling - dsl 3262 32632006-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3264 3265 * Makefile.in (BMAKE_VERSION): bump to 20060728 3266 * Merge with NetBSD make, pick up: 3267 o extra debug info during variable and cond processing - sjg 3268 o shell definition now covers newline - rillig 3269 o minor mem leak in PrintOnError - sjg 3270 32712006-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3272 3273 * Makefile.in (BMAKE_VERSION): bump to 20060511 3274 * Merge with NetBSD make, pick up: 3275 o more memory leaks - coverity 3276 o possible overflow in ArchFindMember - coverity 3277 o extract variable modifier code out of Var_Parse() 3278 so it can be called recursively - sjg 3279 o unit-tests/moderrs - sjg 3280 32812006-04-12 Simon J. Gerraty <sjg@void.crufty.net> 3282 3283 * Makefile.in (BMAKE_VERSION): bump to 20060412 3284 * Merge with NetBSD make, pick up: 3285 o fixes for some memory leaks - coverity 3286 o only read first sys.mk etc when searching sysIncPath - sjg 3287 3288 * main.c (ReadMakefile): remove hack for __INTERIX that prevented 3289 setting ${MAKEFILE} - OBATA Akio 3290 32912006-03-18 Simon J. Gerraty <sjg@void.crufty.net> 3292 3293 * Makefile.in (BMAKE_VERSION): bump to 20060318 3294 * Merge with NetBSD make, pick up: 3295 o cleanup of job.c to remove remote handling, distcc is more 3296 useful and this code was likely bit-rotting - dsl 3297 o fix for :P modifier - sjg 3298 * boot-strap: set default prefix to something reasonable 3299 (for me anyway). 3300 33012006-03-01 Simon J. Gerraty <sjg@void.crufty.net> 3302 3303 * Makefile.in (BMAKE_VERSION): bump to 20060301 3304 * Merge with NetBSD make, pick up: 3305 o make .WAIT apply recursively, document and test case - apb 3306 o allow variable modifiers in a variable appear anywhere in 3307 modifier list, document and test case - sjg 3308 33092006-02-22 Simon J. Gerraty <sjg@void.crufty.net> 3310 3311 * Makefile.in (BMAKE_VERSION): bump to 20060222 3312 * Merge with NetBSD make, pick up: 3313 o improved job token handling - dsl 3314 o SIG_DFL the correct signal before exec - dsl 3315 o more debug info during parsing - dsl 3316 o allow variable modifiers to be specified via variable - sjg 3317 * boot-strap: explain why we died if no mksrc 3318 33192005-11-05 Simon J. Gerraty <sjg@void.crufty.net> 3320 3321 * Makefile.in (BMAKE_VERSION): bump to 20051105 3322 * configure.in: always set default_sys_path 3323 default is ${prefix}/share/mk 3324 - remove prefix_sys_path, anyone wanting more than above 3325 needs to set it manually. 3326 33272005-11-04 Simon J. Gerraty <sjg@void.crufty.net> 3328 3329 * boot-strap: make this a bit easier for pkgsrc folk. 3330 bootstrap still fails on IRIX64 since MACHINE_ARCH gets set to 3331 'mips' while pkgsrc wants 'mipseb' or 'mipsel' 3332 33332005-11-02 Simon J. Gerraty <sjg@void.crufty.net> 3334 3335 * Makefile.in (BMAKE_VERSION): bump to 20051102 3336 * job.c (JobFinish): fix likely ancient merge lossage 3337 fix from Todd Vierling. 3338 * boot-strap (srcdir): allow setting mksrc=none 3339 33402005-10-31 Simon J. Gerraty <sjg@void.crufty.net> 3341 3342 * Makefile.in (BMAKE_VERSION): bump to 20051031 3343 * ranlib.h: skip on OSF too. 3344 (NetBSD PR 31864) 3345 33462005-10-10 Simon J. Gerraty <sjg@void.crufty.net> 3347 3348 * Makefile.in (BMAKE_VERSION): bump to 20051002 3349 fix a silly typo 3350 33512005-10-09 Simon J. Gerraty <sjg@void.crufty.net> 3352 3353 * Makefile.in (BMAKE_VERSION): bump to 20051001 3354 support for UnixWare and some other systems, 3355 based on patches from pkgsrc/bootstrap 3356 33572005-09-03 Simon J. Gerraty <sjg@void.crufty.net> 3358 3359 * Makefile.in (BMAKE_VERSION): bump to 20050901 3360 * Merge with NetBSD make, pick up: 3361 o possible parse error causing us to wander off. 3362 33632005-06-06 Simon J. Gerraty <sjg@void.crufty.net> 3364 3365 * Makefile.in (BMAKE_VERSION): bump to 20050606 3366 * Merge with NetBSD make, pick up: 3367 o :0x modifier for randomizing a list 3368 o fixes for a number of -Wuninitialized issues. 3369 33702005-05-30 Simon J. Gerraty <sjg@void.crufty.net> 3371 3372 * Makefile.in (BMAKE_VERSION): bump to 20050530 3373 * Merge with NetBSD make, pick up: 3374 o Handle dependencies for .BEGIN, .END and .INTERRUPT 3375 3376 * README: was seriously out of date. 3377 33782005-03-22 Simon J. Gerraty <sjg@void.crufty.net> 3379 3380 * Important to use .MAKE rather than MAKE. 3381 33822005-03-15 Simon J. Gerraty <sjg@void.crufty.net> 3383 3384 * Makefile.in (BMAKE_VERSION): bump to 20050315 3385 * Merge with NetBSD make, pick up: 3386 o don't mistake .elsefoo for .else 3387 o use suffix-specific search path correctly 3388 o bunch of style nits 3389 33902004-05-11 Simon J. Gerraty <sjg@void.crufty.net> 3391 3392 * boot-strap: 3393 o ensure that args to --src and --with-mksrc 3394 are resolved before giving them to configure. 3395 o add -o "objdir" so that builder can control it, 3396 default is $OS as determined by os.sh 3397 o add -q to suppress all the install instructions. 3398 33992004-05-08 Simon J. Gerraty <sjg@void.crufty.net> 3400 3401 * Remove __IDSTRING() 3402 3403 * Makefile.in (BMAKE_VERSION): bump to 20040508 3404 * Merge with NetBSD make, pick up: 3405 o posix fixes 3406 - remove '-e' from compat mode 3407 - add support for '+' command-line prefix. 3408 o fix for handling '--' on command-line. 3409 o fix include in lst.lib/lstInt.h to simplify '-I's 3410 o we also picked up replacement of MAKE_BOOTSTRAP 3411 with !MAKE_NATIVE which is a noop, but possibly confusing. 3412 34132004-04-14 Simon J. Gerraty <sjg@void.crufty.net> 3414 3415 * Makefile.in (BMAKE_VERSION): bump to 20040414 3416 * Merge with NetBSD make, pick up: 3417 o allow quoted strings on lhs of conditionals 3418 o issue warning when extra .else is seen 3419 o print line numer when errors encountered during parsing from 3420 string. 3421 34222004-02-20 Simon J. Gerraty <sjg@void.crufty.net> 3423 3424 * Makefile.in (BMAKE_VERSION): bump to 20040220 3425 * Merge with NetBSD make, pick up: 3426 o fix for old :M parsing bug. 3427 o re-jigged unit-tests 3428 34292004-02-15 Simon J. Gerraty <sjg@void.crufty.net> 3430 3431 * Makefile.in (accept test): use ${.MAKE:S,^./,${.CURDIR}/,} 3432 so that './bmake -f Makefile test' works. 3433 34342004-02-14 Simon J. Gerraty <sjg@void.crufty.net> 3435 3436 * Makefile.in: (BMAKE_VERSION): bump to 20040214 3437 * Merge with NetBSD make, pick up: 3438 o search upwards for *.mk 3439 o fix for double free of var substitution buffers 3440 o use of getopt replaced with custom code, since the usage 3441 (re-scanning) isn't posix compatible. 3442 34432004-02-12 Simon J. Gerraty <sjg@void.crufty.net> 3444 3445 * arch.c: don't include ranlib.h on ELF systems 3446 (thanks to Chuck Cranor <chuck@ece.cmu.edu>). 3447 34482004-01-18 Simon J. Gerraty <sjg@void.crufty.net> 3449 3450 * Makefile.in (BMAKE_VERSION): bump to 20040118 3451 3452 * boot-strap (while): export vars we assign to on cmdline 3453 * unit-test/Makefile.in: ternary is .PHONY 3454 34552004-01-08 Simon J. Gerraty <sjg@void.crufty.net> 3456 3457 * Makefile.in (BMAKE_VERSION): bump version to 20040108 3458 * Merge with NetBSD make, pick up: 3459 o fix for ternary modifier 3460 34612004-01-06 Simon J. Gerraty <sjg@void.crufty.net> 3462 3463 * Makefile.in (BMAKE_VERSION): bump version to 20040105 3464 * Merge with NetBSD make, pick up: 3465 o fix for cond.c to handle compound expressions better 3466 o variable expansion within sysV style replacements 3467 34682003-12-22 Simon J. Gerraty <sjg@void.crufty.net> 3469 3470 * Make portable snprintf safer - output to /dev/null first to 3471 check space needed. 3472 3473 * Makefile.in (BMAKE_VERSION): bump version to 20031222 3474 * Merge with NetBSD make, pick up: 3475 o -dg3 to show input graph when things go wrong. 3476 o explicitly look for makefiles in objdir if not found in curdir so 3477 that errors in .depend etc will be reported accurarely. 3478 o avoid use of -e in shell scripts in jobs mode, use '|| exit $?' 3479 instead as it more accurately reflects the expected behavior and 3480 is more consistently implemented. 3481 o avoid use of asprintf. 3482 34832003-09-28 Simon J. Gerraty <sjg@void.crufty.net> 3484 3485 * util.c: Add asprintf and vasprintf. 3486 3487 * Makefile.in (BMAKE_VERSION): bump version to 20030928 3488 * Merge with NetBSD make, pick up: 3489 :[] modifier - allows picking words from a variable. 3490 :tW modifier - allows treating value as one big word. 3491 W flag for :C and :S - allows treating value as one big word. 3492 34932003-09-12 Simon J. Gerraty <sjg@void.crufty.net> 3494 3495 * Merge with NetBSD make 3496 pick up -de flag to enable printing failed command. 3497 don't skip 1st two dir entries (normally . and ..) since 3498 coda does not have them. 3499 35002003-09-09 Simon J. Gerraty <sjg@void.crufty.net> 3501 3502 * Makefile.in (BMAKE_VERSION): bump version to 20030909 3503 * Merge with NetBSD make, pick up: 3504 - changes for -V '${VAR}' to print fully expanded value 3505 cf. -V VAR 3506 - CompatRunCommand now prints the command that failed. 3507 - several files got updated 3 clause Berkeley license. 3508 35092003-08-02 Simon J. Gerraty <sjg@void.crufty.net> 3510 3511 * boot-strap: Allow setting configure args on command line. 3512 35132003-07-31 Simon J. Gerraty <sjg@void.crufty.net> 3514 3515 * configure.in: add --with-defshell to allow sh or ksh 3516 to be selected as default shell. 3517 3518 * Makefile.in: bump version to 20030731 3519 3520 * Merge with NetBSD make 3521 Pick up .SHELL spec for ksh and associate man page changes. 3522 Also compat mode now uses the same shell specs. 3523 35242003-07-29 Simon J. Gerraty <sjg@void.crufty.net> 3525 3526 * var.c (Var_Parse): ensure delim is initialized. 3527 3528 * unit-tests/Makefile.in: use single quotes to avoid problems from 3529 some shells. 3530 3531 * makefile.boot.in: 3532 Run the unit-tests as part of the bootstrap procedure. 3533 35342003-07-28 Simon J. Gerraty <sjg@void.crufty.net> 3535 3536 * unit-tests/Makefile.in: always force complaints from 3537 ${TEST_MAKE} to be from 'make'. 3538 3539 * configure.in: add check for 'diff -u' 3540 also fix some old autoconf'isms 3541 3542 * Makefile.in (BMAKE_VERSION): bump version to 20030728. 3543 if using GCC add -Wno-cast-qual to CFLAGS for var.o 3544 3545 * Merge with NetBSD make 3546 Pick up fix for :ts parsing error in some cases. 3547 Pick unit-tests. 3548 35492003-07-23 Simon J. Gerraty <sjg@void.crufty.net> 3550 3551 * Makefile.in (BMAKE_VERSION): bump version to 20030723. 3552 3553 * var.c (Var_Parse): fix bug in :ts modifier, after const 3554 correctness fixes, must pass nstr to VarModify. 3555 35562003-07-14 Simon J. Gerraty <sjg@void.crufty.net> 3557 3558 * Makefile.in: BMAKE_VERSION switch to a date based version. 3559 We'll generally use the date of last import from NetBSD. 3560 3561 * Merge with NetBSD make 3562 Pick up fixes for const-correctness, now passes WARNS=3 on 3563 NetBSD. 3564 Pick up :ts modifier, allows controlling the separator used 3565 between words in variable expansion. 3566 35672003-07-11 Simon J. Gerraty <sjg@void.crufty.net> 3568 3569 * FILES: include boot-strap and os.sh 3570 3571 * Makefile.in: only set WARNS if we are NetBSD, the effect on 3572 FreeBSD is known to be bad. 3573 3574 * makefile.boot.in (bootstrap): make this the default target. 3575 3576 * Makefile.in: bump version to 3.1.19 3577 3578 * machine.sh: avoid A-Z with tr as it is bound to lose. 3579 35802003-07-10 Simon J. Gerraty <sjg@void.crufty.net> 3581 3582 * Merge with NetBSD make 3583 Pick up fix for PR/19781 - unhelpful error msg on unclosed ${var:foo 3584 Plus some doc fixes. 3585 35862003-04-27 Simon J. Gerraty <sjg@void.crufty.net> 3587 3588 * Merge with NetBSD make 3589 Pick up fix for PR/1523 - don't count a library as built, if there 3590 is no way to build it 3591 3592 * Bump version to 3.1.18 3593 35942003-03-23 Simon J. Gerraty <sjg@void.crufty.net> 3595 3596 * Merge with NetBSD make 3597 Pick up fix for ParseDoSpecialSrc - we only use it if .WAIT 3598 appears in src list. 3599 36002003-03-21 Simon J. Gerraty <sjg@void.crufty.net> 3601 3602 * Merge with NetBSD make (mmm 10th anniversary!) 3603 pick up fix for .WAIT in srcs that refer to $@ or $* (PR#20828) 3604 pick up -X which tells us to not export VAR=val via setenv if 3605 we are already doing so via MAKEFLAGS. This saves valuable env 3606 space on systems like Darwin. 3607 set MAKE_VERSION to 3.1.17 3608 3609 * parse.c: pix up fix for suffix rules 3610 36112003-03-06 Simon J. Gerraty <sjg@void.crufty.net> 3612 3613 * Merge with NetBSD make. 3614 pick up fix for propagating -B via MAKEFLAGS. 3615 set MAKE_VERSION to 3.1.16 3616 3617 * Apply some patches from pkgsrc-bootstrap/bmake 3618 Originally by Grant Beattie <grant@netbsd.org> 3619 I may have missed some - since they are based on bmake-3.1.12 3620 36212002-12-03 Simon J. Gerraty <sjg@void.crufty.net> 3622 3623 * makefile.boot.in (bmake): update install targets for those that 3624 use them, also clear MAKEFLAGS when invoking bmake.boot to avoid 3625 havoc from gmake -w. Thanks to Harlan Stenn <hstenn@cisco.com>. 3626 3627 * bmake.cat1: update the pre-formatted man page! 3628 36292002-11-30 Simon J. Gerraty <sjg@void.crufty.net> 3630 3631 * Merge with NetBSD make. 3632 pick up fix for premature free of pointer used in call 3633 to Dir_InitCur(). 3634 set MAKE_VERSION to 3.1.15 3635 36362002-11-26 Simon J. Gerraty <sjg@void.crufty.net> 3637 3638 * configure.in: determine suitable value for MKSRC. 3639 override using --with-mksrc=PATH. 3640 3641 * machine.sh: use `uname -p` for MACHINE_ARCH on modern SunOS systems. 3642 configs(8) will use 'sun4' as an alias for 'sparc'. 3643 36442002-11-25 Simon J. Gerraty <sjg@void.crufty.net> 3645 3646 * Merge with NetBSD make. 3647 pick up ${.PATH} 3648 pick up fix for finding ../cat.c via .PATH when .CURDIR=.. 3649 set MAKE_VERSION to 3.1.14 3650 add configure checks for killpg and sys/socket.h 3651 36522002-09-16 Simon J. Gerraty <sjg@void.crufty.net> 3653 3654 * tag bmake-3-1-13 3655 3656 * makefile.boot.in (bmake): use install-mk 3657 Also setup ./mk before trying to invoke bmake.boot incase we 3658 needed install-mk to create a sys.mk for us. 3659 3660 * configure.in: If we need to add -I${srcdir}/missing, make it an 3661 absolute path so that it works for lst.lib too. 3662 3663 * make.h: always include sys/cdefs.h since we provide one if the 3664 host does not. 3665 3666 * Makefile.in (install-mk): 3667 use MKSRC/install-mk which will do the right thing. 3668 use uname -p for ARCH if possible. 3669 since install-mk will setup links bsd.prog.mk -> prog.mk if 3670 needed, just .include bsd.prog.mk 3671 3672 * Merge with NetBSD make (NetBSD-1.6) 3673 Code is ansi-C only now. 3674 Bug in handling of dotLast is fixed. 3675 Can now assign .OBJDIR and make will reset its notions of life. 3676 New modifiers :tu :tl for toUpper and toLower. 3677 3678Tue Oct 16 12:18:42 2001 Simon J. Gerraty <sjg@zen.crufty.net> 3679 3680 * Merge with NetBSD make 3681 pick up fix for .END failure in compat mode. 3682 pick up fix for extra va_end() in ParseVErrorInternal. 3683 3684Thu Oct 11 13:20:06 2001 Simon J. Gerraty <sjg@zen.crufty.net> 3685 3686 * configure.in: for systems that have sys/cdefs.h check if it is 3687 compatible. If not, include the one under missing, but tell it to 3688 include the native one too - necessary on Linux. 3689 3690 * missing/sys/cdefs.h: if NEED_HOST_CDEFS_H is defined, use 3691 include_next (for gcc) to get the native sys/cdefs.h 3692 3693Tue Aug 21 02:29:34 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3694 3695 * job.c (JobFinish): Fix an earlier merge bug that resulted in 3696 leaking descriptors when using -jN. 3697 3698 * job.c (JobPrintCommand): See if "curdir" exists before 3699 attempting to chdir(). Doing the chdir directly in make (when in 3700 compat mode) fails silently, so let the -jN version do the same. 3701 This can happen when building kernels in an object tree and 3702 playing clever games to reset .CURDIR. 3703 3704 * Merged with NetBSD make 3705 pick up .USEBEFORE 3706 3707Tue Jun 26 23:45:11 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3708 3709 * makefile.boot.in: Give bmake.boot a MAKESYSPATH that might work. 3710 3711Tue Jun 12 16:48:57 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3712 3713 * var.c (Var_Set): Add 4th (flags) arg so VarLoopExpand can tell 3714 us not to export the iterator variable when using VAR_CMD context. 3715 3716Sun Jun 10 21:55:21 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3717 3718 * job.c (Job_CatchChildren): don't call Job_CatchOutput() here, 3719 its the wrong "fix". 3720 3721Sat Jun 9 00:11:24 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3722 3723 * Redesigned export of VAR_CMD's via MAKEFLAGS. 3724 We now simply append the variable names to .MAKEOVERRIDES, and 3725 handle duplicate suppression and quoting in ExportMAKEFLAGS using: 3726 ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@} 3727 Apart from fixing quoting bugs in previous version, this allows us 3728 to export vars to the environment by simply doing: 3729 .MAKEOVERRIDES+= PATH 3730 Merged again with NetBSD make, but the above is the only change. 3731 3732 * configure.in: added 3733 --disable-pwd-override disable $PWD overriding getcwd() 3734 --disable-check-make-chdir disable make trying to guess 3735 when it should automatically cd ${.CURDIR} 3736 3737 * Merge with NetBSD make, changes include: 3738 parse.c (ParseDoDependency): Spot that the syntax error is 3739 caused by an unresolved cvs/rcs conflict and say so. 3740 var.c: most of Var* functions now take a ctxt as 1st arg. 3741 now does variable substituion on rhs of sysv style modifiers. 3742 3743 * var.c (Var_Set): exporting of command line variables (VAR_CMD) 3744 is now done here. We append the name='value' to .MAKEOVERRIDES 3745 rather than directly into MAKEFLAGS as this allows a Makefile to 3746 use .MAKEOVERRIDES= to disable this behaviour. GNU make uses a 3747 very similar mechanism. Note that in adding name='value' to 3748 .MAKEOVERRIDES we do the moral equivalent of: 3749 .MAKEOVERRIDES:= ${.MAKEOVERRIDES:Nname=*} name='val' 3750 3751Fri Jun 1 14:08:02 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3752 3753 * make-conf.h (USE_IOVEC): make it conditional on HAVE_SYS_UIO_H 3754 3755 * Merged with NetBSD make 3756 make -dx can now be used to run commands via sh -x 3757 better error messages on exec failures. 3758 3759Thu May 31 01:44:54 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3760 3761 * Makefile.in (main.o): depends on ${SRCS} ${MAKEFILE} so that 3762 MAKE_VERSION gets updated. Also don't use ?= for MAKE_VERSION, 3763 MACHINE etc otherwise they propagate from the previous bmake. 3764 3765 * configure.in (machine): allow --with-machine=generic to make 3766 configure use machine.sh to set MACHINE. 3767 3768 * job.c (JobInterrupt): convert to using WAIT_T and friends. 3769 3770 * Makefile.in: mention in bmake.1 that we use autoconf. 3771 3772 * make.1: mention MAKE_PRINT_VAR_ON_ERROR. 3773 3774Wed May 30 23:17:18 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3775 3776 * main.c (ReadMakefile): don't set MAKEFILE if reading ".depend" 3777 as that rather defeats the usefulness of ${MAKEFILE}. 3778 3779 * main.c (MainParseArgs): append command line variable assignments 3780 to MAKEFLAGS so that they get propagated to child make's. 3781 Apparently this is required POSIX behaviour? Its useful anyway. 3782 3783Tue May 29 02:20:07 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3784 3785 * compat.c (CompatRunCommand): don't use perror() since stdio may 3786 cause problems in child of vfork(). 3787 3788 * compat.c, main.c: Call PrintOnError() when we are going to bail. 3789 This routine prints out the .curdir where we stopped and will also 3790 display any vars listed in ${MAKE_PRINT_VAR_ON_ERROR}. 3791 3792 * main.c: add ${.newline} to hold a "\n" - sometimes handy in 3793 :@ expansion. 3794 3795 * var.c: VarLoopExpand: ignore addSpace if a \n is present. 3796 3797 * Added RCSid's for the files we've touched. 3798 3799Thu May 24 15:41:37 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3800 3801 * configure.in: Thanks to some clues from mdb@juniper.net, 3802 added autoconf magic to control setting of MACHINE, MACHINE_ARCH 3803 as well as what ends up in _PATH_DEFSYSPATH. We now have: 3804 3805 --with-machine=MACHINE explicitly set MACHINE 3806 --with-force-machine=MACHINE set FORCE_MACHINE 3807 --with-machine_arch=MACHINE_ARCH explicitly set MACHINE_ARCH 3808 --with-default-sys-path=PATH:DIR:LIST use an explicit _PATH_DEFSYSPATH 3809 --with-prefix-sys-path=PATH:DIR:LIST prefix _PATH_PREFIX_SYSPATH 3810 --with-path-objdirprefix=PATH override _PATH_OBJDIRPREFIX 3811 3812 If _PATH_OBJDIRPREFIX is set to "no" we won't define it. 3813 3814 * makefile: added a pathetically simple makefile to drive 3815 bootstrapping. Running configure by hand is more useful. 3816 3817 * Makefile.in: added MAKE_VERSION, and reworked things to be less 3818 dependent on NetBSD bsd.*.mk 3819 3820 * pathnames.h: allow NO_PATH_OBJDIRPREFIX to stop us defining 3821 _PATH_OBJDIRPREFIX for those that don't want a default. 3822 construct _PATH_DEFSYSPATH from the info we get from configure. 3823 3824 * main.c: allow for no _PATH_OBJDIRPREFIX, set ${MAKE_VERSION} 3825 if MAKE_VERSION is defined. 3826 3827 * compat.c: when we bail, print out the .CURDIR we were in. 3828 3829Sat May 12 00:34:12 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3830 3831 * Merged with NetBSD make 3832 3833 * var.c: fixed a bug in the handling of the modifier :P 3834 if the node as found but the path was null, we segfault trying to 3835 duplicate it. 3836 3837Mon Mar 5 16:20:33 2001 Simon J. Gerraty <sjg@zen.quick.com.au> 3838 3839 * Merged with NetBSD make 3840 3841 * make.c: Make_OODate's test for a library out of date was using 3842 cmtime where it should have used mtime (my bug). 3843 3844 * compat.c: Use perror() to tell us what really went wrong when we 3845 cannot exec a command. 3846 3847Fri Dec 15 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3848 3849 * Merged with NetBSD make 3850 3851Sat Jun 10 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3852 3853 * Merged with NetBSD make 3854 3855Thu Jun 1 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3856 3857 * Merged with NetBSD make 3858 3859Tue May 30 10:11:08 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3860 3861 * Merged with NetBSD make 3862 3863Thu Apr 27 00:07:47 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3864 3865 * util.c: don't provide signal() since we use sigcompat.c 3866 3867 * Makefile.in: added a build target. 3868 3869 * var.c (Var_Parse): added ODE modifiers :U, :D, :L, :P, :@ and :! 3870 These allow some quite clever magic. 3871 3872 * main.c (main): added support for getenv(MAKESYSPATH). 3873 3874Mon Apr 2 16:25:13 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3875 3876 * Disable $PWD overriding getcwd() if MAKEOBJDIRPREFIX is set. 3877 This avoids objdir having a different value depending on how a 3878 directory was reached (via command line, or subdir.mk). 3879 3880 * If FORCE_MACHINE is defined, ignore getenv("MACHINE"). 3881 3882Mon Apr 2 23:15:31 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3883 3884 * Do a chdir(${.CURDIR}) before invoking ${.MAKE} or ${.MAKE:T} if 3885 MAKEOBJDIRPREFIX is set and NOCHECKMAKECHDIR is not. 3886 I've been testing this in NetBSD's make for some weeks. 3887 3888 * Turn Makefile into Makefile.in and make it useful. 3889 3890Tue Feb 29 22:08:00 2000 Simon J. Gerraty <sjg@zen.quick.com.au> 3891 3892 * Imported NetBSD's -current make(1) and resolve conflicts. 3893 3894 * Applied autoconf patches from bmake v2 3895 3896 * Imported clean code base from NetBSD-1.0 3897