xref: /freebsd/contrib/bmake/unit-tests/varmod-assign.exp (revision 96190b4fef3b4a0cc3ca0606b0c4e3e69a5e6717)
1Global: param = twice
2Global: VARNAME = VAR.$${param}
3Var_Parse: ${VARNAME} (eval)
4Global: VAR.${param} = initial-value
5Var_Parse: ${${VARNAME}::=assigned-value} (eval-defined)
6Var_Parse: ${VARNAME}::=assigned-value} (eval-defined)
7Evaluating modifier ${VAR.${param}::...} on value "initial-value"
8Modifier part: "assigned-value"
9Global: VAR.${param} = assigned-value
10Result of ${VAR.${param}::=assigned-value} is ""
11Var_Parse: ${${VARNAME}} != "assigned-value" (eval-defined)
12Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined)
13Global: .MAKEFLAGS =  -r -k -d v -d
14Global: .MAKEFLAGS =  -r -k -d v -d 0
15Var_Parse: ${CMD_CMD_VAR::=new-value}  || ${CMD_GLOBAL_VAR::=new-value}  || ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
16Evaluating modifier ${CMD_CMD_VAR::...} on value "cmd-value"
17Modifier part: "new-value"
18Command: CMD_CMD_VAR = new-value
19Global: .MAKEOVERRIDES =  FIRST LAST LAST LAST APPENDED RAN RAN RAN IT1 THEN1 IE2 ELSE2 CMD_CMD_VAR CMD_CMD_VAR
20Result of ${CMD_CMD_VAR::=new-value} is ""
21Var_Parse: ${CMD_GLOBAL_VAR::=new-value}  || ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
22Evaluating modifier ${CMD_GLOBAL_VAR::...} on value "global-value"
23Modifier part: "new-value"
24Global: CMD_GLOBAL_VAR = new-value
25Result of ${CMD_GLOBAL_VAR::=new-value} is ""
26Var_Parse: ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
27Evaluating modifier ${CMD_ENV_VAR::...} on value "env-value"
28Modifier part: "new-value"
29Global: CMD_ENV_VAR = new-value
30Result of ${CMD_ENV_VAR::=new-value} is ""
31Var_Parse: ${CMD_NEW_VAR::=new-value}" (eval)
32Evaluating modifier ${CMD_NEW_VAR::...} on value "" (eval, undefined)
33Modifier part: "new-value"
34Global: ignoring delete 'CMD_NEW_VAR' as it is not found
35Command: CMD_NEW_VAR = new-value
36Global: .MAKEOVERRIDES =  FIRST LAST LAST LAST APPENDED RAN RAN RAN IT1 THEN1 IE2 ELSE2 CMD_CMD_VAR CMD_CMD_VAR CMD_NEW_VAR
37Result of ${CMD_NEW_VAR::=new-value} is "" (eval, undefined)
38Global: .MAKEFLAGS =  -r -k -d v -d 0 -d v -d
39Global: .MAKEFLAGS =  -r -k -d v -d 0 -d v -d 0
40make: in target "mod-assign-empty": while evaluating "${::=value}" with value "": Bad modifier ":"
41mod-assign-empty: value}
42make: in target "mod-assign-empty": while evaluating "${:Uvalue::=overwritten}" with value "value": Bad modifier ":"
43mod-assign-empty: overwritten}
44mod-assign-empty: VAR=overwritten
45make: in target "mod-assign-parse": while evaluating variable "ASSIGN" with value "": Unknown modifier ":x"
46
47sysv:y
48make: in target "mod-assign-parse": while evaluating variable "ASSIGN" with value "": Unfinished modifier ('}' missing)
49
50ok=word
51make: warning: in target "mod-assign-shell-error": while evaluating variable "SH_ERR" with value "previous": Command " echo word; (exit 13) " exited with status 13
52err=previous
53Command: TARGET_CMD_VAR = cmd-value
54Global: TARGET_GLOBAL_VAR = global-value
55target: TARGET_TARGET_VAR = target-value
56target: TARGET_TARGET_VAR = new-value
57Global: TARGET_GLOBAL_VAR = new-value
58Global: TARGET_ENV_VAR = new-value
59target: TARGET_NEW_VAR = new-value
60exit status 2
61