Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
make: use '"filename" line 123' for locations instead of 'filename:123' The format 'filename:123' is commonly used for identifying a location in a file. Text editors recognize it and allow quick navigation through it. The previous format was specific to make and would have required custom support in editors. The new format was already used in stack traces, except for the first line. Now all lines use the same format.
make: reduce line length in error messages The error messages for deeply nested parse errors were hard to decipher, due to the large amount of text. Split these messages into individual lines, just as in the backtrace for .include files and .for loops. This unified backtrace makes the output more uniform.
make: add more context information to error messages In case of a parse error or evaluation error, print the variable value in addition to the variable name, to see the effects of previous expression modifiers. In nested make calls, print the current directory at the bottom of a stack trace, as that information is otherwise hard to get in a parallel build spanning multiple directories.
Sync with HEAD.
make: add detailed exit status to message for failed sub-commands Several commands communicate via the exit status and not only distinguish between zero and non-zero, so make this information available to ease investigations. The command "false" is not guaranteed to exit with a consistent status, so use "(exit 13)" instead in the tests, to keep these tests portable across different operating systems. The exit status 127 is required for a shell that cannot find a command, so keep that one.
make: add more context to "returned non-zero status" message Previously, this message was an "error" but had no influence on the exit status, so make it a warning instead. In the seldom used -W mode that treats warnings as errors, this change influences the exit status.
make: avoid trailing whitespace in debug log for variables Since trailing whitespace is invisible, describe the variable value in words to make it visible.
make: add debug logging for capturing the output of external commands This applies to all 4 situations in which the output of an external command is used for modifying a variable or an expression: * the assignment operator '!=' * the assignment modifier '::!=' * the SUN shell modifier ':sh' * the other shell modifier ':!cmd!' Previously, only the shell modifier ':!cmd!' had debug logging. Suggested by Christoph Badura.
make: add test for the variable modifier ':sh'