Module Name: src Committed By: rillig Date: Tue Nov 30 23:58:10 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: varname-dot-make-save_dollars.mk Log Message: tests/make: document that undefining .MAKE.SAVE_DOLLARS has no effect To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk diff -u src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.3 src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.4 --- src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk:1.3 Tue Nov 30 23:52:19 2021 +++ src/usr.bin/make/unit-tests/varname-dot-make-save_dollars.mk Tue Nov 30 23:58:10 2021 @@ -1,4 +1,4 @@ -# $NetBSD: varname-dot-make-save_dollars.mk,v 1.3 2021/11/30 23:52:19 rillig Exp $ +# $NetBSD: varname-dot-make-save_dollars.mk,v 1.4 2021/11/30 23:58:10 rillig Exp $ # # Tests for the special .MAKE.SAVE_DOLLARS variable, which controls whether # the assignment operator ':=' converts '$$' to a single '$' or keeps it @@ -51,9 +51,28 @@ VAR:= $$$$-${.MAKE.SAVE_DOLLARS::=yes}- # The '$' from the ':U' expressions are indirect, therefore SAVE_DOLLARS # doesn't apply to them. +.MAKE.SAVE_DOLLARS= no VAR:= ${:U\$\$\$\$}-${.MAKE.SAVE_DOLLARS::=yes}-${:U\$\$\$\$} .if ${VAR} != "\$\$--\$\$" . error .endif +# Undefining .MAKE.SAVE_DOLLARS does not have any effect, in particular it +# does not restore the default behavior. +.MAKE.SAVE_DOLLARS= no +.undef .MAKE.SAVE_DOLLARS +VAR:= $$$$$$$$ +.if ${VAR} != "\$\$" +. error +.endif + +# Undefining .MAKE.SAVE_DOLLARS does not have any effect, in particular it +# does not restore the default behavior. +.MAKE.SAVE_DOLLARS= yes +.undef .MAKE.SAVE_DOLLARS +VAR:= $$$$$$$$ +.if ${VAR} != "\$\$\$\$" +. error +.endif + all: