Module Name: src Committed By: rillig Date: Mon May 23 22:33:56 UTC 2022
Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: directive-for-empty.exp directive-for-empty.mk Log Message: tests/make: document and demonstrate .for i containing .if empty(i) PR bin/43821 describes the inconsistency that in a '.for i' loop, the condition '.if ${i:M*.c}' works since 2009 while the seemingly equivalent condition '.if !empty(i:M*.c)' does not access the variable 'i' from the .for loop but instead the global 'i'. Resolving this situation in a backwards-compatible and non-surprising way is hard, as make has grown several features during the last 20 years that interact in various edge cases. For now, document the most obvious pitfalls. To generate a diff of this commit: cvs rdiff -u -r1.1206 -r1.1207 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.315 -r1.316 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/directive-for-empty.exp \ src/usr.bin/make/unit-tests/directive-for-empty.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.