Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make - partially fix ${foo:?true:false} so that at l...



details:   https://anonhg.NetBSD.org/src/rev/c58f26d74384
branches:  trunk
changeset: 519718:c58f26d74384
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Dec 25 14:50:36 2001 +0000

description:
- partially fix ${foo:?true:false} so that at least it now parses ok and
  the true result works. for some reason the false result doesn't, even
  though make -dv shows it being set as the result. (blah!)
- add braces in comments to fix vi showmatch

diffstat:

 usr.bin/make/var.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (55 lines):

diff -r 41502f457875 -r c58f26d74384 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Tue Dec 25 14:03:15 2001 +0000
+++ b/usr.bin/make/var.c        Tue Dec 25 14:50:36 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.65 2001/06/12 23:36:18 sjg Exp $     */
+/*     $NetBSD: var.c,v 1.66 2001/12/25 14:50:36 lukem Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
  */
 
 #ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: var.c,v 1.65 2001/06/12 23:36:18 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.66 2001/12/25 14:50:36 lukem Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c      8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.65 2001/06/12 23:36:18 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.66 2001/12/25 14:50:36 lukem Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2007,6 +2007,7 @@
                        cp = ++tstr;
                        break;
                    }
+                       /* '{' */
                    delim = '}';
                    pattern.flags = 0;
 
@@ -2329,6 +2330,7 @@
                        NULL, &pattern.leftLen, NULL)) == NULL)
                        goto cleanup;
 
+                       /* '{' */
                    delim = '}';
                    if ((pattern.rhs = VarGetPattern(ctxt, err, &cp, delim,
                        NULL, &pattern.rightLen, NULL)) == NULL)
@@ -2336,9 +2338,10 @@
 
                    termc = *--cp;
                    delim = '\0';
-                   if (Cond_EvalExpression(1, str, &value, 0) == COND_INVALID){
+                   if (Cond_EvalExpression(1, v->name, &value, 0)
+                       == COND_INVALID) {
                        Error("Bad conditional expression `%s' in %s?%s:%s",
-                             str, str, pattern.lhs, pattern.rhs);
+                             v->name, v->name, pattern.lhs, pattern.rhs);
                        goto cleanup;
                    }
 



Home | Main Index | Thread Index | Old Index