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:
Juli Mallett 2002-06-20 19:51:13 +00:00
parent 7fc2a9f90c
commit 9f3d7bf758
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98509

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;