Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make An empty command is quietly ignored in jobs mod...



details:   https://anonhg.NetBSD.org/src/rev/45c39377fb0a
branches:  trunk
changeset: 779490:45c39377fb0a
user:      sjg <sjg%NetBSD.org@localhost>
date:      Wed May 30 21:42:04 2012 +0000

description:
An empty command is quietly ignored in jobs mode, but causes a failure
in compat mode.  Just skip it.

diffstat:

 usr.bin/make/compat.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 932401cf046b -r 45c39377fb0a usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Wed May 30 21:38:03 2012 +0000
+++ b/usr.bin/make/compat.c     Wed May 30 21:42:04 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.85 2012/05/15 17:51:51 seanb Exp $        */
+/*     $NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.85 2012/05/15 17:51:51 seanb Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c   8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.85 2012/05/15 17:51:51 seanb Exp $");
+__RCSID("$NetBSD: compat.c,v 1.86 2012/05/30 21:42:04 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -276,6 +276,12 @@
     while (isspace((unsigned char)*cmd))
        cmd++;
 
+    /*
+     * If we did not end up with a command, just skip it.
+     */
+    if (!*cmd)
+       return (0);
+
 #if !defined(MAKE_NATIVE)
     /*
      * In a non-native build, the host environment might be weird enough



Home | Main Index | Thread Index | Old Index