Merge pull request #401 from hallyn/2021-08-14/dropxml2po

man/po/Makefile.in: switch from xml2po to itstool
This commit is contained in:
Serge Hallyn 2021-08-14 19:28:18 -05:00 committed by GitHub
commit a5bf83d2e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,9 +90,17 @@ $(DOMAIN).pot-update: $(XMLFILES) $(srcdir)/XMLFILES remove-potcdate.sed
@set -e; tmpdir=`pwd`; \ @set -e; tmpdir=`pwd`; \
echo "cd $(top_srcdir)/man"; \ echo "cd $(top_srcdir)/man"; \
cd $(top_srcdir)/man; \ cd $(top_srcdir)/man; \
echo "xml2po --expand-all-entities -o $$tmpdir/$(DOMAIN).po $(notdir $(XMLFILES))"; \ files=""; \
xml2po --expand-all-entities -o $$tmpdir/$(DOMAIN).po $(notdir $(XMLFILES)); \ for file in $(notdir $(XMLFILES)); do \
cd $$tmpdir if grep -q SHADOW-CONFIG-HERE $$file ; then \
sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $$file > $$file.out; \
else \
sed -e 's/^\(<!DOCTYPE .*docbookx.dtd"\)>/\1 [<!ENTITY % config SYSTEM "config.xml">%config;]>/' $$file > $$file.out; \
fi; \
files="$$files $$file.out"; \
done; \
itstool -d -o $$tmpdir/$(DOMAIN).po $$files; \
cd $$tmpdir; \
test ! -f $(DOMAIN).po || { \ test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \ if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \