> commit 4bf9c96497946ce6f7b84f6527ed0291657cf728
> Author: Bruno Haible <br...@clisp.org>
> Date:   Sun Jan 9 15:38:51 2022 +0100
>
>     Remove influence of Automake conditionals on conditional dependencies.
>
> So, once that is done things should work properly. Hopefully.

Looks like my prediction was correct.

Here is a basic test to show things are moving in the correct direction:

$ env GNULIB_TOOL_IMPL=sh+py gnulib-tool --create-testdir --dir mytestdir 
--conditional-dependencies regex

And then diff'ing the shell and python output before part 60, after part
60, and then after this patch:

$ ls -l *.diff
-rw-r--r--. 1 collin collin 1745735 Mar 16 20:00 0001-pre60.diff
-rw-r--r--. 1 collin collin 1745735 Mar 16 20:03 0002-pre61.diff
-rw-r--r--. 1 collin collin   22564 Mar 16 20:06 0003-post61.diff

Collin

>From 3694bbf770e161fc20b89d910a639b579ff06db7 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 16 Mar 2024 19:56:42 -0700
Subject: [PATCH 2/2] gnulib-tool.py: Follow gnulib-tool changes, part 61.

Follow gnulib-tool change
2022-01-09  Bruno Haible  <br...@clisp.org>
Remove influence of Automake conditionals on conditional dependencies.

* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
inhibit conditional dependencies processing on a module that uses an
Automake conditional.
---
 ChangeLog                  | 10 ++++++++++
 gnulib-tool.py.TODO        | 18 ------------------
 pygnulib/GLModuleSystem.py | 12 ------------
 3 files changed, 10 insertions(+), 30 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 58363b10a2..926e8b20a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-03-16  Collin Funk  <collin.fu...@gmail.com>
+
+	gnulib-tool.py: Follow gnulib-tool changes, part 61.
+	Follow gnulib-tool change
+	2022-01-09  Bruno Haible  <br...@clisp.org>
+	Remove influence of Automake conditionals on conditional dependencies.
+	* pygnulib/GLModuleSystem.py (GLModuleTable.transitive_closure): Don't
+	inhibit conditional dependencies processing on a module that uses an
+	Automake conditional.
+
 2024-03-16  Collin Funk  <collin.fu...@gmail.com>
 
 	gnulib-tool.py: Follow gnulib-tool changes, part 60.
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index c02c9d1918..698f0d8ed2 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -73,24 +73,6 @@ Date:   Tue Mar 1 10:01:22 2022 -0800
 
 --------------------------------------------------------------------------------
 
-commit 4bf9c96497946ce6f7b84f6527ed0291657cf728
-Author: Bruno Haible <br...@clisp.org>
-Date:   Sun Jan 9 15:38:51 2022 +0100
-
-    Remove influence of Automake conditionals on conditional dependencies.
-
-    * m4/gnulib-common.m4 (gl_CONDITIONAL): New macro.
-    (gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL.
-    * m4/libgmp.m4 (gl_LIBGMP): Likewise.
-    * modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
-    Likewise.
-    * modules/uchar-c++-tests (configure.ac): Likewise.
-    * gnulib-tool (func_modules_transitive_closure): Don't inhibit
-    conditional dependencies processing on a module that uses an Automake
-    conditional.
-
---------------------------------------------------------------------------------
-
 commit 9af17c55629c4cbe2facdc9edb5242136567ebba
 Author: Bruno Haible <br...@clisp.org>
 Date:   Sat Dec 25 14:30:57 2021 +0100
diff --git a/pygnulib/GLModuleSystem.py b/pygnulib/GLModuleSystem.py
index 9f3a3a79d7..37433a42db 100644
--- a/pygnulib/GLModuleSystem.py
+++ b/pygnulib/GLModuleSystem.py
@@ -916,18 +916,6 @@ class GLModuleTable(object):
                 if module not in self.avoids:
                     outmodules += [module]
                     if self.config['conddeps']:
-                        automake_snippet = \
-                            module.getAutomakeSnippet_Conditional()
-                        pattern = re.compile('^if', re.M)
-                        if not self.config['gnu_make'] and not pattern.findall(automake_snippet):
-                            # A module whose Makefile.am snippet contains a
-                            # reference to an automake conditional. If we were
-                            # to use it conditionally, we would get an error
-                            #   configure: error: conditional "..." was never defined.
-                            # because automake 1.11.1 does not handle nested
-                            # conditionals correctly. As a workaround, make the
-                            # module unconditional.
-                            self.addUnconditional(module)
                         conditional = self.isConditional(module)
                     dependencies = module.getDependenciesWithConditions()
                     depmodules = [ pair[0]
-- 
2.44.0

Reply via email to