]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 6 Apr 2024 12:57:51 +0000 (05:57 -0700)
committerBruno Haible <bruno@clisp.org>
Sun, 7 Apr 2024 11:31:44 +0000 (13:31 +0200)
* 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().

ChangeLog
pygnulib/GLImport.py

index 7e90c5bad1fae44c89be80f0e736781118d7fc72..197b2fae762228b8963de4ef88604b5a5e4c5053 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+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.
index ee238a1615fc413078ca07908815c2f4e30ce159..2776f2c964e260e133e71573f26c48367a61dca7 100644 (file)
@@ -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'] == '':