Module Name: src Committed By: rillig Date: Sat Sep 3 00:50:07 UTC 2022
Modified Files: src/usr.bin/make: for.c make.1 parse.c src/usr.bin/make/unit-tests: directive-for-break.exp directive-for-break.mk Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.169 -r1.170 src/usr.bin/make/for.c cvs rdiff -u -r1.331 -r1.332 src/usr.bin/make/make.1 cvs rdiff -u -r1.682 -r1.683 src/usr.bin/make/parse.c cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/directive-for-break.exp \ src/usr.bin/make/unit-tests/directive-for-break.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.