Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Ignore empty MAKEOBJDIR



details:   https://anonhg.NetBSD.org/src/rev/5b017dbdf009
branches:  trunk
changeset: 827453:5b017dbdf009
user:      sjg <sjg%NetBSD.org@localhost>
date:      Sat Oct 28 21:54:54 2017 +0000

description:
Ignore empty MAKEOBJDIR

Otherwise we end up with .OBJDIR = ${.CURDIR}/
which is quivalent, but fails the typial
.if ${.OBJDIR} == ${.CURDIR}

diffstat:

 usr.bin/make/main.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 94333611528c -r 5b017dbdf009 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sat Oct 28 20:57:51 2017 +0000
+++ b/usr.bin/make/main.c       Sat Oct 28 21:54:54 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.272 2017/06/19 19:58:24 christos Exp $      */
+/*     $NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.272 2017/06/19 19:58:24 christos Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.272 2017/06/19 19:58:24 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.273 2017/10/28 21:54:54 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -761,7 +761,8 @@
 {
        char *p, *path, *xpath;
 
-       if ((path = Var_Value(var, VAR_CMD, &p)) == NULL)
+       if ((path = Var_Value(var, VAR_CMD, &p)) == NULL ||
+           *path == '\0')
                return FALSE;
 
        /* expand variable substitutions */



Home | Main Index | Thread Index | Old Index