+2024-06-05 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Don't perform unnecessary configure.ac scanning.
+ * pygnulib/GLImport.py (GLImport.execute): Use re.search() instead of
+ re.findall() since we only care about finding one match. Remove
+ unnecessary bool() calls.
+
2024-06-05 Bruno Haible <bruno@clisp.org>
setenv: On native Windows, don't modify _environ directly.
# Detect position_early_after.
with open(configure_ac, mode='r', newline='\n', encoding='utf-8') as file:
data = file.read()
- match_result1 = \
- bool(re.compile(r'^ *AC_PROG_CC_STDC', re.M).findall(data))
- match_result2 = \
- bool(re.compile(r'^ *AC_PROG_CC_C99', re.M).findall(data))
+ match_result1 = re.compile(r'^ *AC_PROG_CC_STDC', re.MULTILINE).search(data)
+ match_result2 = re.compile(r'^ *AC_PROG_CC_C99', re.MULTILINE).search(data)
if match_result1:
print(' - replace AC_PROG_CC_STDC with AC_PROG_CC in %s,' % (configure_ac))
position_early_after = 'AC_PROG_CC_STDC'