|
1 |
| -# $PostgreSQL: pgsql/src/nls-global.mk,v 1.11 2005/12/09 21:19:34 petere Exp $ |
| 1 | +# $PostgreSQL: pgsql/src/nls-global.mk,v 1.12 2006/04/05 13:40:15 petere Exp $ |
2 | 2 |
|
3 | 3 | # Common rules for Native Language Support (NLS)
|
4 | 4 | #
|
@@ -91,19 +91,22 @@ maintainer-check-po: $(PO_FILES)
|
91 | 91 | init-po: po/$(CATALOG_NAME).pot
|
92 | 92 |
|
93 | 93 |
|
| 94 | +definemerge-lang |
| 95 | +@printf 'merging$(1) ' |
| 96 | +@if$(MSGMERGE)$(srcdir)/po/$(1).po$< -o po/$(1).po.new$(addprefix --compendium=,$(shell find$(top_srcdir) -name$(1).po -printf '%p ')); \ |
| 97 | +then \ |
| 98 | + mv$(srcdir)/po/$(1).po po/$(1).po.old; \ |
| 99 | + mv po/$(1).po.new$(srcdir)/po/$(1).po; \ |
| 100 | +else \ |
| 101 | + echo "msgmerge for$(1) failed"; \ |
| 102 | + rm -f po/$(1).po.new; \ |
| 103 | +fi |
| 104 | + |
| 105 | +endef |
| 106 | + |
94 | 107 | update-po: po/$(CATALOG_NAME).pot
|
95 | 108 | ifdefMSGMERGE
|
96 |
| -@for lang in $(LANGUAGES); do \ |
97 |
| - echo "merging $$lang:"; \ |
98 |
| - if $(MSGMERGE) $(srcdir)/po/$$lang.po $< -o po/$$lang.po.new; \ |
99 |
| - then \ |
100 |
| - mv $(srcdir)/po/$$lang.po po/$$lang.po.old; \ |
101 |
| - mv po/$$lang.po.new $(srcdir)/po/$$lang.po; \ |
102 |
| - else \ |
103 |
| - echo "msgmerge for $$lang failed"; \ |
104 |
| - rm -f po/$$lang.po.new; \ |
105 |
| - fi; \ |
106 |
| -done |
| 109 | +$(foreach lang,$(LANGUAGES),$(call merge-lang,$(lang))) |
107 | 110 | else
|
108 | 111 | @echo "You don't have 'msgmerge'." ; exit 1
|
109 | 112 | endif
|
|