Fix a bug fixed by NetBSD in revision 1.42 of parse.c by christos which caused

an example Makefile I was showing someone just last night to report a variable
as being recursive.

Obtained from:	NetBSD
This commit is contained in:
jmallett 2002-06-20 19:51:13 +00:00
parent 2b6583821c
commit 3c86151887

View File

@ -1434,6 +1434,14 @@ Parse_DoVar (line, ctxt)
Boolean oldOldVars = oldVars;
oldVars = FALSE;
/*
* make sure that we set the variable the first time to nothing
* so that it gets substituted!
*/
if (!Var_Exists(line, ctxt))
Var_Set(line, "", ctxt);
cp = Var_Subst(NULL, cp, ctxt, FALSE);
oldVars = oldOldVars;