From: Collin Funk Date: Tue, 2 Apr 2024 11:41:22 +0000 (-0700) Subject: gnulib-tool.py: Fix determination whether to add the dummy module. X-Git-Tag: v1.0~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fadccab27f6bf6afb205054c47881389dbdcd2d4;p=thirdparty%2Fgnulib.git gnulib-tool.py: Fix determination whether to add the dummy module. * pygnulib/GLModuleSystem.py (GLModuleSystem.add_dummy): Only match the 'lib_SOURCES' variable; stop at end-of-line. --- diff --git a/ChangeLog b/ChangeLog index c6ccc0f737..6e6ebb6127 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-04-02 Collin Funk + + gnulib-tool.py: Fix determination whether to add the dummy module. + * pygnulib/GLModuleSystem.py (GLModuleSystem.add_dummy): Only match the + 'lib_SOURCES' variable; stop at end-of-line. + 2024-04-02 Pádraig Brady renameatu: handle ENOSYS from renameatx_np diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py index c406dcb6e3..f02f369f0e 100644 --- a/pygnulib/GLModuleSystem.py +++ b/pygnulib/GLModuleSystem.py @@ -1031,9 +1031,9 @@ class GLModuleTable(object): # Extract the value of unconditional "lib_SOURCES += ..." augmentations. snippet = combine_lines(snippet) snippet = self.remove_if_blocks(snippet) - pattern = re.compile(r'^lib_SOURCES[\t ]*\+=([^#]*).*$', re.M) - for matching_rhs in pattern.findall(snippet): - files = matching_rhs.split(' ') + pattern = re.compile(r'^lib_SOURCES[\t ]*\+=[\t ]*([^#]+?)$', re.MULTILINE) + for matching_rhs in re.finditer(pattern, snippet): + files = matching_rhs.group(1).split() for file in files: # Ignore .h files since they are not compiled. if not file.endswith('.h'):