GNU bug report logs - #22372
[PATCH] automake.in: fix deprecated regex syntax

Previous Next

Package: automake;

Reported by: Enrico Jorns <ejo <at> pengutronix.de>

Date: Thu, 14 Jan 2016 16:03:02 UTC

Severity: normal

Tags: fixed, patch

Merged with 21001

Done: Mathieu Lirzin <mthl <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Enrico Jorns <ejo <at> pengutronix.de>
To: bug-automake <at> gnu.org
Cc: Enrico Jorns <ejo <at> pengutronix.de>
Subject: [PATCH] automake.in: fix deprecated regex syntax
Date: Thu, 14 Jan 2016 12:18:23 +0100
Running automake with perl >= 5.22.0 produces the warning

  Unescaped left brace in regex is deprecated, passed through in regex;
  marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at
  /ptx/work/dude/ejo/temptest/nodistro.0/sysroots/x86_64-oesdk-linux/usr/bin/automake
  line 3936.

With perl-5.22.0 using a literal '{' in regexp is deprecated and should
be escaped.
This patch escapes the '{' characters to match in the regex of function
`substitute_ac_subst_variables_worker`.

Signed-off-by: Enrico Jorns <ejo <at> pengutronix.de>
---
 bin/automake.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/automake.in b/bin/automake.in
index c1d1a8a..2a690e6 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -3741,7 +3741,7 @@ sub substitute_ac_subst_variables_worker
 sub substitute_ac_subst_variables
 {
   my ($text) = @_;
-  $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+  $text =~ s/\$\{([^ \t=:+{}]+)\}/substitute_ac_subst_variables_worker ($1)/ge;
   return $text;
 }
 
-- 
2.6.4





This bug report was last modified 7 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.