From 5c087011efa2817a7e857f69a1cdd22c21a5053d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 7 Aug 2022 13:46:15 +0200 Subject: gnulib-tool.py: Fix some regex uses. * pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Match the regex against all lines of the snippet, not only the first line. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippet): Likewise. --- pygnulib/GLModuleSystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pygnulib/GLModuleSystem.py') diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index e1b62ec56c..75316515b8 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -1041,7 +1041,7 @@ class GLModuleTable(object): if self.config['conddeps']: automake_snippet = \ module.getAutomakeSnippet_Conditional() - pattern = re.compile('^if') + pattern = re.compile('^if', re.M) if not pattern.findall(automake_snippet): self.addUnconditional(module) conditional = self.isConditional(module) -- cgit v1.2.1