make: change debug log for variable evaluation flags to lowercase This makes them easier distinguishable from variable names since the latter are usually uppercase. No functional change outside debug mode.diff -r1.205 -r1.206 src/usr.bin/make/nonints.h
(rillig)
--- src/usr.bin/make/Attic/nonints.h 2021/03/15 12:15:03 1.205
+++ src/usr.bin/make/Attic/nonints.h 2021/03/15 15:39:13 1.206
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: nonints.h,v 1.205 2021/03/15 12:15:03 rillig Exp $ */ | 1 | /* $NetBSD: nonints.h,v 1.206 2021/03/15 15:39:13 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988, 1989, 1990, 1993 | 4 | * Copyright (c) 1988, 1989, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Adam de Boor. | 8 | * Adam de Boor. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -331,27 +331,27 @@ typedef struct VarEvalFlags { | @@ -331,27 +331,27 @@ typedef struct VarEvalFlags { | |||
331 | * CFLAGS := -I.. $(CFLAGS) | 331 | * CFLAGS := -I.. $(CFLAGS) | |
332 | * # If .INCLUDES (an undocumented special variable, by the | 332 | * # If .INCLUDES (an undocumented special variable, by the | |
333 | * # way) is still undefined, the updated CFLAGS becomes | 333 | * # way) is still undefined, the updated CFLAGS becomes | |
334 | * # "-I.. $(.INCLUDES)". | 334 | * # "-I.. $(.INCLUDES)". | |
335 | */ | 335 | */ | |
336 | Boolean keepUndef: 1; | 336 | Boolean keepUndef: 1; | |
337 | 337 | |||
338 | /* | 338 | /* | |
339 | * Without this padding, GCC 9.3.0 on NetBSD 9.99.80 generates larger | 339 | * Without this padding, GCC 9.3.0 on NetBSD 9.99.80 generates larger | |
340 | * code than necessary (1.2 kB), masking out the unused bits from the | 340 | * code than necessary (1.2 kB), masking out the unused bits from the | |
341 | * int (since that is the default representation of Boolean in make), | 341 | * int (since that is the default representation of Boolean in make), | |
342 | * even for initializers consisting entirely of constants. | 342 | * even for initializers consisting entirely of constants. | |
343 | */ | 343 | */ | |
344 | Boolean : 1; | 344 | Boolean : 0; | |
345 | } VarEvalFlags; | 345 | } VarEvalFlags; | |
346 | 346 | |||
347 | #define VARE_PARSE_ONLY (VarEvalFlags) { FALSE, FALSE, FALSE, FALSE } | 347 | #define VARE_PARSE_ONLY (VarEvalFlags) { FALSE, FALSE, FALSE, FALSE } | |
348 | #define VARE_WANTRES (VarEvalFlags) { TRUE, FALSE, FALSE, FALSE } | 348 | #define VARE_WANTRES (VarEvalFlags) { TRUE, FALSE, FALSE, FALSE } | |
349 | #define VARE_UNDEFERR (VarEvalFlags) { TRUE, TRUE, FALSE, FALSE } | 349 | #define VARE_UNDEFERR (VarEvalFlags) { TRUE, TRUE, FALSE, FALSE } | |
350 | #define VARE_KEEP_DOLLAR_UNDEF (VarEvalFlags) { TRUE, FALSE, TRUE, TRUE } | 350 | #define VARE_KEEP_DOLLAR_UNDEF (VarEvalFlags) { TRUE, FALSE, TRUE, TRUE } | |
351 | 351 | |||
352 | typedef enum VarSetFlags { | 352 | typedef enum VarSetFlags { | |
353 | VAR_SET_NONE = 0, | 353 | VAR_SET_NONE = 0, | |
354 | 354 | |||
355 | /* do not export */ | 355 | /* do not export */ | |
356 | VAR_SET_NO_EXPORT = 1 << 0, | 356 | VAR_SET_NO_EXPORT = 1 << 0, | |
357 | 357 |
--- src/usr.bin/make/var.c 2021/03/15 12:15:03 1.885
+++ src/usr.bin/make/var.c 2021/03/15 15:39:13 1.886
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: var.c,v 1.885 2021/03/15 12:15:03 rillig Exp $ */ | 1 | /* $NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1988, 1989, 1990, 1993 | 4 | * Copyright (c) 1988, 1989, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * Adam de Boor. | 8 | * Adam de Boor. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -130,27 +130,27 @@ | @@ -130,27 +130,27 @@ | |||
130 | #include <regex.h> | 130 | #include <regex.h> | |
131 | #endif | 131 | #endif | |
132 | #include <errno.h> | 132 | #include <errno.h> | |
133 | #include <inttypes.h> | 133 | #include <inttypes.h> | |
134 | #include <limits.h> | 134 | #include <limits.h> | |
135 | #include <time.h> | 135 | #include <time.h> | |
136 | 136 | |||
137 | #include "make.h" | 137 | #include "make.h" | |
138 | #include "dir.h" | 138 | #include "dir.h" | |
139 | #include "job.h" | 139 | #include "job.h" | |
140 | #include "metachar.h" | 140 | #include "metachar.h" | |
141 | 141 | |||
142 | /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ | 142 | /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ | |
143 | MAKE_RCSID("$NetBSD: var.c,v 1.885 2021/03/15 12:15:03 rillig Exp $"); | 143 | MAKE_RCSID("$NetBSD: var.c,v 1.886 2021/03/15 15:39:13 rillig Exp $"); | |
144 | 144 | |||
145 | typedef enum VarFlags { | 145 | typedef enum VarFlags { | |
146 | VFL_NONE = 0, | 146 | VFL_NONE = 0, | |
147 | 147 | |||
148 | /* | 148 | /* | |
149 | * The variable's value is currently being used by Var_Parse or | 149 | * The variable's value is currently being used by Var_Parse or | |
150 | * Var_Subst. This marker is used to avoid endless recursion. | 150 | * Var_Subst. This marker is used to avoid endless recursion. | |
151 | */ | 151 | */ | |
152 | VFL_IN_USE = 1 << 0, | 152 | VFL_IN_USE = 1 << 0, | |
153 | 153 | |||
154 | /* | 154 | /* | |
155 | * The variable comes from the environment. | 155 | * The variable comes from the environment. | |
156 | * These variables are not registered in any GNode, therefore they | 156 | * These variables are not registered in any GNode, therefore they | |
@@ -257,57 +257,45 @@ typedef struct VarPatternFlags { | @@ -257,57 +257,45 @@ typedef struct VarPatternFlags { | |||
257 | Boolean anchorStart: 1; | 257 | Boolean anchorStart: 1; | |
258 | /* Match at end of word ('$') */ | 258 | /* Match at end of word ('$') */ | |
259 | Boolean anchorEnd: 1; | 259 | Boolean anchorEnd: 1; | |
260 | } VarPatternFlags; | 260 | } VarPatternFlags; | |
261 | 261 | |||
262 | /* SepBuf builds a string from words interleaved with separators. */ | 262 | /* SepBuf builds a string from words interleaved with separators. */ | |
263 | typedef struct SepBuf { | 263 | typedef struct SepBuf { | |
264 | Buffer buf; | 264 | Buffer buf; | |
265 | Boolean needSep; | 265 | Boolean needSep; | |
266 | /* Usually ' ', but see the ':ts' modifier. */ | 266 | /* Usually ' ', but see the ':ts' modifier. */ | |
267 | char sep; | 267 | char sep; | |
268 | } SepBuf; | 268 | } SepBuf; | |
269 | 269 | |||
270 | enum { | |||
271 | VarEvalFlags_ToStringSize = sizeof | |||
272 | "VARE_UNDEFERR|VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF" | |||
273 | }; | |||
274 | ||||
275 | MAKE_INLINE char * | |||
276 | str_append(char *dst, const char *src) | |||
277 | { | |||
278 | size_t len = strlen(src); | |||
279 | memcpy(dst, src, len); | |||
280 | return dst + len; | |||
281 | } | |||
282 | ||||
283 | static const char * | 270 | static const char * | |
284 | VarEvalFlags_ToString(char *buf, VarEvalFlags eflags) | 271 | VarEvalFlags_ToString(VarEvalFlags eflags) | |
285 | { | 272 | { | |
286 | char *p = buf; | 273 | if (!eflags.wantRes) { | |
287 | 274 | assert(!eflags.undefErr); | ||
288 | /* TODO: WANTRES should be mentioned before UNDEFERR */ | 275 | assert(!eflags.keepDollar && !eflags.keepUndef); | |
289 | if (eflags.undefErr) | 276 | return "parse-only"; | |
290 | p = str_append(p, "VARE_UNDEFERR|"); | 277 | } | |
291 | if (eflags.wantRes) | 278 | if (eflags.undefErr) { | |
292 | p = str_append(p, "VARE_WANTRES|"); | 279 | assert(!eflags.keepDollar && !eflags.keepUndef); | |
280 | return "eval-defined"; | |||
281 | } | |||
282 | if (eflags.keepDollar && eflags.keepUndef) | |||
283 | return "eval-keep-dollar-and-undefined"; | |||
293 | if (eflags.keepDollar) | 284 | if (eflags.keepDollar) | |
294 | p = str_append(p, "VARE_KEEP_DOLLAR|"); | 285 | return "eval-keep-dollar"; | |
295 | if (eflags.keepUndef) | 286 | if (eflags.keepUndef) | |
296 | p = str_append(p, "VARE_KEEP_UNDEF|"); | 287 | return "eval-keep-undefined"; | |
297 | if (p == buf) | 288 | return "eval"; | |
298 | return "none"; | |||
299 | p[-1] = '\0'; | |||
300 | return buf; | |||
301 | } | 289 | } | |
302 | 290 | |||
303 | /* | 291 | /* | |
304 | * This lets us tell if we have replaced the original environ | 292 | * This lets us tell if we have replaced the original environ | |
305 | * (which we cannot free). | 293 | * (which we cannot free). | |
306 | */ | 294 | */ | |
307 | char **savedEnv = NULL; | 295 | char **savedEnv = NULL; | |
308 | 296 | |||
309 | /* | 297 | /* | |
310 | * Special return value for Var_Parse, indicating a parse error. It may be | 298 | * Special return value for Var_Parse, indicating a parse error. It may be | |
311 | * caused by an undefined variable, a syntax error in a modifier or | 299 | * caused by an undefined variable, a syntax error in a modifier or | |
312 | * something entirely different. | 300 | * something entirely different. | |
313 | */ | 301 | */ | |
@@ -3608,53 +3596,51 @@ ApplyModifier_SunShell(const char **pp, | @@ -3608,53 +3596,51 @@ ApplyModifier_SunShell(const char **pp, | |||
3608 | if (errfmt != NULL) | 3596 | if (errfmt != NULL) | |
3609 | Error(errfmt, expr->value.str); | 3597 | Error(errfmt, expr->value.str); | |
3610 | Expr_SetValueOwn(expr, output); | 3598 | Expr_SetValueOwn(expr, output); | |
3611 | } | 3599 | } | |
3612 | 3600 | |||
3613 | return AMR_OK; | 3601 | return AMR_OK; | |
3614 | } | 3602 | } | |
3615 | #endif | 3603 | #endif | |
3616 | 3604 | |||
3617 | static void | 3605 | static void | |
3618 | LogBeforeApply(const ApplyModifiersState *st, const char *mod) | 3606 | LogBeforeApply(const ApplyModifiersState *st, const char *mod) | |
3619 | { | 3607 | { | |
3620 | const Expr *expr = st->expr; | 3608 | const Expr *expr = st->expr; | |
3621 | char eflags_str[VarEvalFlags_ToStringSize]; | |||
3622 | char vflags_str[VarFlags_ToStringSize]; | 3609 | char vflags_str[VarFlags_ToStringSize]; | |
3623 | Boolean is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], st); | 3610 | Boolean is_single_char = mod[0] != '\0' && IsDelimiter(mod[1], st); | |
3624 | 3611 | |||
3625 | /* At this point, only the first character of the modifier can | 3612 | /* At this point, only the first character of the modifier can | |
3626 | * be used since the end of the modifier is not yet known. */ | 3613 | * be used since the end of the modifier is not yet known. */ | |
3627 | debug_printf("Applying ${%s:%c%s} to \"%s\" (%s, %s, %s)\n", | 3614 | debug_printf("Applying ${%s:%c%s} to \"%s\" (%s, %s, %s)\n", | |
3628 | expr->var->name.str, mod[0], is_single_char ? "" : "...", | 3615 | expr->var->name.str, mod[0], is_single_char ? "" : "...", | |
3629 | expr->value.str, | 3616 | expr->value.str, | |
3630 | VarEvalFlags_ToString(eflags_str, expr->eflags), | 3617 | VarEvalFlags_ToString(expr->eflags), | |
3631 | VarFlags_ToString(vflags_str, expr->var->flags), | 3618 | VarFlags_ToString(vflags_str, expr->var->flags), | |
3632 | ExprDefined_Name[expr->defined]); | 3619 | ExprDefined_Name[expr->defined]); | |
3633 | } | 3620 | } | |
3634 | 3621 | |||
3635 | static void | 3622 | static void | |
3636 | LogAfterApply(const ApplyModifiersState *st, const char *p, const char *mod) | 3623 | LogAfterApply(const ApplyModifiersState *st, const char *p, const char *mod) | |
3637 | { | 3624 | { | |
3638 | const Expr *expr = st->expr; | 3625 | const Expr *expr = st->expr; | |
3639 | const char *value = expr->value.str; | 3626 | const char *value = expr->value.str; | |
3640 | char eflags_str[VarEvalFlags_ToStringSize]; | |||
3641 | char vflags_str[VarFlags_ToStringSize]; | 3627 | char vflags_str[VarFlags_ToStringSize]; | |
3642 | const char *quot = value == var_Error ? "" : "\""; | 3628 | const char *quot = value == var_Error ? "" : "\""; | |
3643 | 3629 | |||
3644 | debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s, %s)\n", | 3630 | debug_printf("Result of ${%s:%.*s} is %s%s%s (%s, %s, %s)\n", | |
3645 | expr->var->name.str, (int)(p - mod), mod, | 3631 | expr->var->name.str, (int)(p - mod), mod, | |
3646 | quot, value == var_Error ? "error" : value, quot, | 3632 | quot, value == var_Error ? "error" : value, quot, | |
3647 | VarEvalFlags_ToString(eflags_str, expr->eflags), | 3633 | VarEvalFlags_ToString(expr->eflags), | |
3648 | VarFlags_ToString(vflags_str, expr->var->flags), | 3634 | VarFlags_ToString(vflags_str, expr->var->flags), | |
3649 | ExprDefined_Name[expr->defined]); | 3635 | ExprDefined_Name[expr->defined]); | |
3650 | } | 3636 | } | |
3651 | 3637 | |||
3652 | static ApplyModifierResult | 3638 | static ApplyModifierResult | |
3653 | ApplyModifier(const char **pp, ApplyModifiersState *st) | 3639 | ApplyModifier(const char **pp, ApplyModifiersState *st) | |
3654 | { | 3640 | { | |
3655 | switch (**pp) { | 3641 | switch (**pp) { | |
3656 | case '!': | 3642 | case '!': | |
3657 | return ApplyModifier_ShellCommand(pp, st); | 3643 | return ApplyModifier_ShellCommand(pp, st); | |
3658 | case ':': | 3644 | case ':': | |
3659 | return ApplyModifier_Assign(pp, st); | 3645 | return ApplyModifier_Assign(pp, st); | |
3660 | case '?': | 3646 | case '?': | |
@@ -4328,44 +4314,43 @@ Var_Parse(const char **pp, GNode *scope, | @@ -4328,44 +4314,43 @@ Var_Parse(const char **pp, GNode *scope, | |||
4328 | /* TRUE if have modifiers for the variable. */ | 4314 | /* TRUE if have modifiers for the variable. */ | |
4329 | Boolean haveModifier; | 4315 | Boolean haveModifier; | |
4330 | /* Starting character if variable in parens or braces. */ | 4316 | /* Starting character if variable in parens or braces. */ | |
4331 | char startc; | 4317 | char startc; | |
4332 | /* Ending character if variable in parens or braces. */ | 4318 | /* Ending character if variable in parens or braces. */ | |
4333 | char endc; | 4319 | char endc; | |
4334 | /* | 4320 | /* | |
4335 | * TRUE if the variable is local and we're expanding it in a | 4321 | * TRUE if the variable is local and we're expanding it in a | |
4336 | * non-local scope. This is done to support dynamic sources. | 4322 | * non-local scope. This is done to support dynamic sources. | |
4337 | * The result is just the expression, unaltered. | 4323 | * The result is just the expression, unaltered. | |
4338 | */ | 4324 | */ | |
4339 | Boolean dynamic; | 4325 | Boolean dynamic; | |
4340 | const char *extramodifiers; | 4326 | const char *extramodifiers; | |
4341 | char eflags_str[VarEvalFlags_ToStringSize]; | |||
4342 | Var *v; | 4327 | Var *v; | |
4343 | 4328 | |||
4344 | Expr expr = { | 4329 | Expr expr = { | |
4345 | NULL, | 4330 | NULL, | |
4346 | #if defined(lint) | 4331 | #if defined(lint) | |
4347 | /* NetBSD lint cannot fully parse C99 struct initializers. */ | 4332 | /* NetBSD lint cannot fully parse C99 struct initializers. */ | |
4348 | { NULL, NULL }, | 4333 | { NULL, NULL }, | |
4349 | #else | 4334 | #else | |
4350 | FStr_InitRefer(NULL), | 4335 | FStr_InitRefer(NULL), | |
4351 | #endif | 4336 | #endif | |
4352 | eflags, | 4337 | eflags, | |
4353 | scope, | 4338 | scope, | |
4354 | DEF_REGULAR | 4339 | DEF_REGULAR | |
4355 | }; | 4340 | }; | |
4356 | 4341 | |||
4357 | DEBUG2(VAR, "Var_Parse: %s with %s\n", start, | 4342 | DEBUG2(VAR, "Var_Parse: %s (%s)\n", start, | |
4358 | VarEvalFlags_ToString(eflags_str, eflags)); | 4343 | VarEvalFlags_ToString(eflags)); | |
4359 | 4344 | |||
4360 | *out_val = FStr_InitRefer(NULL); | 4345 | *out_val = FStr_InitRefer(NULL); | |
4361 | extramodifiers = NULL; /* extra modifiers to apply first */ | 4346 | extramodifiers = NULL; /* extra modifiers to apply first */ | |
4362 | dynamic = FALSE; | 4347 | dynamic = FALSE; | |
4363 | 4348 | |||
4364 | /* | 4349 | /* | |
4365 | * Appease GCC, which thinks that the variable might not be | 4350 | * Appease GCC, which thinks that the variable might not be | |
4366 | * initialized. | 4351 | * initialized. | |
4367 | */ | 4352 | */ | |
4368 | endc = '\0'; | 4353 | endc = '\0'; | |
4369 | 4354 | |||
4370 | startc = p[1]; | 4355 | startc = p[1]; | |
4371 | if (startc != '(' && startc != '{') { | 4356 | if (startc != '(' && startc != '{') { |
--- src/usr.bin/make/unit-tests/deptgt-makeflags.exp 2020/11/08 02:31:24 1.3
+++ src/usr.bin/make/unit-tests/deptgt-makeflags.exp 2021/03/15 15:39:13 1.4
@@ -1,10 +1,10 @@ | @@ -1,10 +1,10 @@ | |||
1 | Global:delete DOLLAR (not found) | 1 | Global:delete DOLLAR (not found) | |
2 | Command:DOLLAR = $$$$ | 2 | Command:DOLLAR = $$$$ | |
3 | Global:.MAKEOVERRIDES = VAR DOLLAR | 3 | Global:.MAKEOVERRIDES = VAR DOLLAR | |
4 | CondParser_Eval: ${DOLLAR} != "\$\$" | 4 | CondParser_Eval: ${DOLLAR} != "\$\$" | |
5 | Var_Parse: ${DOLLAR} != "\$\$" with VARE_UNDEFERR|VARE_WANTRES | 5 | Var_Parse: ${DOLLAR} != "\$\$" (eval-defined) | |
6 | lhs = "$$", rhs = "$$", op = != | 6 | lhs = "$$", rhs = "$$", op = != | |
7 | Global:.MAKEFLAGS = -r -k -D VAR -D VAR -d cv -d | 7 | Global:.MAKEFLAGS = -r -k -D VAR -D VAR -d cv -d | |
8 | Global:.MAKEFLAGS = -r -k -D VAR -D VAR -d cv -d 0 | 8 | Global:.MAKEFLAGS = -r -k -D VAR -D VAR -d cv -d 0 | |
9 | make: Unterminated quoted string [make VAR=initial UNBALANCED='] | 9 | make: Unterminated quoted string [make VAR=initial UNBALANCED='] | |
10 | exit status 0 | 10 | exit status 0 |
--- src/usr.bin/make/unit-tests/directive-export-impl.exp 2021/02/16 16:28:41 1.4
+++ src/usr.bin/make/unit-tests/directive-export-impl.exp 2021/03/15 15:39:13 1.5
@@ -1,56 +1,56 @@ | @@ -1,56 +1,56 @@ | |||
1 | ParseReadLine (21): 'UT_VAR= <${REF}>' | 1 | ParseReadLine (21): 'UT_VAR= <${REF}>' | |
2 | Global:UT_VAR = <${REF}> | 2 | Global:UT_VAR = <${REF}> | |
3 | ParseReadLine (28): '.export UT_VAR' | 3 | ParseReadLine (28): '.export UT_VAR' | |
4 | Global:.MAKE.EXPORTED = UT_VAR | 4 | Global:.MAKE.EXPORTED = UT_VAR | |
5 | ParseReadLine (32): ': ${UT_VAR:N*}' | 5 | ParseReadLine (32): ': ${UT_VAR:N*}' | |
6 | Var_Parse: ${UT_VAR:N*} with VARE_UNDEFERR|VARE_WANTRES | 6 | Var_Parse: ${UT_VAR:N*} (eval-defined) | |
7 | Var_Parse: ${REF}> with VARE_UNDEFERR|VARE_WANTRES | 7 | Var_Parse: ${REF}> (eval-defined) | |
8 | Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular) | 8 | Applying ${UT_VAR:N...} to "<>" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular) | |
9 | Pattern[UT_VAR] for [<>] is [*] | 9 | Pattern[UT_VAR] for [<>] is [*] | |
10 | ModifyWords: split "<>" into 1 words | 10 | ModifyWords: split "<>" into 1 words | |
11 | Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular) | 11 | Result of ${UT_VAR:N*} is "" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular) | |
12 | ParseDoDependency(: ) | 12 | ParseDoDependency(: ) | |
13 | CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>" | 13 | CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<>" | |
14 | Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" with VARE_UNDEFERR|VARE_WANTRES | 14 | Var_Parse: ${:!echo "\$UT_VAR"!} != "<>" (eval-defined) | |
15 | Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 15 | Applying ${:!...} to "" (eval-defined, none, undefined) | |
16 | Modifier part: "echo "$UT_VAR"" | 16 | Modifier part: "echo "$UT_VAR"" | |
17 | Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES | 17 | Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) | |
18 | Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, regular) | 18 | Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (eval, none, regular) | |
19 | Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, regular) | 19 | Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, none, regular) | |
20 | Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, regular) | 20 | Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (eval, none, regular) | |
21 | Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, regular) | 21 | Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, none, regular) | |
22 | Var_Parse: ${UT_VAR} with VARE_WANTRES | 22 | Var_Parse: ${UT_VAR} (eval) | |
23 | Var_Parse: ${REF}> with VARE_WANTRES | 23 | Var_Parse: ${REF}> (eval) | |
24 | Result of ${:!echo "\$UT_VAR"!} is "<>" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 24 | Result of ${:!echo "\$UT_VAR"!} is "<>" (eval-defined, none, defined) | |
25 | lhs = "<>", rhs = "<>", op = != | 25 | lhs = "<>", rhs = "<>", op = != | |
26 | ParseReadLine (49): ': ${UT_VAR:N*}' | 26 | ParseReadLine (49): ': ${UT_VAR:N*}' | |
27 | Var_Parse: ${UT_VAR:N*} with VARE_UNDEFERR|VARE_WANTRES | 27 | Var_Parse: ${UT_VAR:N*} (eval-defined) | |
28 | Var_Parse: ${REF}> with VARE_UNDEFERR|VARE_WANTRES | 28 | Var_Parse: ${REF}> (eval-defined) | |
29 | Applying ${UT_VAR:N...} to "<>" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular) | 29 | Applying ${UT_VAR:N...} to "<>" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular) | |
30 | Pattern[UT_VAR] for [<>] is [*] | 30 | Pattern[UT_VAR] for [<>] is [*] | |
31 | ModifyWords: split "<>" into 1 words | 31 | ModifyWords: split "<>" into 1 words | |
32 | Result of ${UT_VAR:N*} is "" (VARE_UNDEFERR|VARE_WANTRES, VFL_EXPORTED|VFL_REEXPORT, regular) | 32 | Result of ${UT_VAR:N*} is "" (eval-defined, VFL_EXPORTED|VFL_REEXPORT, regular) | |
33 | ParseDoDependency(: ) | 33 | ParseDoDependency(: ) | |
34 | ParseReadLine (53): 'REF= defined' | 34 | ParseReadLine (53): 'REF= defined' | |
35 | Global:REF = defined | 35 | Global:REF = defined | |
36 | CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>" | 36 | CondParser_Eval: ${:!echo "\$UT_VAR"!} != "<defined>" | |
37 | Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" with VARE_UNDEFERR|VARE_WANTRES | 37 | Var_Parse: ${:!echo "\$UT_VAR"!} != "<defined>" (eval-defined) | |
38 | Applying ${:!...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 38 | Applying ${:!...} to "" (eval-defined, none, undefined) | |
39 | Modifier part: "echo "$UT_VAR"" | 39 | Modifier part: "echo "$UT_VAR"" | |
40 | Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES | 40 | Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) | |
41 | Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (VARE_WANTRES, none, regular) | 41 | Applying ${.MAKE.EXPORTED:O} to "UT_VAR" (eval, none, regular) | |
42 | Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (VARE_WANTRES, none, regular) | 42 | Result of ${.MAKE.EXPORTED:O} is "UT_VAR" (eval, none, regular) | |
43 | Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (VARE_WANTRES, none, regular) | 43 | Applying ${.MAKE.EXPORTED:u} to "UT_VAR" (eval, none, regular) | |
44 | Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (VARE_WANTRES, none, regular) | 44 | Result of ${.MAKE.EXPORTED:u} is "UT_VAR" (eval, none, regular) | |
45 | Var_Parse: ${UT_VAR} with VARE_WANTRES | 45 | Var_Parse: ${UT_VAR} (eval) | |
46 | Var_Parse: ${REF}> with VARE_WANTRES | 46 | Var_Parse: ${REF}> (eval) | |
47 | Result of ${:!echo "\$UT_VAR"!} is "<defined>" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 47 | Result of ${:!echo "\$UT_VAR"!} is "<defined>" (eval-defined, none, defined) | |
48 | lhs = "<defined>", rhs = "<defined>", op = != | 48 | lhs = "<defined>", rhs = "<defined>", op = != | |
49 | ParseReadLine (61): 'all:' | 49 | ParseReadLine (61): 'all:' | |
50 | ParseDoDependency(all:) | 50 | ParseDoDependency(all:) | |
51 | Global:.ALLTARGETS = all | 51 | Global:.ALLTARGETS = all | |
52 | ParseReadLine (62): '.MAKEFLAGS: -d0' | 52 | ParseReadLine (62): '.MAKEFLAGS: -d0' | |
53 | ParseDoDependency(.MAKEFLAGS: -d0) | 53 | ParseDoDependency(.MAKEFLAGS: -d0) | |
54 | Global:.MAKEFLAGS = -r -k -d cpv -d | 54 | Global:.MAKEFLAGS = -r -k -d cpv -d | |
55 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | 55 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | |
56 | exit status 0 | 56 | exit status 0 |
--- src/usr.bin/make/unit-tests/varmod-defined.exp 2021/02/15 18:23:32 1.4
+++ src/usr.bin/make/unit-tests/varmod-defined.exp 2021/03/15 15:39:13 1.5
@@ -1,23 +1,23 @@ | @@ -1,23 +1,23 @@ | |||
1 | Global:8_DOLLARS = $$$$$$$$ | 1 | Global:8_DOLLARS = $$$$$$$$ | |
2 | Global:VAR = | 2 | Global:VAR = | |
3 | Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 3 | Var_Parse: ${8_DOLLARS} (eval-keep-dollar-and-undefined) | |
4 | Global:VAR = $$$$$$$$ | 4 | Global:VAR = $$$$$$$$ | |
5 | Var_Parse: ${VAR:D${8_DOLLARS}} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 5 | Var_Parse: ${VAR:D${8_DOLLARS}} (eval-keep-dollar-and-undefined) | |
6 | Applying ${VAR:D...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular) | 6 | Applying ${VAR:D...} to "$$$$$$$$" (eval-keep-dollar-and-undefined, none, regular) | |
7 | Var_Parse: ${8_DOLLARS}} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 7 | Var_Parse: ${8_DOLLARS}} (eval-keep-dollar-and-undefined) | |
8 | Result of ${VAR:D${8_DOLLARS}} is "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular) | 8 | Result of ${VAR:D${8_DOLLARS}} is "$$$$$$$$" (eval-keep-dollar-and-undefined, none, regular) | |
9 | Global:VAR = $$$$$$$$ | 9 | Global:VAR = $$$$$$$$ | |
10 | Var_Parse: ${VAR:@var@${8_DOLLARS}@} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 10 | Var_Parse: ${VAR:@var@${8_DOLLARS}@} (eval-keep-dollar-and-undefined) | |
11 | Applying ${VAR:@...} to "$$$$$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular) | 11 | Applying ${VAR:@...} to "$$$$$$$$" (eval-keep-dollar-and-undefined, none, regular) | |
12 | Modifier part: "var" | 12 | Modifier part: "var" | |
13 | Modifier part: "${8_DOLLARS}" | 13 | Modifier part: "${8_DOLLARS}" | |
14 | ModifyWords: split "$$$$$$$$" into 1 words | 14 | ModifyWords: split "$$$$$$$$" into 1 words | |
15 | Global:var = $$$$$$$$ | 15 | Global:var = $$$$$$$$ | |
16 | Var_Parse: ${8_DOLLARS} with VARE_WANTRES|VARE_KEEP_UNDEF | 16 | Var_Parse: ${8_DOLLARS} (eval-keep-undefined) | |
17 | ModifyWord_Loop: in "$$$$$$$$", replace "var" with "${8_DOLLARS}" to "$$$$" | 17 | ModifyWord_Loop: in "$$$$$$$$", replace "var" with "${8_DOLLARS}" to "$$$$" | |
18 | Global:delete var | 18 | Global:delete var | |
19 | Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, regular) | 19 | Result of ${VAR:@var@${8_DOLLARS}@} is "$$$$" (eval-keep-dollar-and-undefined, none, regular) | |
20 | Global:VAR = $$$$ | 20 | Global:VAR = $$$$ | |
21 | Global:.MAKEFLAGS = -r -k -d v -d | 21 | Global:.MAKEFLAGS = -r -k -d v -d | |
22 | Global:.MAKEFLAGS = -r -k -d v -d 0 | 22 | Global:.MAKEFLAGS = -r -k -d v -d 0 | |
23 | exit status 0 | 23 | exit status 0 |
--- src/usr.bin/make/unit-tests/directive-unexport-env.exp 2021/02/15 18:23:32 1.5
+++ src/usr.bin/make/unit-tests/directive-unexport-env.exp 2021/03/15 15:39:13 1.6
@@ -1,18 +1,18 @@ | @@ -1,18 +1,18 @@ | |||
1 | make: "directive-unexport-env.mk" line 13: Unknown directive "unexport-en" | 1 | make: "directive-unexport-env.mk" line 13: Unknown directive "unexport-en" | |
2 | make: "directive-unexport-env.mk" line 15: Unknown directive "unexport-environment" | 2 | make: "directive-unexport-env.mk" line 15: Unknown directive "unexport-environment" | |
3 | Global:UT_EXPORTED = value | 3 | Global:UT_EXPORTED = value | |
4 | Global:UT_UNEXPORTED = value | 4 | Global:UT_UNEXPORTED = value | |
5 | Global:.MAKE.EXPORTED = UT_EXPORTED | 5 | Global:.MAKE.EXPORTED = UT_EXPORTED | |
6 | make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments | 6 | make: "directive-unexport-env.mk" line 21: The directive .unexport-env does not take arguments | |
7 | Var_Parse: ${.MAKE.EXPORTED:O:u} with VARE_WANTRES | 7 | Var_Parse: ${.MAKE.EXPORTED:O:u} (eval) | |
8 | Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (VARE_WANTRES, none, regular) | 8 | Applying ${.MAKE.EXPORTED:O} to "UT_EXPORTED" (eval, none, regular) | |
9 | Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (VARE_WANTRES, none, regular) | 9 | Result of ${.MAKE.EXPORTED:O} is "UT_EXPORTED" (eval, none, regular) | |
10 | Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (VARE_WANTRES, none, regular) | 10 | Applying ${.MAKE.EXPORTED:u} to "UT_EXPORTED" (eval, none, regular) | |
11 | Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (VARE_WANTRES, none, regular) | 11 | Result of ${.MAKE.EXPORTED:u} is "UT_EXPORTED" (eval, none, regular) | |
12 | Unexporting "UT_EXPORTED" | 12 | Unexporting "UT_EXPORTED" | |
13 | Global:delete .MAKE.EXPORTED | 13 | Global:delete .MAKE.EXPORTED | |
14 | Global:.MAKEFLAGS = -r -k -d v -d | 14 | Global:.MAKEFLAGS = -r -k -d v -d | |
15 | Global:.MAKEFLAGS = -r -k -d v -d 0 | 15 | Global:.MAKEFLAGS = -r -k -d v -d 0 | |
16 | make: Fatal errors encountered -- cannot continue | 16 | make: Fatal errors encountered -- cannot continue | |
17 | make: stopped in unit-tests | 17 | make: stopped in unit-tests | |
18 | exit status 1 | 18 | exit status 1 |
--- src/usr.bin/make/unit-tests/var-op-append.exp 2021/02/15 18:23:32 1.5
+++ src/usr.bin/make/unit-tests/var-op-append.exp 2021/03/15 15:39:13 1.6
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | Var_Parse: ${:U\$\$\$\$\$\$\$\$} with VARE_WANTRES | 1 | Var_Parse: ${:U\$\$\$\$\$\$\$\$} (eval) | |
2 | Applying ${:U...} to "" (VARE_WANTRES, none, undefined) | 2 | Applying ${:U...} to "" (eval, none, undefined) | |
3 | Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (VARE_WANTRES, none, defined) | 3 | Result of ${:U\$\$\$\$\$\$\$\$} is "$$$$$$$$" (eval, none, defined) | |
4 | Global:VAR.$$$$$$$$ = dollars | 4 | Global:VAR.$$$$$$$$ = dollars | |
5 | Global:.MAKEFLAGS = -r -k -d v -d | 5 | Global:.MAKEFLAGS = -r -k -d v -d | |
6 | Global:.MAKEFLAGS = -r -k -d v -d 0 | 6 | Global:.MAKEFLAGS = -r -k -d v -d 0 | |
7 | exit status 0 | 7 | exit status 0 |
--- src/usr.bin/make/unit-tests/var-eval-short.exp 2021/03/14 20:41:39 1.7
+++ src/usr.bin/make/unit-tests/var-eval-short.exp 2021/03/15 15:39:13 1.8
@@ -1,27 +1,27 @@ | @@ -1,27 +1,27 @@ | |||
1 | make: "var-eval-short.mk" line 77: Invalid time value: ${FAIL}} | 1 | make: "var-eval-short.mk" line 77: Invalid time value: ${FAIL}} | |
2 | make: "var-eval-short.mk" line 77: Malformed conditional (0 && ${:Uword:gmtime=${FAIL}}) | 2 | make: "var-eval-short.mk" line 77: Malformed conditional (0 && ${:Uword:gmtime=${FAIL}}) | |
3 | make: "var-eval-short.mk" line 91: Invalid time value: ${FAIL}} | 3 | make: "var-eval-short.mk" line 91: Invalid time value: ${FAIL}} | |
4 | make: "var-eval-short.mk" line 91: Malformed conditional (0 && ${:Uword:localtime=${FAIL}}) | 4 | make: "var-eval-short.mk" line 91: Malformed conditional (0 && ${:Uword:localtime=${FAIL}}) | |
5 | CondParser_Eval: 0 && ${0:?${FAIL}then:${FAIL}else} | 5 | CondParser_Eval: 0 && ${0:?${FAIL}then:${FAIL}else} | |
6 | Var_Parse: ${0:?${FAIL}then:${FAIL}else} with none | 6 | Var_Parse: ${0:?${FAIL}then:${FAIL}else} (parse-only) | |
7 | Applying ${0:?...} to "" (none, none, undefined) | 7 | Applying ${0:?...} to "" (parse-only, none, undefined) | |
8 | Modifier part: "${FAIL}then" | 8 | Modifier part: "${FAIL}then" | |
9 | Modifier part: "${FAIL}else" | 9 | Modifier part: "${FAIL}else" | |
10 | Result of ${0:?${FAIL}then:${FAIL}else} is "" (none, none, defined) | 10 | Result of ${0:?${FAIL}then:${FAIL}else} is "" (parse-only, none, defined) | |
11 | ParseReadLine (156): 'DEFINED= defined' | 11 | ParseReadLine (156): 'DEFINED= defined' | |
12 | Global:DEFINED = defined | 12 | Global:DEFINED = defined | |
13 | CondParser_Eval: 0 && ${DEFINED:L:?${FAIL}then:${FAIL}else} | 13 | CondParser_Eval: 0 && ${DEFINED:L:?${FAIL}then:${FAIL}else} | |
14 | Var_Parse: ${DEFINED:L:?${FAIL}then:${FAIL}else} with none | 14 | Var_Parse: ${DEFINED:L:?${FAIL}then:${FAIL}else} (parse-only) | |
15 | Applying ${DEFINED:L} to "defined" (none, none, regular) | 15 | Applying ${DEFINED:L} to "defined" (parse-only, none, regular) | |
16 | Result of ${DEFINED:L} is "defined" (none, none, regular) | 16 | Result of ${DEFINED:L} is "defined" (parse-only, none, regular) | |
17 | Applying ${DEFINED:?...} to "defined" (none, none, regular) | 17 | Applying ${DEFINED:?...} to "defined" (parse-only, none, regular) | |
18 | Modifier part: "${FAIL}then" | 18 | Modifier part: "${FAIL}then" | |
19 | Modifier part: "${FAIL}else" | 19 | Modifier part: "${FAIL}else" | |
20 | Result of ${DEFINED:?${FAIL}then:${FAIL}else} is "defined" (none, none, regular) | 20 | Result of ${DEFINED:?${FAIL}then:${FAIL}else} is "defined" (parse-only, none, regular) | |
21 | ParseReadLine (159): '.MAKEFLAGS: -d0' | 21 | ParseReadLine (159): '.MAKEFLAGS: -d0' | |
22 | ParseDoDependency(.MAKEFLAGS: -d0) | 22 | ParseDoDependency(.MAKEFLAGS: -d0) | |
23 | Global:.MAKEFLAGS = -r -k -d cpv -d | 23 | Global:.MAKEFLAGS = -r -k -d cpv -d | |
24 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | 24 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | |
25 | make: Fatal errors encountered -- cannot continue | 25 | make: Fatal errors encountered -- cannot continue | |
26 | make: stopped in unit-tests | 26 | make: stopped in unit-tests | |
27 | exit status 1 | 27 | exit status 1 |
--- src/usr.bin/make/unit-tests/varmod-match-escape.exp 2021/02/15 18:23:32 1.7
+++ src/usr.bin/make/unit-tests/varmod-match-escape.exp 2021/03/15 15:39:13 1.8
@@ -1,61 +1,61 @@ | @@ -1,61 +1,61 @@ | |||
1 | Global:SPECIALS = \: : \\ * \* | 1 | Global:SPECIALS = \: : \\ * \* | |
2 | CondParser_Eval: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} | 2 | CondParser_Eval: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} | |
3 | Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES | 3 | Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} (eval-defined) | |
4 | Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 4 | Applying ${SPECIALS:M...} to "\: : \\ * \*" (eval-defined, none, regular) | |
5 | Var_Parse: ${:U}\: with VARE_UNDEFERR|VARE_WANTRES | 5 | Var_Parse: ${:U}\: (eval-defined) | |
6 | Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 6 | Applying ${:U} to "" (eval-defined, none, undefined) | |
7 | Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 7 | Result of ${:U} is "" (eval-defined, none, defined) | |
8 | Pattern[SPECIALS] for [\: : \\ * \*] is [\:] | 8 | Pattern[SPECIALS] for [\: : \\ * \*] is [\:] | |
9 | ModifyWords: split "\: : \\ * \*" into 5 words | 9 | ModifyWords: split "\: : \\ * \*" into 5 words | |
10 | VarMatch [\:] [\:] | 10 | VarMatch [\:] [\:] | |
11 | VarMatch [:] [\:] | 11 | VarMatch [:] [\:] | |
12 | VarMatch [\\] [\:] | 12 | VarMatch [\\] [\:] | |
13 | VarMatch [*] [\:] | 13 | VarMatch [*] [\:] | |
14 | VarMatch [\*] [\:] | 14 | VarMatch [\*] [\:] | |
15 | Result of ${SPECIALS:M${:U}\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 15 | Result of ${SPECIALS:M${:U}\:} is ":" (eval-defined, none, regular) | |
16 | Var_Parse: ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES | 16 | Var_Parse: ${SPECIALS:M\:${:U}} (eval-defined) | |
17 | Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 17 | Applying ${SPECIALS:M...} to "\: : \\ * \*" (eval-defined, none, regular) | |
18 | Var_Parse: ${:U} with VARE_UNDEFERR|VARE_WANTRES | 18 | Var_Parse: ${:U} (eval-defined) | |
19 | Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 19 | Applying ${:U} to "" (eval-defined, none, undefined) | |
20 | Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 20 | Result of ${:U} is "" (eval-defined, none, defined) | |
21 | Pattern[SPECIALS] for [\: : \\ * \*] is [:] | 21 | Pattern[SPECIALS] for [\: : \\ * \*] is [:] | |
22 | ModifyWords: split "\: : \\ * \*" into 5 words | 22 | ModifyWords: split "\: : \\ * \*" into 5 words | |
23 | VarMatch [\:] [:] | 23 | VarMatch [\:] [:] | |
24 | VarMatch [:] [:] | 24 | VarMatch [:] [:] | |
25 | VarMatch [\\] [:] | 25 | VarMatch [\\] [:] | |
26 | VarMatch [*] [:] | 26 | VarMatch [*] [:] | |
27 | VarMatch [\*] [:] | 27 | VarMatch [\*] [:] | |
28 | Result of ${SPECIALS:M\:${:U}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 28 | Result of ${SPECIALS:M\:${:U}} is ":" (eval-defined, none, regular) | |
29 | lhs = ":", rhs = ":", op = != | 29 | lhs = ":", rhs = ":", op = != | |
30 | Global:VALUES = : :: :\: | 30 | Global:VALUES = : :: :\: | |
31 | CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} | 31 | CondParser_Eval: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} | |
32 | Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} with VARE_UNDEFERR|VARE_WANTRES | 32 | Var_Parse: ${VALUES:M\:${:U\:}} != ${VALUES:M${:U\:}\:} (eval-defined) | |
33 | Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 33 | Applying ${VALUES:M...} to ": :: :\:" (eval-defined, none, regular) | |
34 | Var_Parse: ${:U:} with VARE_UNDEFERR|VARE_WANTRES | 34 | Var_Parse: ${:U:} (eval-defined) | |
35 | Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 35 | Applying ${:U} to "" (eval-defined, none, undefined) | |
36 | Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 36 | Result of ${:U} is "" (eval-defined, none, defined) | |
37 | Pattern[VALUES] for [: :: :\:] is [:] | 37 | Pattern[VALUES] for [: :: :\:] is [:] | |
38 | ModifyWords: split ": :: :\:" into 3 words | 38 | ModifyWords: split ": :: :\:" into 3 words | |
39 | VarMatch [:] [:] | 39 | VarMatch [:] [:] | |
40 | VarMatch [::] [:] | 40 | VarMatch [::] [:] | |
41 | VarMatch [:\:] [:] | 41 | VarMatch [:\:] [:] | |
42 | Result of ${VALUES:M\:${:U\:}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 42 | Result of ${VALUES:M\:${:U\:}} is ":" (eval-defined, none, regular) | |
43 | Var_Parse: ${VALUES:M${:U\:}\:} with VARE_UNDEFERR|VARE_WANTRES | 43 | Var_Parse: ${VALUES:M${:U\:}\:} (eval-defined) | |
44 | Applying ${VALUES:M...} to ": :: :\:" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 44 | Applying ${VALUES:M...} to ": :: :\:" (eval-defined, none, regular) | |
45 | Var_Parse: ${:U\:}\: with VARE_UNDEFERR|VARE_WANTRES | 45 | Var_Parse: ${:U\:}\: (eval-defined) | |
46 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 46 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
47 | Result of ${:U\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 47 | Result of ${:U\:} is ":" (eval-defined, none, defined) | |
48 | Pattern[VALUES] for [: :: :\:] is [:\:] | 48 | Pattern[VALUES] for [: :: :\:] is [:\:] | |
49 | ModifyWords: split ": :: :\:" into 3 words | 49 | ModifyWords: split ": :: :\:" into 3 words | |
50 | VarMatch [:] [:\:] | 50 | VarMatch [:] [:\:] | |
51 | VarMatch [::] [:\:] | 51 | VarMatch [::] [:\:] | |
52 | VarMatch [:\:] [:\:] | 52 | VarMatch [:\:] [:\:] | |
53 | Result of ${VALUES:M${:U\:}\:} is "::" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 53 | Result of ${VALUES:M${:U\:}\:} is "::" (eval-defined, none, regular) | |
54 | lhs = ":", rhs = "::", op = != | 54 | lhs = ":", rhs = "::", op = != | |
55 | make: "varmod-match-escape.mk" line 42: warning: XXX: Oops | 55 | make: "varmod-match-escape.mk" line 42: warning: XXX: Oops | |
56 | Global:.MAKEFLAGS = -r -k -d cv -d | 56 | Global:.MAKEFLAGS = -r -k -d cv -d | |
57 | Global:.MAKEFLAGS = -r -k -d cv -d 0 | 57 | Global:.MAKEFLAGS = -r -k -d cv -d 0 | |
58 | make: "varmod-match-escape.mk" line 67: Dollar followed by nothing | 58 | make: "varmod-match-escape.mk" line 67: Dollar followed by nothing | |
59 | make: Fatal errors encountered -- cannot continue | 59 | make: Fatal errors encountered -- cannot continue | |
60 | make: stopped in unit-tests | 60 | make: stopped in unit-tests | |
61 | exit status 1 | 61 | exit status 1 |
--- src/usr.bin/make/unit-tests/vardebug.exp 2021/02/23 15:19:41 1.17
+++ src/usr.bin/make/unit-tests/vardebug.exp 2021/03/15 15:39:13 1.18
@@ -1,86 +1,86 @@ | @@ -1,86 +1,86 @@ | |||
1 | Global:delete FROM_CMDLINE (not found) | 1 | Global:delete FROM_CMDLINE (not found) | |
2 | Command:FROM_CMDLINE = | 2 | Command:FROM_CMDLINE = | |
3 | Global:.MAKEOVERRIDES = FROM_CMDLINE | 3 | Global:.MAKEOVERRIDES = FROM_CMDLINE | |
4 | Global:VAR = added | 4 | Global:VAR = added | |
5 | Global:VAR = overwritten | 5 | Global:VAR = overwritten | |
6 | Global:delete VAR | 6 | Global:delete VAR | |
7 | Global:delete VAR (not found) | 7 | Global:delete VAR (not found) | |
8 | Var_Parse: ${:U} with VARE_WANTRES | 8 | Var_Parse: ${:U} (eval) | |
9 | Applying ${:U} to "" (VARE_WANTRES, none, undefined) | 9 | Applying ${:U} to "" (eval, none, undefined) | |
10 | Result of ${:U} is "" (VARE_WANTRES, none, defined) | 10 | Result of ${:U} is "" (eval, none, defined) | |
11 | Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored | 11 | Var_Set("${:U}", "empty name", ...) name expands to empty string - ignored | |
12 | Var_Parse: ${:U} with VARE_WANTRES | 12 | Var_Parse: ${:U} (eval) | |
13 | Applying ${:U} to "" (VARE_WANTRES, none, undefined) | 13 | Applying ${:U} to "" (eval, none, undefined) | |
14 | Result of ${:U} is "" (VARE_WANTRES, none, defined) | 14 | Result of ${:U} is "" (eval, none, defined) | |
15 | Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored | 15 | Var_Append("${:U}", "empty name", ...) name expands to empty string - ignored | |
16 | Global:FROM_CMDLINE = overwritten ignored! | 16 | Global:FROM_CMDLINE = overwritten ignored! | |
17 | Global:VAR = 1 | 17 | Global:VAR = 1 | |
18 | Global:VAR = 1 2 | 18 | Global:VAR = 1 2 | |
19 | Global:VAR = 1 2 3 | 19 | Global:VAR = 1 2 3 | |
20 | Var_Parse: ${VAR:M[2]} with VARE_UNDEFERR|VARE_WANTRES | 20 | Var_Parse: ${VAR:M[2]} (eval-defined) | |
21 | Applying ${VAR:M...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 21 | Applying ${VAR:M...} to "1 2 3" (eval-defined, none, regular) | |
22 | Pattern[VAR] for [1 2 3] is [[2]] | 22 | Pattern[VAR] for [1 2 3] is [[2]] | |
23 | ModifyWords: split "1 2 3" into 3 words | 23 | ModifyWords: split "1 2 3" into 3 words | |
24 | VarMatch [1] [[2]] | 24 | VarMatch [1] [[2]] | |
25 | VarMatch [2] [[2]] | 25 | VarMatch [2] [[2]] | |
26 | VarMatch [3] [[2]] | 26 | VarMatch [3] [[2]] | |
27 | Result of ${VAR:M[2]} is "2" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 27 | Result of ${VAR:M[2]} is "2" (eval-defined, none, regular) | |
28 | Var_Parse: ${VAR:N[2]} with VARE_UNDEFERR|VARE_WANTRES | 28 | Var_Parse: ${VAR:N[2]} (eval-defined) | |
29 | Applying ${VAR:N...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 29 | Applying ${VAR:N...} to "1 2 3" (eval-defined, none, regular) | |
30 | Pattern[VAR] for [1 2 3] is [[2]] | 30 | Pattern[VAR] for [1 2 3] is [[2]] | |
31 | ModifyWords: split "1 2 3" into 3 words | 31 | ModifyWords: split "1 2 3" into 3 words | |
32 | Result of ${VAR:N[2]} is "1 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 32 | Result of ${VAR:N[2]} is "1 3" (eval-defined, none, regular) | |
33 | Var_Parse: ${VAR:S,2,two,} with VARE_UNDEFERR|VARE_WANTRES | 33 | Var_Parse: ${VAR:S,2,two,} (eval-defined) | |
34 | Applying ${VAR:S...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 34 | Applying ${VAR:S...} to "1 2 3" (eval-defined, none, regular) | |
35 | Modifier part: "2" | 35 | Modifier part: "2" | |
36 | Modifier part: "two" | 36 | Modifier part: "two" | |
37 | ModifyWords: split "1 2 3" into 3 words | 37 | ModifyWords: split "1 2 3" into 3 words | |
38 | Result of ${VAR:S,2,two,} is "1 two 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 38 | Result of ${VAR:S,2,two,} is "1 two 3" (eval-defined, none, regular) | |
39 | Var_Parse: ${VAR:Q} with VARE_UNDEFERR|VARE_WANTRES | 39 | Var_Parse: ${VAR:Q} (eval-defined) | |
40 | Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 40 | Applying ${VAR:Q} to "1 2 3" (eval-defined, none, regular) | |
41 | Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 41 | Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, none, regular) | |
42 | Var_Parse: ${VAR:tu:tl:Q} with VARE_UNDEFERR|VARE_WANTRES | 42 | Var_Parse: ${VAR:tu:tl:Q} (eval-defined) | |
43 | Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 43 | Applying ${VAR:t...} to "1 2 3" (eval-defined, none, regular) | |
44 | Result of ${VAR:tu} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 44 | Result of ${VAR:tu} is "1 2 3" (eval-defined, none, regular) | |
45 | Applying ${VAR:t...} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 45 | Applying ${VAR:t...} to "1 2 3" (eval-defined, none, regular) | |
46 | Result of ${VAR:tl} is "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 46 | Result of ${VAR:tl} is "1 2 3" (eval-defined, none, regular) | |
47 | Applying ${VAR:Q} to "1 2 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 47 | Applying ${VAR:Q} to "1 2 3" (eval-defined, none, regular) | |
48 | Result of ${VAR:Q} is "1\ 2\ 3" (VARE_UNDEFERR|VARE_WANTRES, none, regular) | 48 | Result of ${VAR:Q} is "1\ 2\ 3" (eval-defined, none, regular) | |
49 | Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES | 49 | Var_Parse: ${:Uvalue:${:UM*e}:Mvalu[e]} (eval-defined) | |
50 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 50 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
51 | Result of ${:Uvalue} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 51 | Result of ${:Uvalue} is "value" (eval-defined, none, defined) | |
52 | Var_Parse: ${:UM*e}:Mvalu[e]} with VARE_UNDEFERR|VARE_WANTRES | 52 | Var_Parse: ${:UM*e}:Mvalu[e]} (eval-defined) | |
53 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 53 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
54 | Result of ${:UM*e} is "M*e" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 54 | Result of ${:UM*e} is "M*e" (eval-defined, none, defined) | |
55 | Indirect modifier "M*e" from "${:UM*e}" | 55 | Indirect modifier "M*e" from "${:UM*e}" | |
56 | Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 56 | Applying ${:M...} to "value" (eval-defined, none, defined) | |
57 | Pattern[] for [value] is [*e] | 57 | Pattern[] for [value] is [*e] | |
58 | ModifyWords: split "value" into 1 words | 58 | ModifyWords: split "value" into 1 words | |
59 | VarMatch [value] [*e] | 59 | VarMatch [value] [*e] | |
60 | Result of ${:M*e} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 60 | Result of ${:M*e} is "value" (eval-defined, none, defined) | |
61 | Applying ${:M...} to "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 61 | Applying ${:M...} to "value" (eval-defined, none, defined) | |
62 | Pattern[] for [value] is [valu[e]] | 62 | Pattern[] for [value] is [valu[e]] | |
63 | ModifyWords: split "value" into 1 words | 63 | ModifyWords: split "value" into 1 words | |
64 | VarMatch [value] [valu[e]] | 64 | VarMatch [value] [valu[e]] | |
65 | Result of ${:Mvalu[e]} is "value" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 65 | Result of ${:Mvalu[e]} is "value" (eval-defined, none, defined) | |
66 | Var_Parse: ${:UVAR} with VARE_WANTRES | 66 | Var_Parse: ${:UVAR} (eval) | |
67 | Applying ${:U...} to "" (VARE_WANTRES, none, undefined) | 67 | Applying ${:U...} to "" (eval, none, undefined) | |
68 | Result of ${:UVAR} is "VAR" (VARE_WANTRES, none, defined) | 68 | Result of ${:UVAR} is "VAR" (eval, none, defined) | |
69 | Global:delete VAR | 69 | Global:delete VAR | |
70 | Var_Parse: ${:Uvariable:unknown} with VARE_UNDEFERR|VARE_WANTRES | 70 | Var_Parse: ${:Uvariable:unknown} (eval-defined) | |
71 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 71 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
72 | Result of ${:Uvariable} is "variable" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 72 | Result of ${:Uvariable} is "variable" (eval-defined, none, defined) | |
73 | Applying ${:u...} to "variable" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 73 | Applying ${:u...} to "variable" (eval-defined, none, defined) | |
74 | make: "vardebug.mk" line 44: Unknown modifier "unknown" | 74 | make: "vardebug.mk" line 44: Unknown modifier "unknown" | |
75 | Result of ${:unknown} is error (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 75 | Result of ${:unknown} is error (eval-defined, none, defined) | |
76 | make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown}) | 76 | make: "vardebug.mk" line 44: Malformed conditional (${:Uvariable:unknown}) | |
77 | Var_Parse: ${UNDEFINED} with VARE_UNDEFERR|VARE_WANTRES | 77 | Var_Parse: ${UNDEFINED} (eval-defined) | |
78 | make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED}) | 78 | make: "vardebug.mk" line 53: Malformed conditional (${UNDEFINED}) | |
79 | Global:delete .SHELL (not found) | 79 | Global:delete .SHELL (not found) | |
80 | Command:.SHELL = </path/to/shell> | 80 | Command:.SHELL = </path/to/shell> | |
81 | Command:.SHELL = overwritten ignored (read-only) | 81 | Command:.SHELL = overwritten ignored (read-only) | |
82 | Global:.MAKEFLAGS = -r -k -d v -d | 82 | Global:.MAKEFLAGS = -r -k -d v -d | |
83 | Global:.MAKEFLAGS = -r -k -d v -d 0 | 83 | Global:.MAKEFLAGS = -r -k -d v -d 0 | |
84 | make: Fatal errors encountered -- cannot continue | 84 | make: Fatal errors encountered -- cannot continue | |
85 | make: stopped in unit-tests | 85 | make: stopped in unit-tests | |
86 | exit status 1 | 86 | exit status 1 |
--- src/usr.bin/make/unit-tests/varmod-indirect.exp 2021/02/23 15:19:41 1.12
+++ src/usr.bin/make/unit-tests/varmod-indirect.exp 2021/03/15 15:39:13 1.13
@@ -2,60 +2,60 @@ make: "varmod-indirect.mk" line 19: Unkn | @@ -2,60 +2,60 @@ make: "varmod-indirect.mk" line 19: Unkn | |||
2 | make: "varmod-indirect.mk" line 52: Unknown modifier "${" | 2 | make: "varmod-indirect.mk" line 52: Unknown modifier "${" | |
3 | make: "varmod-indirect.mk" line 55: warning: FIXME: this expression should have resulted in a parse error rather than returning the unparsed portion of the expression. | 3 | make: "varmod-indirect.mk" line 55: warning: FIXME: this expression should have resulted in a parse error rather than returning the unparsed portion of the expression. | |
4 | make: "varmod-indirect.mk" line 140: before | 4 | make: "varmod-indirect.mk" line 140: before | |
5 | make: "varmod-indirect.mk" line 140: after | 5 | make: "varmod-indirect.mk" line 140: after | |
6 | make: "varmod-indirect.mk" line 146: before | 6 | make: "varmod-indirect.mk" line 146: before | |
7 | make: "varmod-indirect.mk" line 146: after | 7 | make: "varmod-indirect.mk" line 146: after | |
8 | make: "varmod-indirect.mk" line 152: before | 8 | make: "varmod-indirect.mk" line 152: before | |
9 | make: "varmod-indirect.mk" line 152: after | 9 | make: "varmod-indirect.mk" line 152: after | |
10 | make: "varmod-indirect.mk" line 156: Unknown modifier "Z" | 10 | make: "varmod-indirect.mk" line 156: Unknown modifier "Z" | |
11 | make: "varmod-indirect.mk" line 157: before | 11 | make: "varmod-indirect.mk" line 157: before | |
12 | make: "varmod-indirect.mk" line 157: after | 12 | make: "varmod-indirect.mk" line 157: after | |
13 | ParseReadLine (166): '_:= before ${UNDEF} after' | 13 | ParseReadLine (166): '_:= before ${UNDEF} after' | |
14 | Global:_ = | 14 | Global:_ = | |
15 | Var_Parse: ${UNDEF} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 15 | Var_Parse: ${UNDEF} after (eval-keep-dollar-and-undefined) | |
16 | Global:_ = before ${UNDEF} after | 16 | Global:_ = before ${UNDEF} after | |
17 | ParseReadLine (169): '_:= before ${UNDEF:${:US,a,a,}} after' | 17 | ParseReadLine (169): '_:= before ${UNDEF:${:US,a,a,}} after' | |
18 | Var_Parse: ${UNDEF:${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 18 | Var_Parse: ${UNDEF:${:US,a,a,}} after (eval-keep-dollar-and-undefined) | |
19 | Var_Parse: ${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 19 | Var_Parse: ${:US,a,a,}} after (eval-keep-dollar-and-undefined) | |
20 | Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 20 | Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
21 | Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 21 | Result of ${:US,a,a,} is "S,a,a," (eval-keep-dollar-and-undefined, none, defined) | |
22 | Indirect modifier "S,a,a," from "${:US,a,a,}" | 22 | Indirect modifier "S,a,a," from "${:US,a,a,}" | |
23 | Applying ${UNDEF:S...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 23 | Applying ${UNDEF:S...} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
24 | Modifier part: "a" | 24 | Modifier part: "a" | |
25 | Modifier part: "a" | 25 | Modifier part: "a" | |
26 | ModifyWords: split "" into 1 words | 26 | ModifyWords: split "" into 1 words | |
27 | Result of ${UNDEF:S,a,a,} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 27 | Result of ${UNDEF:S,a,a,} is "" (eval-keep-dollar-and-undefined, none, undefined) | |
28 | Var_Parse: ${:US,a,a,}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 28 | Var_Parse: ${:US,a,a,}} after (eval-keep-dollar-and-undefined) | |
29 | Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 29 | Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
30 | Result of ${:US,a,a,} is "S,a,a," (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 30 | Result of ${:US,a,a,} is "S,a,a," (eval-keep-dollar-and-undefined, none, defined) | |
31 | Global:_ = before ${UNDEF:S,a,a,} after | 31 | Global:_ = before ${UNDEF:S,a,a,} after | |
32 | ParseReadLine (179): '_:= before ${UNDEF:${:U}} after' | 32 | ParseReadLine (179): '_:= before ${UNDEF:${:U}} after' | |
33 | Var_Parse: ${UNDEF:${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 33 | Var_Parse: ${UNDEF:${:U}} after (eval-keep-dollar-and-undefined) | |
34 | Var_Parse: ${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 34 | Var_Parse: ${:U}} after (eval-keep-dollar-and-undefined) | |
35 | Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 35 | Applying ${:U} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
36 | Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 36 | Result of ${:U} is "" (eval-keep-dollar-and-undefined, none, defined) | |
37 | Indirect modifier "" from "${:U}" | 37 | Indirect modifier "" from "${:U}" | |
38 | Var_Parse: ${:U}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 38 | Var_Parse: ${:U}} after (eval-keep-dollar-and-undefined) | |
39 | Applying ${:U} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 39 | Applying ${:U} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
40 | Result of ${:U} is "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 40 | Result of ${:U} is "" (eval-keep-dollar-and-undefined, none, defined) | |
41 | Global:_ = before ${UNDEF:} after | 41 | Global:_ = before ${UNDEF:} after | |
42 | ParseReadLine (184): '_:= before ${UNDEF:${:UZ}} after' | 42 | ParseReadLine (184): '_:= before ${UNDEF:${:UZ}} after' | |
43 | Var_Parse: ${UNDEF:${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 43 | Var_Parse: ${UNDEF:${:UZ}} after (eval-keep-dollar-and-undefined) | |
44 | Var_Parse: ${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 44 | Var_Parse: ${:UZ}} after (eval-keep-dollar-and-undefined) | |
45 | Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 45 | Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
46 | Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 46 | Result of ${:UZ} is "Z" (eval-keep-dollar-and-undefined, none, defined) | |
47 | Indirect modifier "Z" from "${:UZ}" | 47 | Indirect modifier "Z" from "${:UZ}" | |
48 | Applying ${UNDEF:Z} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 48 | Applying ${UNDEF:Z} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
49 | make: "varmod-indirect.mk" line 184: Unknown modifier "Z" | 49 | make: "varmod-indirect.mk" line 184: Unknown modifier "Z" | |
50 | Result of ${UNDEF:Z} is error (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 50 | Result of ${UNDEF:Z} is error (eval-keep-dollar-and-undefined, none, undefined) | |
51 | Var_Parse: ${:UZ}} after with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 51 | Var_Parse: ${:UZ}} after (eval-keep-dollar-and-undefined) | |
52 | Applying ${:U...} to "" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, undefined) | 52 | Applying ${:U...} to "" (eval-keep-dollar-and-undefined, none, undefined) | |
53 | Result of ${:UZ} is "Z" (VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF, none, defined) | 53 | Result of ${:UZ} is "Z" (eval-keep-dollar-and-undefined, none, defined) | |
54 | Global:_ = before ${UNDEF:Z} after | 54 | Global:_ = before ${UNDEF:Z} after | |
55 | ParseReadLine (186): '.MAKEFLAGS: -d0' | 55 | ParseReadLine (186): '.MAKEFLAGS: -d0' | |
56 | ParseDoDependency(.MAKEFLAGS: -d0) | 56 | ParseDoDependency(.MAKEFLAGS: -d0) | |
57 | Global:.MAKEFLAGS = -r -k -d 0 -d pv -d | 57 | Global:.MAKEFLAGS = -r -k -d 0 -d pv -d | |
58 | Global:.MAKEFLAGS = -r -k -d 0 -d pv -d 0 | 58 | Global:.MAKEFLAGS = -r -k -d 0 -d pv -d 0 | |
59 | make: Fatal errors encountered -- cannot continue | 59 | make: Fatal errors encountered -- cannot continue | |
60 | make: stopped in unit-tests | 60 | make: stopped in unit-tests | |
61 | exit status 1 | 61 | exit status 1 |
--- src/usr.bin/make/unit-tests/varname.exp 2021/02/15 18:23:32 1.12
+++ src/usr.bin/make/unit-tests/varname.exp 2021/03/15 15:39:13 1.13
@@ -1,24 +1,24 @@ | @@ -1,24 +1,24 @@ | |||
1 | Global:VAR{{{}}} = 3 braces | 1 | Global:VAR{{{}}} = 3 braces | |
2 | Var_Parse: ${VAR{{{}}}}" != "3 braces" with VARE_WANTRES | 2 | Var_Parse: ${VAR{{{}}}}" != "3 braces" (eval) | |
3 | Global:VARNAME = VAR((( | 3 | Global:VARNAME = VAR((( | |
4 | Var_Parse: ${VARNAME} with VARE_WANTRES | 4 | Var_Parse: ${VARNAME} (eval) | |
5 | Global:VAR((( = 3 open parentheses | 5 | Global:VAR((( = 3 open parentheses | |
6 | Var_Parse: ${VAR(((}}}}" != "3 open parentheses}}}" with VARE_WANTRES | 6 | Var_Parse: ${VAR(((}}}}" != "3 open parentheses}}}" (eval) | |
7 | Var_Parse: ${:UVAR(((}= try1 with VARE_UNDEFERR|VARE_WANTRES | 7 | Var_Parse: ${:UVAR(((}= try1 (eval-defined) | |
8 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 8 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
9 | Result of ${:UVAR(((} is "VAR(((" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 9 | Result of ${:UVAR(((} is "VAR(((" (eval-defined, none, defined) | |
10 | Global:.ALLTARGETS = VAR(((=) | 10 | Global:.ALLTARGETS = VAR(((=) | |
11 | make: "varname.mk" line 30: No closing parenthesis in archive specification | 11 | make: "varname.mk" line 30: No closing parenthesis in archive specification | |
12 | make: "varname.mk" line 30: Error in archive specification: "VAR" | 12 | make: "varname.mk" line 30: Error in archive specification: "VAR" | |
13 | Var_Parse: ${:UVAR\(\(\(}= try2 with VARE_UNDEFERR|VARE_WANTRES | 13 | Var_Parse: ${:UVAR\(\(\(}= try2 (eval-defined) | |
14 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 14 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
15 | Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 15 | Result of ${:UVAR\(\(\(} is "VAR\(\(\(" (eval-defined, none, defined) | |
16 | Global:.ALLTARGETS = VAR(((=) VAR\(\(\(= | 16 | Global:.ALLTARGETS = VAR(((=) VAR\(\(\(= | |
17 | make: "varname.mk" line 35: Invalid line type | 17 | make: "varname.mk" line 35: Invalid line type | |
18 | Var_Parse: ${VARNAME} with VARE_WANTRES | 18 | Var_Parse: ${VARNAME} (eval) | |
19 | Global:VAR((( = try3 | 19 | Global:VAR((( = try3 | |
20 | Global:.MAKEFLAGS = -r -k -d v -d | 20 | Global:.MAKEFLAGS = -r -k -d v -d | |
21 | Global:.MAKEFLAGS = -r -k -d v -d 0 | 21 | Global:.MAKEFLAGS = -r -k -d v -d 0 | |
22 | make: Fatal errors encountered -- cannot continue | 22 | make: Fatal errors encountered -- cannot continue | |
23 | make: stopped in unit-tests | 23 | make: stopped in unit-tests | |
24 | exit status 1 | 24 | exit status 1 |
--- src/usr.bin/make/unit-tests/varname-dot-shell.exp 2020/12/28 00:46:24 1.9
+++ src/usr.bin/make/unit-tests/varname-dot-shell.exp 2021/03/15 15:39:13 1.10
@@ -1,32 +1,32 @@ | @@ -1,32 +1,32 @@ | |||
1 | ParseReadLine (10): 'ORIG_SHELL:= ${.SHELL}' | 1 | ParseReadLine (10): 'ORIG_SHELL:= ${.SHELL}' | |
2 | Global:ORIG_SHELL = | 2 | Global:ORIG_SHELL = | |
3 | Var_Parse: ${.SHELL} with VARE_WANTRES|VARE_KEEP_DOLLAR|VARE_KEEP_UNDEF | 3 | Var_Parse: ${.SHELL} (eval-keep-dollar-and-undefined) | |
4 | Global:delete .SHELL (not found) | 4 | Global:delete .SHELL (not found) | |
5 | Command:.SHELL = (details omitted) | 5 | Command:.SHELL = (details omitted) | |
6 | Global:ORIG_SHELL = (details omitted) | 6 | Global:ORIG_SHELL = (details omitted) | |
7 | ParseReadLine (12): '.SHELL= overwritten' | 7 | ParseReadLine (12): '.SHELL= overwritten' | |
8 | Global:.SHELL = overwritten | 8 | Global:.SHELL = overwritten | |
9 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | 9 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | |
10 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 10 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) | |
11 | Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 11 | Var_Parse: ${ORIG_SHELL} (eval-defined) | |
12 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | 12 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | |
13 | ParseReadLine (19): '.MAKEFLAGS: .SHELL+=appended' | 13 | ParseReadLine (19): '.MAKEFLAGS: .SHELL+=appended' | |
14 | ParseDoDependency(.MAKEFLAGS: .SHELL+=appended) | 14 | ParseDoDependency(.MAKEFLAGS: .SHELL+=appended) | |
15 | Ignoring append to .SHELL since it is read-only | 15 | Ignoring append to .SHELL since it is read-only | |
16 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | 16 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | |
17 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 17 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) | |
18 | Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 18 | Var_Parse: ${ORIG_SHELL} (eval-defined) | |
19 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | 19 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | |
20 | ParseReadLine (27): '.undef .SHELL' | 20 | ParseReadLine (27): '.undef .SHELL' | |
21 | Global:delete .SHELL | 21 | Global:delete .SHELL | |
22 | ParseReadLine (28): '.SHELL= newly overwritten' | 22 | ParseReadLine (28): '.SHELL= newly overwritten' | |
23 | Global:.SHELL = newly overwritten | 23 | Global:.SHELL = newly overwritten | |
24 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | 24 | CondParser_Eval: ${.SHELL} != ${ORIG_SHELL} | |
25 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 25 | Var_Parse: ${.SHELL} != ${ORIG_SHELL} (eval-defined) | |
26 | Var_Parse: ${ORIG_SHELL} with VARE_UNDEFERR|VARE_WANTRES | 26 | Var_Parse: ${ORIG_SHELL} (eval-defined) | |
27 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | 27 | lhs = "(details omitted)", rhs = "(details omitted)", op = != | |
28 | ParseReadLine (33): '.MAKEFLAGS: -d0' | 28 | ParseReadLine (33): '.MAKEFLAGS: -d0' | |
29 | ParseDoDependency(.MAKEFLAGS: -d0) | 29 | ParseDoDependency(.MAKEFLAGS: -d0) | |
30 | Global:.MAKEFLAGS = -r -k -d cpv -d | 30 | Global:.MAKEFLAGS = -r -k -d cpv -d | |
31 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | 31 | Global:.MAKEFLAGS = -r -k -d cpv -d 0 | |
32 | exit status 0 | 32 | exit status 0 |
--- src/usr.bin/make/unit-tests/varname-empty.exp 2021/02/15 18:23:32 1.9
+++ src/usr.bin/make/unit-tests/varname-empty.exp 2021/03/15 15:39:13 1.10
@@ -1,47 +1,47 @@ | @@ -1,47 +1,47 @@ | |||
1 | Var_Parse: ${:U} with VARE_WANTRES | 1 | Var_Parse: ${:U} (eval) | |
2 | Applying ${:U} to "" (VARE_WANTRES, none, undefined) | 2 | Applying ${:U} to "" (eval, none, undefined) | |
3 | Result of ${:U} is "" (VARE_WANTRES, none, defined) | 3 | Result of ${:U} is "" (eval, none, defined) | |
4 | Var_Set("${:U}", "cmdline-u", ...) name expands to empty string - ignored | 4 | Var_Set("${:U}", "cmdline-u", ...) name expands to empty string - ignored | |
5 | Var_Set("", "cmdline-plain", ...) name expands to empty string - ignored | 5 | Var_Set("", "cmdline-plain", ...) name expands to empty string - ignored | |
6 | Global:.CURDIR = <curdir> | 6 | Global:.CURDIR = <curdir> | |
7 | Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE:U} with VARE_WANTRES | 7 | Var_Parse: ${MAKE_OBJDIR_CHECK_WRITABLE:U} (eval) | |
8 | Applying ${MAKE_OBJDIR_CHECK_WRITABLE:U} to "" (VARE_WANTRES, none, undefined) | 8 | Applying ${MAKE_OBJDIR_CHECK_WRITABLE:U} to "" (eval, none, undefined) | |
9 | Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (VARE_WANTRES, none, defined) | 9 | Result of ${MAKE_OBJDIR_CHECK_WRITABLE:U} is "" (eval, none, defined) | |
10 | Global:.OBJDIR = <curdir> | 10 | Global:.OBJDIR = <curdir> | |
11 | Global:delete .PATH (not found) | 11 | Global:delete .PATH (not found) | |
12 | Global:.PATH = . | 12 | Global:.PATH = . | |
13 | Global:.PATH = . <curdir> | 13 | Global:.PATH = . <curdir> | |
14 | Global:.TARGETS = | 14 | Global:.TARGETS = | |
15 | Internal:MAKEFILE = varname-empty.mk | 15 | Internal:MAKEFILE = varname-empty.mk | |
16 | Global:.MAKE.MAKEFILES = varname-empty.mk | 16 | Global:.MAKE.MAKEFILES = varname-empty.mk | |
17 | Global:.PARSEFILE = varname-empty.mk | 17 | Global:.PARSEFILE = varname-empty.mk | |
18 | Global:delete .INCLUDEDFROMDIR (not found) | 18 | Global:delete .INCLUDEDFROMDIR (not found) | |
19 | Global:delete .INCLUDEDFROMFILE (not found) | 19 | Global:delete .INCLUDEDFROMFILE (not found) | |
20 | Var_Set("", "default", ...) name expands to empty string - ignored | 20 | Var_Set("", "default", ...) name expands to empty string - ignored | |
21 | Var_Set("", "assigned", ...) name expands to empty string - ignored | 21 | Var_Set("", "assigned", ...) name expands to empty string - ignored | |
22 | SetVar: variable name is empty - ignored | 22 | SetVar: variable name is empty - ignored | |
23 | Var_Set("", "", ...) name expands to empty string - ignored | 23 | Var_Set("", "", ...) name expands to empty string - ignored | |
24 | Var_Set("", "subst", ...) name expands to empty string - ignored | 24 | Var_Set("", "subst", ...) name expands to empty string - ignored | |
25 | Var_Set("", "shell-output", ...) name expands to empty string - ignored | 25 | Var_Set("", "shell-output", ...) name expands to empty string - ignored | |
26 | Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES | 26 | Var_Parse: ${:Ufallback} != "fallback" (eval-defined) | |
27 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 27 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
28 | Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 28 | Result of ${:Ufallback} is "fallback" (eval-defined, none, defined) | |
29 | Var_Parse: ${:U} with VARE_WANTRES | 29 | Var_Parse: ${:U} (eval) | |
30 | Applying ${:U} to "" (VARE_WANTRES, none, undefined) | 30 | Applying ${:U} to "" (eval, none, undefined) | |
31 | Result of ${:U} is "" (VARE_WANTRES, none, defined) | 31 | Result of ${:U} is "" (eval, none, defined) | |
32 | Var_Set("${:U}", "assigned indirectly", ...) name expands to empty string - ignored | 32 | Var_Set("${:U}", "assigned indirectly", ...) name expands to empty string - ignored | |
33 | Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES | 33 | Var_Parse: ${:Ufallback} != "fallback" (eval-defined) | |
34 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 34 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
35 | Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 35 | Result of ${:Ufallback} is "fallback" (eval-defined, none, defined) | |
36 | Var_Parse: ${:U} with VARE_WANTRES | 36 | Var_Parse: ${:U} (eval) | |
37 | Applying ${:U} to "" (VARE_WANTRES, none, undefined) | 37 | Applying ${:U} to "" (eval, none, undefined) | |
38 | Result of ${:U} is "" (VARE_WANTRES, none, defined) | 38 | Result of ${:U} is "" (eval, none, defined) | |
39 | Var_Append("${:U}", "appended indirectly", ...) name expands to empty string - ignored | 39 | Var_Append("${:U}", "appended indirectly", ...) name expands to empty string - ignored | |
40 | Var_Parse: ${:Ufallback} != "fallback" with VARE_UNDEFERR|VARE_WANTRES | 40 | Var_Parse: ${:Ufallback} != "fallback" (eval-defined) | |
41 | Applying ${:U...} to "" (VARE_UNDEFERR|VARE_WANTRES, none, undefined) | 41 | Applying ${:U...} to "" (eval-defined, none, undefined) | |
42 | Result of ${:Ufallback} is "fallback" (VARE_UNDEFERR|VARE_WANTRES, none, defined) | 42 | Result of ${:Ufallback} is "fallback" (eval-defined, none, defined) | |
43 | Global:.MAKEFLAGS = -r -d v -d | 43 | Global:.MAKEFLAGS = -r -d v -d | |
44 | Global:.MAKEFLAGS = -r -d v -d 0 | 44 | Global:.MAKEFLAGS = -r -d v -d 0 | |
45 | out: fallback | 45 | out: fallback | |
46 | out: 1 2 3 | 46 | out: 1 2 3 | |
47 | exit status 0 | 47 | exit status 0 |