[Pkg-libvirt-commits] [libguestfs] 17/26: po-docs: Filter the po4a warning and =encoding line.

Hilko Bengen bengen at moszumanska.debian.org
Thu Mar 20 23:06:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.25.46
in repository libguestfs.

commit ad33a5434cf80c567286d5598875aa23f544eeaa
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Mar 18 15:19:37 2014 +0000

    po-docs: Filter the po4a warning and =encoding line.
---
 po-docs/Makefile.am | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am
index fd4efbf..17823ab 100644
--- a/po-docs/Makefile.am
+++ b/po-docs/Makefile.am
@@ -40,9 +40,12 @@ SUBDIRS = $(linguas)
 
 update-po: libguestfs-docs.pot
 
-# Note: po4a leaves empty '=encoding' lines in POD files.  Also it
-# includes a large warning message which ends up in the output.  We
-# post-process the output to remove both.
+# Note: po4a puts the following junk at the top of every POD file it
+# generates:
+#  - a warning
+#  - a probably bogus =encoding line
+# Remove both.
+# XXX Fix po4a so it doesn't do this.
 libguestfs-docs.pot: po4a.conf
 	$(PO4A) \
 	  -M utf-8 -L utf-8 -A utf-8 \
@@ -54,8 +57,7 @@ libguestfs-docs.pot: po4a.conf
 	  --copyright-holder "Red Hat Inc." \
 	  po4a.conf
 	for f in `cd $(srcdir); find $(linguas) -name '*.pod'`; do \
-	  echo '=encoding utf8' > $$f.new; \
-	  awk 'FNR >= 14 { print }' < $(srcdir)/$$f >> $$f.new; \
+	  sed '0,/^=encoding/d' < $$f > $$f.new; \
 	  mv $$f.new $$f; \
 	done
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list