Module Name: src Committed By: rillig Date: Mon Mar 15 18:56:38 UTC 2021
Modified Files: src/usr.bin/make: var.c src/usr.bin/make/unit-tests: varmod-assign.exp varmod-assign.mk Log Message: make: fix double varname expansion in the variable modifier '::=' This is an edge case that doesn't occur in practice since pretty much nobody dares to use variable names that contain an actual '$' in their name. This is not about the fairly common VAR.${param} (as written in the makefile), but instead about the variable whose name is literally 'VAR.${param}'. The test demonstrates that after the fix, the variable name is taken exactly as-is for the simple assignment modifier '::='. There are no such tests for the modifiers '::+=', '::!=' and '::?=', but that's ok. The code in ApplyModifier_Assign would look assymetrical and suspicious enough if one of these modifiers would expand its variable name and the others wouldn't. To generate a diff of this commit: cvs rdiff -u -r1.887 -r1.888 src/usr.bin/make/var.c cvs rdiff -u -r1.10 -r1.11 src/usr.bin/make/unit-tests/varmod-assign.exp cvs rdiff -u -r1.11 -r1.12 src/usr.bin/make/unit-tests/varmod-assign.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.