From 56766ede64d4abfaa7c694122e7bb601a427736d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 9 Aug 2023 18:07:00 -0700 Subject: [PATCH] automake: portability warning for dollar-escaped dollar signs. This bug and fix was posted at https://lists.gnu.org/archive/html/automake/2023-08/msg00003.html. * lib/Automake/Variable.pm (scan_variable_expansions): rewrite scan_variable_expansions regex to handle dollar-escaped dollar signs. * t/dollarvar2.sh: test it. --- lib/Automake/Variable.pm | 5 +++-- t/dollarvar2.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index 8bafc8e3a..82215b511 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -748,9 +748,10 @@ sub scan_variable_expansions ($) $text =~ s/#.*$//; # Record each use of ${stuff} or $(stuff) that does not follow a $. - while ($text =~ /(?Makefile.am <<'EOF' +x = $$$(y z) +EOF +AUTOMAKE_fails -Wportability + : -- 2.47.2