From: Collin Funk Date: Sun, 3 Mar 2024 02:43:26 +0000 (-0800) Subject: gnulib-tool.py: Fix output of gnulib-comp.m4. X-Git-Tag: v1.0~346 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f52d4a7b78be73060cf01640b40ebc88193c12e8;p=gnulib.git gnulib-tool.py: Fix output of gnulib-comp.m4. * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Fix indentation. Don't print nonstring values into gnulib-comp.m4. --- diff --git a/ChangeLog b/ChangeLog index 1fc4425325..098868de10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024-03-03 Collin Funk + Bruno Haible + + gnulib-tool.py: Fix output of gnulib-comp.m4. + * pygnulib/GLEmiter.py (GLEmiter.autoconfSnippets): Fix indentation. + Don't print nonstring values into gnulib-comp.m4. + 2024-03-03 Collin Funk gnulib-tool.py: Make output of test Makefile.am match gnulib-tool. diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 2a8ede9335..8939917a0a 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -297,12 +297,12 @@ class GLEmiter(object): if moduletable.isConditional(depmodule): shellfunc = depmodule.getShellFunc() condition = moduletable.getCondition(module, depmodule) - if condition != None: - emit += ' if %s; then\n' % condition - emit += ' %s\n' % shellfunc - emit += ' fi\n' - else: # if condition == None - emit += ' %s\n' % shellfunc + if condition != None and condition != True: + emit += ' if %s; then\n' % condition + emit += ' %s\n' % shellfunc + emit += ' fi\n' + else: # if condition == None or condition == True + emit += ' %s\n' % shellfunc # if not moduletable.isConditional(depmodule) else: # The autoconf code for $dep has already been emitted above and @@ -329,11 +329,11 @@ class GLEmiter(object): if moduletable.isConditional(depmodule): shellfunc = depmodule.getShellFunc() condition = moduletable.getCondition(module, depmodule) - if condition != None: + if condition != None and condition != True: emit += ' if %s; then\n' % condition emit += ' %s\n' % shellfunc emit += ' fi\n' - else: # if condition == None + else: # if condition == None or condition == True emit += ' %s\n' % shellfunc # if not moduletable.isConditional(depmodule) else: