mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Fix update-po and check-po when srcdir != builddir
Now, $(lang).po files are always read and written in srcdir. Also, document how *.gmo files end up in both srcdir and builddir.
This commit is contained in:
parent
0281f732ab
commit
f25f944123
10
po/Makefile
10
po/Makefile
@ -12,6 +12,10 @@ MSGMERGE = msgmerge
|
||||
POTFILES_ABS_LIST = potfiles.list
|
||||
|
||||
|
||||
# Distributed elinks-*.tar.gz packages include po/*.gmo files, so that
|
||||
# users can install ELinks even if they don't have a msgfmt program.
|
||||
# However, if srcdir != builddir, then this Makefile ignores the *.gmo
|
||||
# files in the srcdir and builds new ones in the builddir.
|
||||
%.gmo: $(srcdir)/%.po
|
||||
@file=`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && echo -n $*": " \
|
||||
@ -65,8 +69,8 @@ update-po: Makefile $(srcdir)/$(PACKAGE).pot
|
||||
@cd $(srcdir)
|
||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||
echo -n "$(lang): "; \
|
||||
if $(MSGMERGE) $(lang).po $(PACKAGE).pot -o $(lang).new.po; then \
|
||||
mv -f $(lang).new.po $(lang).po; \
|
||||
if $(MSGMERGE) $(srcdir)/$(lang).po $(srcdir)/$(PACKAGE).pot -o $(lang).new.po; then \
|
||||
mv -f $(lang).new.po $(srcdir)/$(lang).po; \
|
||||
else \
|
||||
echo "msgmerge failed!"; \
|
||||
rm -f $(lang).new.po; \
|
||||
@ -84,7 +88,7 @@ update-gmo: Makefile $(GMOFILES)
|
||||
check-po:
|
||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||
echo -n "$(lang): "; \
|
||||
$(GMSGFMT) --check --check-accelerators=~ --verbose --statistics -o /dev/null $(lang).po; \
|
||||
$(GMSGFMT) --check --check-accelerators=~ --verbose --statistics -o /dev/null $(srcdir)/$(lang).po; \
|
||||
)
|
||||
|
||||
### Installation and distribution
|
||||
|
Loading…
x
Reference in New Issue
Block a user