Module Name: src Committed By: rillig Date: Mon Dec 28 00:46:25 UTC 2020
Modified Files: src/usr.bin/make: enum.h main.c make.h nonints.h parse.c var.c src/usr.bin/make/unit-tests: varmod-defined.exp varmod-indirect.exp varname-dot-shell.exp Log Message: make(1): replace global preserveUndefined with VARE_KEEP_UNDEF Controlling the expansion of variable expressions using a global variable and a VARE flag was inconsistent. Converting the global variable into a flag had to prerequisites: 1. The unintended duplicate variable assignment had to be fixed, as done in parse.c 1.520 from 2020-12-27. Without this fix, it would have been necessary to add more flags to Var_Exists and Var_SetWithFlags, and this would have become too complex. 2. There had to be a unit test demonstrating that VARE_KEEP_DOLLAR only applies to the top-level expression and is not passed to the subexpressions, while VARE_KEEP_UNDEF applies to all subexpressions as well. This test is in var-op-expand.mk 1.10 from 2020-12-28, at least for the ':@word@' modifier. In ParseModifierPartSubst, VARE_KEEP_UNDEF is not passed down either, in the same way. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/make/enum.h cvs rdiff -u -r1.505 -r1.506 src/usr.bin/make/main.c cvs rdiff -u -r1.239 -r1.240 src/usr.bin/make/make.h cvs rdiff -u -r1.185 -r1.186 src/usr.bin/make/nonints.h cvs rdiff -u -r1.520 -r1.521 src/usr.bin/make/parse.c cvs rdiff -u -r1.773 -r1.774 src/usr.bin/make/var.c cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-defined.exp cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-indirect.exp cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/varname-dot-shell.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.