Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Since ${MAKE} converts $$ -> $ during parsing w...
details: https://anonhg.NetBSD.org/src/rev/9d2c0350ac22
branches: trunk
changeset: 319286:9d2c0350ac22
user: christos <christos%NetBSD.org@localhost>
date: Thu May 24 00:27:24 2018 +0000
description:
Since ${MAKE} converts $$ -> $ during parsing we need to put it back to
preserve the original variable value with :Q.
XXX: pullup-8
diffstat:
usr.bin/make/var.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r d5a10a08db0d -r 9d2c0350ac22 usr.bin/make/var.c
--- a/usr.bin/make/var.c Thu May 24 00:25:44 2018 +0000
+++ b/usr.bin/make/var.c Thu May 24 00:27:24 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.218 2018/02/18 00:52:42 sjg Exp $ */
+/* $NetBSD: var.c,v 1.219 2018/05/24 00:27:24 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.218 2018/02/18 00:52:42 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.219 2018/05/24 00:27:24 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.218 2018/02/18 00:52:42 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.219 2018/05/24 00:27:24 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -2347,6 +2347,8 @@
if (isspace((unsigned char)*str) || ismeta((unsigned char)*str))
Buf_AddByte(&buf, '\\');
Buf_AddByte(&buf, *str);
+ if (*str == '$')
+ Buf_AddBytes(&buf, 2, "\\$");
}
str = Buf_Destroy(&buf, FALSE);
Home |
Main Index |
Thread Index |
Old Index