From ae593ef0dc43ed0260523b611eb0675dabaefe00 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 2 Mar 2024 18:43:26 -0800 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ pygnulib/GLEmiter.py | 12 ++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ba80e7c39..19b308e552 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-02 Collin Funk + + 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-02 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 7115dfe115..7f850b8dec 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' + if condition != None and type(condition) is str: + emit += ' if %s; then\n' % condition + emit += ' %s\n' % shellfunc + emit += ' fi\n' else: # if condition == None - emit += ' %s\n' % shellfunc + emit += ' %s\n' % shellfunc # if not moduletable.isConditional(depmodule) else: # The autoconf code for $dep has already been emitted above and @@ -329,7 +329,7 @@ class GLEmiter(object): if moduletable.isConditional(depmodule): shellfunc = depmodule.getShellFunc() condition = moduletable.getCondition(module, depmodule) - if condition != None: + if condition != None and type(condition) is str: emit += ' if %s; then\n' % condition emit += ' %s\n' % shellfunc emit += ' fi\n' -- 2.44.0