Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Fix awful bug where:
details: https://anonhg.NetBSD.org/src/rev/9f0f381bb9f5
branches: trunk
changeset: 473417:9f0f381bb9f5
user: christos <christos%NetBSD.org@localhost>
date: Wed Jun 02 18:47:11 1999 +0000
description:
Fix awful bug where:
V := $V foo
V := $V bar
would report that variable V is recursive...
diffstat:
usr.bin/make/parse.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 3b9c89147666 -r 9f0f381bb9f5 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Wed Jun 02 15:57:18 1999 +0000
+++ b/usr.bin/make/parse.c Wed Jun 02 18:47:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.41 1998/11/17 23:56:23 ross Exp $ */
+/* $NetBSD: parse.c,v 1.42 1999/06/02 18:47:11 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: parse.c,v 1.41 1998/11/17 23:56:23 ross Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.42 1999/06/02 18:47:11 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.41 1998/11/17 23:56:23 ross Exp $");
+__RCSID("$NetBSD: parse.c,v 1.42 1999/06/02 18:47:11 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -1520,6 +1520,14 @@
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;
Home |
Main Index |
Thread Index |
Old Index