]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
man/po: keep tmpdir out of po files
authorSerge Hallyn <serge@hallyn.com>
Wed, 17 Jun 2026 18:55:07 +0000 (13:55 -0500)
committerSerge Hallyn <serge@hallyn.com>
Wed, 17 Jun 2026 20:05:55 +0000 (15:05 -0500)
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>
man/po/Makefile.in

index c89faf5f9688cad188fb72c7f005a3dfb02c7b3f..991177bca211ac7ab0110607b4b91d6dec2cc750 100644 (file)
@@ -96,14 +96,15 @@ $(DOMAIN).pot-update: $(XMLFILES) $(srcdir)/XMLFILES remove-potcdate.sed
        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; \