1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

Simplify update-po target.

This commit is contained in:
Laurent MONIN 2005-10-18 12:11:55 +02:00 committed by Laurent MONIN
parent 246e321848
commit 0407633145

View File

@ -63,23 +63,16 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES_REL)
# either <lang> or <lang>.po when calling make. Example: make update-po PO=is # either <lang> or <lang>.po when calling make. Example: make update-po PO=is
update-po: Makefile $(srcdir)/$(PACKAGE).pot update-po: Makefile $(srcdir)/$(PACKAGE).pot
@cd $(srcdir); \ @cd $(srcdir)
if test -n "$(PO)"; then \ @$(foreach C,$(basename $(if $(strip $(PO)),$(PO),$(GMOFILES))), \
lang=`echo $(PO) | sed 's/\.po//'`; \ echo -n "$(C): "; \
catalogs=$$lang.gmo; \ if $(MSGMERGE) $(C).po $(PACKAGE).pot -o $(C).new.po; then \
fi; \ mv -f $(C).new.po $(C).po; \
if test -z "$$catalogs"; then catalogs='$(GMOFILES)'; fi; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
echo -n "$$lang: "; \
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
else \ else \
echo "msgmerge for $$cat failed!"; \ echo "msgmerge failed!"; \
rm -f $$lang.new.po; \ rm -f $(C).new.po; \
fi; \ fi; \
done )
$(MAKE) update-gmo $(MAKE) update-gmo
update-gmo: Makefile $(GMOFILES) update-gmo: Makefile $(GMOFILES)