]> Savannah Git Hosting - gnulib.git/commitdiff
[backport] gnulib-tool: fix incompatibility with autopoint 0.18.2
authorDmitry Selyutin <ghostmansd@gmail.com>
Sat, 9 Sep 2017 16:48:53 +0000 (19:48 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 9 Sep 2017 16:53:05 +0000 (19:53 +0300)
commit 8e858e6d77dd239e9102626b292519eae170679a
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sat Jan 5 08:03:10 2013 -0800

    gnulib-tool: fix incompatibility with autopoint 0.18.2

    * gnulib-tool: Don't indent AM_GNU_GETTEXT_VERSION line.
    Problem reported by Tom G. Christensen in
    <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00053.html>.

pygnulib/generator.py

index 148920df7b11f09a92935905a02c457430a784bb..e8c6a231018013168a65f8c0e3f1b9a6b9d72877 100644 (file)
@@ -237,6 +237,10 @@ class AutoconfSnippet(Generator):
                 src = "AM_GNU_GETTEXT([external])"
                 dst = "dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.'"
                 snippet = snippet.replace(src, dst)
+            else:
+                # Don't indent AM_GNU_GETTEXT_VERSION line, as that confuses
+                # autopoint through at least GNU gettext version 0.18.2.
+                snippet = snippet.lstrip()
             lines = (_ for _ in snippet.split("\n") if _)
             for line in lines:
                 yield line