When we pass every filename to the itstool call as $tmpdir/$base.out,
the file:line listed in the .po includes the $tmpdir. That means
every update-po changes every .po.
Instead, cd to $tmpdir and pass in the basenames.
Signed-off-by: Serge Hallyn <serge@hallyn.com>
for file in $(notdir $(XMLFILES)); do \
base=`basename $$file`; \
outfile=$$tmpdir/$$base.out; \
+ outbase=$$base.out; \
if grep -q SHADOW-CONFIG-HERE $$file ; then \
sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $$file > $$outfile; \
else \
sed -e 's/^\(<!DOCTYPE .*docbookx.dtd"\)>/\1 [<!ENTITY % config SYSTEM "config.xml">%config;]>/' $$file > $$outfile; \
fi; \
- files="$$files $$outfile"; \
+ files="$$files $$outbase"; \
done; \
- itstool -d -o $$tmpdir/$(DOMAIN).po $$files; \
+ cd $$tmpdir; itstool -d -o $(DOMAIN).po $$files; \
sed -i '1i \
# To re-generate, run "cd man/po; make update-po"' $$tmpdir/$(DOMAIN).po; \
cd $$origdir; \