summaryrefslogtreecommitdiff
path: root/pygnulib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-08-07 13:49:49 +0200
committerBruno Haible <bruno@clisp.org>2022-08-07 23:04:14 +0200
commit6a795cb6b5c9f2b42058f444c61291f751c356e2 (patch)
tree4b4d31be4fdd65f1fc06ae1411ba3ca4ca6b2e3a /pygnulib
parent5c087011efa2817a7e857f69a1cdd22c21a5053d (diff)
downloadgnulib-6a795cb6b5c9f2b42058f444c61291f751c356e2.tar.gz
gnulib-tool.py: Fix some regexes.
* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): Use an equivalent regex as gnulib-tool. * pygnulib/GLTestDir.py (GLTestDir.execute): Likewise.
Diffstat (limited to 'pygnulib')
-rw-r--r--pygnulib/GLEmiter.py2
-rw-r--r--pygnulib/GLTestDir.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py
index 9aa638d693..e0164ed7cc 100644
--- a/pygnulib/GLEmiter.py
+++ b/pygnulib/GLEmiter.py
@@ -801,7 +801,7 @@ AC_DEFUN([%V1%_LIBSOURCES], [
# First test if allsnippets already specify an installation location.
insnippets = False
inmakefile = False
- regex = '^[a-zA-Z0-9_]*_%sLIBRARIES *\\+{0,1}= *%s.%s' % (perhapsLT, libname, libext)
+ regex = '^[a-zA-Z0-9_]*_%sLIBRARIES *\\+{0,1}= *%s\\.%s' % (perhapsLT, libname, libext)
pattern = re.compile(regex, re.M)
insnippets = bool(pattern.findall(allsnippets))
# Then test if $sourcebase/Makefile.am (if it exists) specifies it.
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index f8d9910ab7..9a3fde66ea 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -461,7 +461,7 @@ class GLTestDir(object):
for line in snippet.split('\n')
if line.strip() ]
snippet = '\n'.join(lines)
- pattern = re.compile('AC_REQUIRE\\(\\[([^()].*)\\]\\)', re.M)
+ pattern = re.compile('AC_REQUIRE\\(\\[([^()]*)\\]\\)', re.M)
snippet = pattern.sub('\\1', snippet)
snippet = snippet.strip()
snippets += [snippet]
@@ -578,7 +578,7 @@ class GLTestDir(object):
for line in snippet.split('\n')
if line.strip() ]
snippet = '\n'.join(lines)
- pattern = re.compile('AC_REQUIRE\\(\\[([^()].*)\\]\\)', re.M)
+ pattern = re.compile('AC_REQUIRE\\(\\[([^()]*)\\]\\)', re.M)
snippet = pattern.sub('\\1', snippet)
snippet = snippet.strip()
snippets += [snippet]