]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Tweak last change.
authorBruno Haible <bruno@clisp.org>
Mon, 25 Mar 2024 12:44:24 +0000 (13:44 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 25 Mar 2024 12:45:22 +0000 (13:45 +0100)
* pygnulib/GLImport.py (GLImport.execute): Recognize #if also at the
beginning of an Include snippet.

ChangeLog
pygnulib/GLImport.py

index 0c08adbda19a5ad786175a676ddcd591818be48e..f314619543c440fe438bf76f8e062930f629ec35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-25  Bruno Haible  <bruno@clisp.org>
+
+       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  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Fix output of #include directive advice.
index 5de9cdfc47198f3d8a01a8062023e48e2a0a43ab..1a45776f4f5e2e860e57318e8080792afcdf1b9e 100644 (file)
@@ -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() ]