summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 3e1eed5..e549bb3 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -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;
OpenPOWER on IntegriCloud