Module Name: src
Committed By: sjg
Date: Wed May 30 21:42:04 UTC 2012
Modified Files:
src/usr.bin/make: compat.c
Log Message:
An empty command is quietly ignored in jobs mode, but causes a failure
in compat mode. Just skip it.
To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/usr.bin/make/compat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/compat.c
diff -u src/usr.bin/make/compat.c:1.85 src/usr.bin/make/compat.c:1.86
--- src/usr.bin/make/compat.c:1.85 Tue May 15 17:51:51 2012
+++ src/usr.bin/make/compat.c Wed May 30 21:42:04 2012
@@ -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 @@ CompatRunCommand(void *cmdp, void *gnp)
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