NetBSD/usr.bin/make/unit-tests/varmisc.exp
rillig 9e0f4e6295 make(1): add test for indirect unclosed variable
The error message mentions only the original variable name right now.
It's left to the Makefile author to see where the actual unclosed
variable value comes from.  From a usability standpoint that's not
optimal, but everything else would need additional cycles even in the
good cases, or it might have side-effects when evaluating a variable
twice (once to detect the error, and a second time to find out the
details of the error).
2020-07-30 13:50:27 +00:00

73 lines
1.6 KiB
Plaintext

:D expanded when var set
true
TRUE
:U expanded when var undef
true
TRUE
:D skipped if var undef
:U skipped when var set
is set
:? only lhs when value true
true
TRUE
:? only rhs when value false
false
FALSE
do not evaluate or expand :? if discarding
is set
year=2016 month=04 day=01
date=20160401
Version=123.456.789 == 123456789
Literal=3.4.5 == 3004005
We have target specific vars
MAN= make.1
save-dollars: 0 = $
save-dollars: 1 = $$
save-dollars: 2 = $$
save-dollars: False = $
save-dollars: True = $$
save-dollars: false = $
save-dollars: true = $$
save-dollars: Yes = $$
save-dollars: No = $
save-dollars: yes = $$
save-dollars: no = $
save-dollars: On = $$
save-dollars: Off = $
save-dollars: ON = $$
save-dollars: OFF = $
save-dollars: on = $$
save-dollars: off = $
export-appended: env
export-appended: env
export-appended: env mk
parse-dynamic: parse-dynamic parse-dynamic before
parse-dynamic: parse-dynamic parse-dynamic after
parse-dynamic: parse-dynamic parse-dynamic after
varerror-unclosed:begin
make: Unclosed variable ""
make: Unclosed variable "UNCLOSED"
make: Unclosed variable "UNCLOSED"
make: Unclosed variable "PATTERN"
make: Unclosed variable specification (expecting '}') for "UNCLOSED" (value "") modifier M
make: Unclosed variable "param"
make: Unclosed variable "UNCLOSED."
make: Unclosed variable "UNCLOSED.1"
make: Unclosed variable "UNCLOSED.2"
make: Unclosed variable "UNCLOSED.3"
make: Unclosed variable "UNCLOSED_ORIG"
varerror-unclosed:end
exit status 0