2022-07-26 15:52:53 +00:00
|
|
|
# $NetBSD: varmod-quote-dollar.mk,v 1.4 2022/05/08 10:14:40 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
|
|
|
# Tests for the :q variable modifier, which quotes the string for the shell
|
|
|
|
# and doubles dollar signs, to prevent them from being interpreted by a
|
|
|
|
# child process of make.
|
|
|
|
|
2022-07-26 15:52:53 +00:00
|
|
|
# The newline and space characters at the beginning of this string are passed
|
|
|
|
# to the child make. When the child make parses the variable assignment, it
|
|
|
|
# discards the leading space characters.
|
2022-02-05 20:03:50 +00:00
|
|
|
ASCII_CHARS= ${.newline} !"\#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
all:
|
2022-07-26 15:52:53 +00:00
|
|
|
@${MAKE} -r -f /dev/null \
|
|
|
|
CHARS=${ASCII_CHARS:q} \
|
|
|
|
TWICE=${ASCII_CHARS:q}${ASCII_CHARS:q} \
|
|
|
|
-V CHARS \
|
|
|
|
-V TWICE
|