po-docs: Run po4a-translate and sed commands separately

I noticed that 1-byte translated POD files were being generated in the
output directory (po-docs/ja/).  This seems to have happened because
po4a-translate was generating an error, but because we were
immediately pipeing the output into sed the error was suppressed.

By running them as two separate commands this cannot happen.

Fixes: commit bd896d68c0
(cherry picked from commit d755070346)
(cherry picked from commit bebec890e2)
This commit is contained in:
Richard W.M. Jones
2024-04-04 09:38:28 +01:00
parent dacbc82718
commit 8205084902

View File

@@ -179,13 +179,16 @@ virt-p2v.1: virt-p2v.pod virt-p2v-kernel-config.pod
# Remove both.
# XXX Fix po4a so it doesn't do this.
%.pod: $(srcdir)/../$(LINGUA).po
rm -f $@ $@-t
$(guestfs_am_v_po4a_translate)$(PO4A_TRANSLATE) \
-f pod \
-M utf-8 -L utf-8 \
-k 0 \
-m $(top_srcdir)/$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \
-p $< \
| $(SED) '0,/^=encoding/d' > $@
-l $@-t
$(SED) '0,/^=encoding/d' < $@-t > $@
rm $@-t
# XXX Can automake do this properly?
install-data-hook: