From: Serge Hallyn Date: Wed, 17 Jun 2026 18:55:07 +0000 (-0500) Subject: man/po: keep tmpdir out of po files X-Git-Tag: 4.20.0-rc1~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4bc5884050e5054698968ca329b9836e91df6c6a;p=thirdparty%2Fshadow.git man/po: keep tmpdir out of po files 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 --- diff --git a/man/po/Makefile.in b/man/po/Makefile.in index c89faf5f9..991177bca 100644 --- a/man/po/Makefile.in +++ b/man/po/Makefile.in @@ -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/^/%config;/' $$file > $$outfile; \ else \ sed -e 's/^\(/\1 [%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; \