From: Dmitry Selyutin Date: Mon, 4 Dec 2017 16:58:34 +0000 (+0300) Subject: module: nested automake conditionals workaround X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=379ea7054e497760a69d40b2fedcfb46c3fd6df9;p=thirdparty%2Fgnulib.git module: nested automake conditionals workaround --- diff --git a/pygnulib/module.py b/pygnulib/module.py index c0a322e4f5..7bc1b18469 100644 --- a/pygnulib/module.py +++ b/pygnulib/module.py @@ -567,9 +567,18 @@ def transitive_closure(lookup, modules, **options): pass # ignore non-existent tests for (dependency, condition) in demander.dependencies: module = lookup(dependency) - if not _exclude_(module): + if gnumake and condition.startswith("if "): + # 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. + current.add((module, None, None)) + else: condition = condition if condition.strip() else None - current.add((module, demander, condition)) + if not _exclude_(module): + current.add((module, demander, condition)) queue.add(demander) return current