mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04: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
|
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
|
%.gmo: $(srcdir)/%.po
|
||||||
@file=`echo $* | sed 's,.*/,,'`.gmo \
|
@file=`echo $* | sed 's,.*/,,'`.gmo \
|
||||||
&& rm -f $$file && echo -n $*": " \
|
&& rm -f $$file && echo -n $*": " \
|
||||||
@ -65,8 +69,8 @@ update-po: Makefile $(srcdir)/$(PACKAGE).pot
|
|||||||
@cd $(srcdir)
|
@cd $(srcdir)
|
||||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||||
echo -n "$(lang): "; \
|
echo -n "$(lang): "; \
|
||||||
if $(MSGMERGE) $(lang).po $(PACKAGE).pot -o $(lang).new.po; then \
|
if $(MSGMERGE) $(srcdir)/$(lang).po $(srcdir)/$(PACKAGE).pot -o $(lang).new.po; then \
|
||||||
mv -f $(lang).new.po $(lang).po; \
|
mv -f $(lang).new.po $(srcdir)/$(lang).po; \
|
||||||
else \
|
else \
|
||||||
echo "msgmerge failed!"; \
|
echo "msgmerge failed!"; \
|
||||||
rm -f $(lang).new.po; \
|
rm -f $(lang).new.po; \
|
||||||
@ -84,7 +88,7 @@ update-gmo: Makefile $(GMOFILES)
|
|||||||
check-po:
|
check-po:
|
||||||
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
@$(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
|
||||||
echo -n "$(lang): "; \
|
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
|
### Installation and distribution
|
||||||
|
Loading…
Reference in New Issue
Block a user