8374642: EscapeHash macro fails with GNU make 4.3 and 4.4

Reviewed-by: tbell, shade
This commit is contained in:
Erik Joelsson 2026-01-07 21:52:12 +00:00
parent dd20e91506
commit 383fe1efc3

View File

@ -114,7 +114,7 @@ EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
################################################################################
# This macro works just like EscapeDollar above, but for #.
EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
EscapeHash = $(subst $(HASH),\$(HASH),$(subst \$(HASH),$(HASH),$(strip $1)))
################################################################################
# This macro translates $ into $$ to protect the string from make itself.