+2024-04-07 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
+ * pygnulib/GLImport.py (GLImport.__init__): Don't modify the path given
+ by AC_CONFIG_AUX_DIR by prefixing it with destdir. Use a more strict
+ regular expression instead of cleaner().
+
2024-04-07 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Locate configure.ac correctly when --dir is given.
self.cache.setAuxDir('.')
with codecs.open(self.config.getAutoconfFile(), 'rb', 'UTF-8') as file:
data = file.read()
- pattern = re.compile(r'^AC_CONFIG_AUX_DIR\((.*)\)$', re.M)
- match = pattern.findall(data)
+ pattern = re.compile(r'^AC_CONFIG_AUX_DIR\([\[ ]*([^\]"\$`\\\)]+).*?$', re.MULTILINE)
+ match = pattern.search(data)
if match:
- result = cleaner(match)[0]
- self.cache.setAuxDir(joinpath(self.config['destdir'], result))
+ self.cache.setAuxDir(match.group(1))
pattern = re.compile(r'A[CM]_PROG_LIBTOOL', re.M)
guessed_libtool = bool(pattern.findall(data))
if self.config['auxdir'] == '':