diff options
author | sjg <sjg@FreeBSD.org> | 2013-08-02 06:25:28 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-08-02 06:25:28 +0000 |
commit | ff765cb371f120bb1d6e648a2418a7c9e3f223b2 (patch) | |
tree | 8ceaf694b47a0d2b1022393bf58a564bda1b20a2 /contrib/bmake/compat.c | |
parent | 1c55a6beb9a550795753418366eee2961aae82db (diff) | |
download | FreeBSD-src-ff765cb371f120bb1d6e648a2418a7c9e3f223b2.zip FreeBSD-src-ff765cb371f120bb1d6e648a2418a7c9e3f223b2.tar.gz |
Merge bmake-20130730
Main feature of interest is .MAKE.JOB.PREFIX=
to suppress --- job --- tokens.
Diffstat (limited to 'contrib/bmake/compat.c')
-rw-r--r-- | contrib/bmake/compat.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 8f931cb..3586048 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 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.91 2013/01/25 02:01:10 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 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.91 2013/01/25 02:01:10 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -332,18 +332,23 @@ again: * We need to pass the command off to the shell, typically * because the command contains a "meta" character. */ - static const char *shargv[4]; + static const char *shargv[5]; + int shargc; - shargv[0] = shellPath; + shargc = 0; + shargv[shargc++] = shellPath; /* * The following work for any of the builtin shell specs. */ + if (shellErrFlag) { + shargv[shargc++] = shellErrFlag; + } if (DEBUG(SHELL)) - shargv[1] = "-xc"; + shargv[shargc++] = "-xc"; else - shargv[1] = "-c"; - shargv[2] = cmd; - shargv[3] = NULL; + shargv[shargc++] = "-c"; + shargv[shargc++] = cmd; + shargv[shargc++] = NULL; av = shargv; argc = 0; bp = NULL; |