From: Collin Funk Date: Sat, 6 Apr 2024 12:57:51 +0000 (-0700) Subject: gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR. X-Git-Tag: v1.0~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaf06caa22383eb44a630afab1e01b6f47bbd751;p=thirdparty%2Fgnulib.git 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(). --- diff --git a/ChangeLog b/ChangeLog index 7e90c5bad1..197b2fae76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-04-07 Collin Funk + + 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 gnulib-tool.py: Locate configure.ac correctly when --dir is given. diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index ee238a1615..2776f2c964 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -93,11 +93,10 @@ class GLImport: 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'] == '':