make(1) claims to ignore the remainder of a conditional once its value

has been determined similar to C. That is, one expects a construction
like,

.if defined(TEST) && (${TEST:L} == "test")

Never to generate an error since the second expression should never be
evaluated when TEST is undefined.

However, this was not the case. The above fails with the current
make(1) if TEST is undefined. This patch fixes the above and many
similar cases.

PR:		bin/34032
Submitted by:	Alan Eldridge <alane@geeksrus.net>
MFC after:	1 week
This commit is contained in:
Crist J. Clark 2002-02-20 14:31:19 +00:00
parent 57ffbd6e54
commit c62ec993b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90965

View File

@ -2281,7 +2281,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr)
str[*lengthPtr] = '\0';
*freePtr = TRUE;
} else {
str = var_Error;
str = err ? var_Error : varNoError;
}
}
return (str);