Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
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.
tests/make: force line-based diagnostics to be listed in the tests This way, contradictions between the intended output and the actual output are closer together and have a better chance of being spotted.
make: error out on a .break directive with arguments
make: clean up handling of .break in .for loops Move For_Break further up, as the functions in that file are sorted from small to big. The cast from size_t to unsigned int is required by lint. In parse.c, move the code into a separate function to keep ParseDirective small. Its only job is to parse the directive and then delegate to another function doing the actual work. In the manual page, remove empty lines. In the test, ensure that .break stops processing of the .for loop immediately; anything after the .break is not processed anymore. Replace ':=' with '=', as there is no need to evaluate '$i' early. Check the expected value in the .mk file instead of the .exp file, to keep the reading scope as small as possible.
make: add .break to terminate .for loop early When .break is encountered within a .for loop it causes immediate termination. Outside of a .for loop .break causes a parse error. Reviewed by: christos