Module Name: src Committed By: rillig Date: Sun Jul 10 21:32:10 UTC 2022
Modified Files: src/share/mk: bsd.subdir.mk Log Message: bsd.subdir.mk: replace obscure indirection with direct condition Since 2008, when make generates the body of a .for loop, it does not copy the items as raw strings but as expressions of the form ${:U...}. This prevents syntactical changes from code injection in the body of the .for loop. Since then, using .for loop variables in conditions works. Since the same time, the variable assignment operator '+=' doesn't need to be protected by a leading space anymore. Even if the item from the .for loop is 'libc++', the trailing '+' is not parsed as part of the variable assignment operator, and it never had been parsed this way. The space probably has been cargo cult programming. The only ambiguous case had been in a variable assignment, when the variable name ended with a variable from the .for loop, and the assignment operator was '='. Only in this case could the parser be tricked into parsing the variable assignment as 'libc+ +=' instead of the intended 'libc++ ='. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/share/mk/bsd.subdir.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.