Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make needshell customizable, so that xinstall c...
details: https://anonhg.NetBSD.org/src/rev/816b97fe6a7a
branches: trunk
changeset: 809097:816b97fe6a7a
user: christos <christos%NetBSD.org@localhost>
date: Fri Jun 19 14:32:04 2015 +0000
description:
make needshell customizable, so that xinstall can use it.
diffstat:
usr.bin/make/compat.c | 8 ++++----
usr.bin/make/metachar.h | 10 +++++++---
2 files changed, 11 insertions(+), 7 deletions(-)
diffs (68 lines):
diff -r 63b11ac22344 -r 816b97fe6a7a usr.bin/make/compat.c
--- a/usr.bin/make/compat.c Fri Jun 19 14:25:34 2015 +0000
+++ b/usr.bin/make/compat.c Fri Jun 19 14:32:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.99 2015/06/19 14:25:34 christos Exp $ */
+/* $NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 christos 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.99 2015/06/19 14:25:34 christos Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 christos 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.99 2015/06/19 14:25:34 christos Exp $");
+__RCSID("$NetBSD: compat.c,v 1.100 2015/06/19 14:32:04 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -280,7 +280,7 @@
* meta characters as documented in make(1).
*/
- useShell = needshell(cmd);
+ useShell = needshell(cmd, FALSE);
#endif
/*
diff -r 63b11ac22344 -r 816b97fe6a7a usr.bin/make/metachar.h
--- a/usr.bin/make/metachar.h Fri Jun 19 14:25:34 2015 +0000
+++ b/usr.bin/make/metachar.h Fri Jun 19 14:32:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: metachar.h,v 1.2 2015/06/19 14:25:34 christos Exp $ */
+/* $NetBSD: metachar.h,v 1.3 2015/06/19 14:32:04 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,6 +32,7 @@
#define _METACHAR_H
#include <sys/cdefs.h>
+#include <ctype.h>
__BEGIN_DECLS
extern unsigned char _metachar[];
@@ -48,10 +49,13 @@
}
static inline int
-needshell(const char *cmd)
+needshell(const char *cmd, int white)
{
- while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=')
+ while (!ismeta(*cmd) && *cmd != ':' && *cmd != '=') {
+ if (white && isspace((unsigned char)*cmd))
+ break;
cmd++;
+ }
return *cmd != '\0';
}
Home |
Main Index |
Thread Index |
Old Index