From 8cb8cd518dc879b47a80c0f95b28421e21dfa3d4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 25 Mar 2024 13:44:24 +0100 Subject: [PATCH] gnulib-tool.py: Tweak last change. * pygnulib/GLImport.py (GLImport.execute): Recognize #if also at the beginning of an Include snippet. --- ChangeLog | 6 ++++++ pygnulib/GLImport.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0c08adbda1..f314619543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-03-25 Bruno Haible + + gnulib-tool.py: Tweak last change. + * pygnulib/GLImport.py (GLImport.execute): Recognize #if also at the + beginning of an Include snippet. + 2024-03-25 Collin Funk gnulib-tool.py: Fix output of #include directive advice. diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 5de9cdfc47..1a45776f4f 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -1448,7 +1448,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix include_if = [] for module in modules: include = module.getInclude() - if '\n#if' in include: + if '\n#if' in '\n'+include: include_if += [ f' {line}' for line in include.split('\n') if line.strip() ] -- 2.39.5