]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Correct the result of --extract-dependents.
authorBruno Haible <bruno@clisp.org>
Fri, 16 Aug 2024 16:24:54 +0000 (18:24 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 16 Aug 2024 16:24:54 +0000 (18:24 +0200)
* pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current
module's test module, if that exists.

ChangeLog
pygnulib/GLModuleSystem.py

index 51dee4c201d028c3a69012f1be6731f03e270ab1..2d8bbcd229291cf4b1cbf31aaa162f90cf822488 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-16  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool.py: Correct the result of --extract-dependents.
+       * pygnulib/GLModuleSystem.py (GLModule.getDependents): Add the current
+       module's test module, if that exists.
+
 2024-08-16  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.py: Don't treat 'valgrind-tests' as a tests module.
index 1f758fb0e55eacdbbadcec5cc601dd531895a66a..e9855f775c5cbcac323528e50b166be37e4ecd78 100644 (file)
@@ -596,6 +596,11 @@ class GLModule:
             listing = [ line
                         for line in listing
                         if self.modulesystem.file_is_module(line) ]
+            # ${module}-tests implicitly depends on ${module}, if both exist.
+            if self.isNonTests():
+                implicit_dependent = self.name+'-tests'
+                if self.modulesystem.exists(implicit_dependent):
+                    listing.append(implicit_dependent)
             candidates = sorted(set(listing))
             result = []
             for name in candidates: