Home | History | Annotate | Line # | Download | only in unit-tests
      1  1.4  rillig # $NetBSD: varmod-quote-dollar.mk,v 1.4 2022/05/08 10:14:40 rillig Exp $
      2  1.1  rillig #
      3  1.2  rillig # Tests for the :q variable modifier, which quotes the string for the shell
      4  1.2  rillig # and doubles dollar signs, to prevent them from being interpreted by a
      5  1.2  rillig # child process of make.
      6  1.1  rillig 
      7  1.4  rillig # The newline and space characters at the beginning of this string are passed
      8  1.4  rillig # to the child make.  When the child make parses the variable assignment, it
      9  1.4  rillig # discards the leading space characters.
     10  1.3  rillig ASCII_CHARS=	${.newline} !"\#$$%&'()*+,-./09:;<=>?@AZ[\]^_`az{|}~
     11  1.1  rillig 
     12  1.1  rillig all:
     13  1.4  rillig 	@${MAKE} -r -f /dev/null \
     14  1.4  rillig 	    CHARS=${ASCII_CHARS:q} \
     15  1.4  rillig 	    TWICE=${ASCII_CHARS:q}${ASCII_CHARS:q} \
     16  1.4  rillig 	    -V CHARS \
     17  1.4  rillig 	    -V TWICE
     18