diff options
| author | christos <christos@NetBSD.org> | 2018-05-24 00:27:24 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2018-05-24 00:27:24 +0000 |
| commit | 232b19cf56c702fec1dcf3e5207c13a51cd10a3c (patch) | |
| tree | e67c748ebdcce29de5e5a62a052020587e40f5f4 /usr.bin/make | |
| parent | 4eb63c0909c157446b341936ad516cfc55c3bd3b (diff) | |
Since ${MAKE} converts $$ -> $ during parsing we need to put it back to
preserve the original variable value with :Q.
XXX: pullup-8
Diffstat (limited to 'usr.bin/make')
| -rw-r--r-- | usr.bin/make/var.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 46db87be216..78c65b9fb77 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -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 @@ VarQuote(char *str) 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); |
