Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make If the line being passed to the shell is a blan...
details: https://anonhg.NetBSD.org/src/rev/5776202dfe1b
branches: trunk
changeset: 582100:5776202dfe1b
user: jmc <jmc%NetBSD.org@localhost>
date: Thu Jun 16 18:07:45 2005 +0000
description:
If the line being passed to the shell is a blank line and we're not in compat
mode, use the ignErr template for the command as shell doesn't like an empty
construct of the form { } || <something>. Fixes build breakage on cats
distrib where a command ends up expanding to nothing.
diffstat:
usr.bin/make/job.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 9aec87dd330e -r 5776202dfe1b usr.bin/make/job.c
--- a/usr.bin/make/job.c Thu Jun 16 17:04:53 2005 +0000
+++ b/usr.bin/make/job.c Thu Jun 16 18:07:45 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.92 2005/05/08 04:19:12 christos Exp $ */
+/* $NetBSD: job.c,v 1.93 2005/06/16 18:07:45 jmc Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.92 2005/05/08 04:19:12 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.93 2005/06/16 18:07:45 jmc Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: job.c,v 1.92 2005/05/08 04:19:12 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.93 2005/06/16 18:07:45 jmc Exp $");
#endif
#endif /* not lint */
#endif
@@ -829,8 +829,9 @@
DBPRINTF(commandShell->errCheck, escCmd);
shutUp = TRUE;
}
- /* If it's a comment line, treat it like an ignored error */
- if (escCmd[0] == commandShell->commentChar)
+ /* If it's a comment line or blank, treat as an ignored error */
+ if ((escCmd[0] == commandShell->commentChar) ||
+ (escCmd[0] == 0))
cmdTemplate = commandShell->ignErr;
else
cmdTemplate = commandShell->errOut;
Home |
Main Index |
Thread Index |
Old Index