| 1 | # Makefile for PO directory in any package using GNU gettext. |
| 2 | # Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu> |
| 3 | # |
| 4 | # This file can be copied and used freely without restrictions. It can |
| 5 | # be used in projects which are not available under the GNU General Public |
| 6 | # License but which still want to provide support for the GNU gettext |
| 7 | # functionality. |
| 8 | # Please note that the actual code of GNU gettext is covered by the GNU |
| 9 | # General Public License and is *not* in the public domain. |
| 10 | # |
| 11 | # Origin: gettext-0.17 |
| 12 | GETTEXT_MACRO_VERSION = 0.17 |
| 13 | |
| 14 | PACKAGE = @PACKAGE@ |
| 15 | VERSION = @VERSION@ |
| 16 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
| 17 | |
| 18 | SHELL = /bin/sh |
| 19 | @SET_MAKE@ |
| 20 | |
| 21 | srcdir = @srcdir@ |
| 22 | top_srcdir = @top_srcdir@ |
| 23 | VPATH = @srcdir@ |
| 24 | |
| 25 | prefix = @prefix@ |
| 26 | exec_prefix = @exec_prefix@ |
| 27 | datarootdir = @datarootdir@ |
| 28 | datadir = @datadir@ |
| 29 | localedir = @localedir@ |
| 30 | gettextsrcdir = $(datadir)/gettext/po |
| 31 | |
| 32 | INSTALL = @INSTALL@ |
| 33 | INSTALL_DATA = @INSTALL_DATA@ |
| 34 | |
| 35 | # We use $(mkdir_p). |
| 36 | # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as |
| 37 | # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, |
| 38 | # @install_sh@ does not start with $(SHELL), so we add it. |
| 39 | # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined |
| 40 | # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake |
| 41 | # versions, $(mkinstalldirs) and $(install_sh) are unused. |
| 42 | mkinstalldirs = $(SHELL) @install_sh@ -d |
| 43 | install_sh = $(SHELL) @install_sh@ |
| 44 | MKDIR_P = @MKDIR_P@ |
| 45 | mkdir_p = @mkdir_p@ |
| 46 | |
| 47 | GMSGFMT_ = @GMSGFMT@ |
| 48 | GMSGFMT_no = @GMSGFMT@ |
| 49 | GMSGFMT_yes = @GMSGFMT_015@ |
| 50 | GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) |
| 51 | MSGFMT_ = @MSGFMT@ |
| 52 | MSGFMT_no = @MSGFMT@ |
| 53 | MSGFMT_yes = @MSGFMT_015@ |
| 54 | MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) |
| 55 | XGETTEXT_ = @XGETTEXT@ |
| 56 | XGETTEXT_no = @XGETTEXT@ |
| 57 | XGETTEXT_yes = @XGETTEXT_015@ |
| 58 | XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) |
| 59 | MSGMERGE = msgmerge |
| 60 | MSGMERGE_UPDATE = @MSGMERGE@ --update |
| 61 | MSGINIT = msginit |
| 62 | MSGCONV = msgconv |
| 63 | MSGFILTER = msgfilter |
| 64 | |
| 65 | POFILES = @POFILES@ |
| 66 | GMOFILES = @GMOFILES@ |
| 67 | UPDATEPOFILES = @UPDATEPOFILES@ |
| 68 | DUMMYPOFILES = @DUMMYPOFILES@ |
| 69 | DISTFILES.common = Makefile.in.in remove-potcdate.sin \ |
| 70 | $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) |
| 71 | DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ |
| 72 | $(POFILES) $(GMOFILES) \ |
| 73 | $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) |
| 74 | |
| 75 | POTFILES = \ |
| 76 | |
| 77 | CATALOGS = @CATALOGS@ |
| 78 | |
| 79 | # Makevars gets inserted here. (Don't remove this line!) |
| 80 | |
| 81 | .SUFFIXES: |
| 82 | .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update |
| 83 | |
| 84 | .po.mo: |
| 85 | @echo "$(MSGFMT) -c -o $@ $<"; \ |
| 86 | $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ |
| 87 | |
| 88 | .po.gmo: |
| 89 | @lang=`echo $* | sed -e 's,.*/,,'`; \ |
| 90 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 91 | echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ |
| 92 | cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo |
| 93 | |
| 94 | .sin.sed: |
| 95 | sed -e '/^#/d' $< > t-$@ |
| 96 | mv t-$@ $@ |
| 97 | |
| 98 | |
| 99 | all: check-macro-version all-@USE_NLS@ |
| 100 | |
| 101 | all-yes: stamp-po |
| 102 | all-no: |
| 103 | |
| 104 | # Ensure that the gettext macros and this Makefile.in.in are in sync. |
| 105 | check-macro-version: |
| 106 | echo |
| 107 | |
| 108 | # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no |
| 109 | # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because |
| 110 | # we don't want to bother translators with empty POT files). We assume that |
| 111 | # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. |
| 112 | # In this case, stamp-po is a nop (i.e. a phony target). |
| 113 | |
| 114 | # stamp-po is a timestamp denoting the last time at which the CATALOGS have |
| 115 | # been loosely updated. Its purpose is that when a developer or translator |
| 116 | # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, |
| 117 | # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent |
| 118 | # invocations of "make" will do nothing. This timestamp would not be necessary |
| 119 | # if updating the $(CATALOGS) would always touch them; however, the rule for |
| 120 | # $(POFILES) has been designed to not touch files that don't need to be |
| 121 | # changed. |
| 122 | stamp-po: $(srcdir)/$(DOMAIN).pot |
| 123 | test ! -f $(srcdir)/$(DOMAIN).pot || \ |
| 124 | test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) |
| 125 | @test ! -f $(srcdir)/$(DOMAIN).pot || { \ |
| 126 | echo "touch stamp-po" && \ |
| 127 | echo timestamp > stamp-poT && \ |
| 128 | mv stamp-poT stamp-po; \ |
| 129 | } |
| 130 | |
| 131 | # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', |
| 132 | # otherwise packages like GCC can not be built if only parts of the source |
| 133 | # have been downloaded. |
| 134 | |
| 135 | # This target rebuilds $(DOMAIN).pot; it is an expensive operation. |
| 136 | # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. |
| 137 | $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
| 138 | if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ |
| 139 | package_gnu='GNU '; \ |
| 140 | else \ |
| 141 | package_gnu=''; \ |
| 142 | fi; \ |
| 143 | if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
| 144 | msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
| 145 | else \ |
| 146 | msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ |
| 147 | fi; \ |
| 148 | case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
| 149 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ |
| 150 | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
| 151 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ |
| 152 | --files-from=$(srcdir)/POTFILES.in \ |
| 153 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ |
| 154 | --msgid-bugs-address="$$msgid_bugs_address" \ |
| 155 | ;; \ |
| 156 | *) \ |
| 157 | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
| 158 | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ |
| 159 | --files-from=$(srcdir)/POTFILES.in \ |
| 160 | --copyright-holder='$(COPYRIGHT_HOLDER)' \ |
| 161 | --package-name="$${package_gnu}@PACKAGE@" \ |
| 162 | --package-version='@VERSION@' \ |
| 163 | --msgid-bugs-address="$$msgid_bugs_address" \ |
| 164 | ;; \ |
| 165 | esac |
| 166 | test ! -f $(DOMAIN).po || { \ |
| 167 | if test -f $(srcdir)/$(DOMAIN).pot; then \ |
| 168 | sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
| 169 | sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ |
| 170 | if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ |
| 171 | rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ |
| 172 | else \ |
| 173 | rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ |
| 174 | mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ |
| 175 | fi; \ |
| 176 | else \ |
| 177 | mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ |
| 178 | fi; \ |
| 179 | } |
| 180 | |
| 181 | # This rule has no dependencies: we don't need to update $(DOMAIN).pot at |
| 182 | # every "make" invocation, only create it when it is missing. |
| 183 | # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. |
| 184 | $(srcdir)/$(DOMAIN).pot: |
| 185 | $(MAKE) $(DOMAIN).pot-update |
| 186 | |
| 187 | # This target rebuilds a PO file if $(DOMAIN).pot has changed. |
| 188 | # Note that a PO file is not touched if it doesn't need to be changed. |
| 189 | $(POFILES): $(srcdir)/$(DOMAIN).pot |
| 190 | @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
| 191 | if test -f "$(srcdir)/$${lang}.po"; then \ |
| 192 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 193 | echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ |
| 194 | cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ |
| 195 | else \ |
| 196 | $(MAKE) $${lang}.po-create; \ |
| 197 | fi |
| 198 | |
| 199 | |
| 200 | install: install-exec install-data |
| 201 | install-exec: |
| 202 | install-data: install-data-@USE_NLS@ |
| 203 | if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 204 | $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ |
| 205 | for file in $(DISTFILES.common) Makevars.template; do \ |
| 206 | $(INSTALL_DATA) $(srcdir)/$$file \ |
| 207 | $(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 208 | done; \ |
| 209 | for file in Makevars; do \ |
| 210 | rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 211 | done; \ |
| 212 | else \ |
| 213 | : ; \ |
| 214 | fi |
| 215 | install-data-no: all |
| 216 | install-data-yes: all |
| 217 | $(mkdir_p) $(DESTDIR)$(datadir) |
| 218 | @catalogs='$(CATALOGS)'; \ |
| 219 | for cat in $$catalogs; do \ |
| 220 | cat=`basename $$cat`; \ |
| 221 | lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 222 | dir=$(localedir)/$$lang/LC_MESSAGES; \ |
| 223 | $(mkdir_p) $(DESTDIR)$$dir; \ |
| 224 | if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ |
| 225 | $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ |
| 226 | echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ |
| 227 | for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ |
| 228 | if test -n "$$lc"; then \ |
| 229 | if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ |
| 230 | link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ |
| 231 | mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 232 | mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 233 | (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ |
| 234 | for file in *; do \ |
| 235 | if test -f $$file; then \ |
| 236 | ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ |
| 237 | fi; \ |
| 238 | done); \ |
| 239 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 240 | else \ |
| 241 | if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ |
| 242 | :; \ |
| 243 | else \ |
| 244 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 245 | mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 246 | fi; \ |
| 247 | fi; \ |
| 248 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 249 | ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ |
| 250 | ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ |
| 251 | cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 252 | echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ |
| 253 | fi; \ |
| 254 | done; \ |
| 255 | done |
| 256 | |
| 257 | install-strip: install |
| 258 | |
| 259 | installdirs: installdirs-exec installdirs-data |
| 260 | installdirs-exec: |
| 261 | installdirs-data: installdirs-data-@USE_NLS@ |
| 262 | if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 263 | $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ |
| 264 | else \ |
| 265 | : ; \ |
| 266 | fi |
| 267 | installdirs-data-no: |
| 268 | installdirs-data-yes: |
| 269 | $(mkdir_p) $(DESTDIR)$(datadir) |
| 270 | @catalogs='$(CATALOGS)'; \ |
| 271 | for cat in $$catalogs; do \ |
| 272 | cat=`basename $$cat`; \ |
| 273 | lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 274 | dir=$(localedir)/$$lang/LC_MESSAGES; \ |
| 275 | $(mkdir_p) $(DESTDIR)$$dir; \ |
| 276 | for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ |
| 277 | if test -n "$$lc"; then \ |
| 278 | if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ |
| 279 | link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ |
| 280 | mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 281 | mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 282 | (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ |
| 283 | for file in *; do \ |
| 284 | if test -f $$file; then \ |
| 285 | ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ |
| 286 | fi; \ |
| 287 | done); \ |
| 288 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ |
| 289 | else \ |
| 290 | if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ |
| 291 | :; \ |
| 292 | else \ |
| 293 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 294 | mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ |
| 295 | fi; \ |
| 296 | fi; \ |
| 297 | fi; \ |
| 298 | done; \ |
| 299 | done |
| 300 | |
| 301 | # Define this as empty until I found a useful application. |
| 302 | installcheck: |
| 303 | |
| 304 | uninstall: uninstall-exec uninstall-data |
| 305 | uninstall-exec: |
| 306 | uninstall-data: uninstall-data-@USE_NLS@ |
| 307 | if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 308 | for file in $(DISTFILES.common) Makevars.template; do \ |
| 309 | rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ |
| 310 | done; \ |
| 311 | else \ |
| 312 | : ; \ |
| 313 | fi |
| 314 | uninstall-data-no: |
| 315 | uninstall-data-yes: |
| 316 | catalogs='$(CATALOGS)'; \ |
| 317 | for cat in $$catalogs; do \ |
| 318 | cat=`basename $$cat`; \ |
| 319 | lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ |
| 320 | for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ |
| 321 | rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ |
| 322 | done; \ |
| 323 | done |
| 324 | |
| 325 | check: all |
| 326 | |
| 327 | info dvi ps pdf html tags TAGS ctags CTAGS ID: |
| 328 | |
| 329 | mostlyclean: |
| 330 | rm -f remove-potcdate.sed |
| 331 | rm -f stamp-poT |
| 332 | rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po |
| 333 | rm -fr *.o |
| 334 | |
| 335 | clean: mostlyclean |
| 336 | |
| 337 | distclean: clean |
| 338 | rm -f Makefile Makefile.in POTFILES *.mo |
| 339 | |
| 340 | maintainer-clean: distclean |
| 341 | @echo "This command is intended for maintainers to use;" |
| 342 | @echo "it deletes files that may require special tools to rebuild." |
| 343 | rm -f stamp-po $(GMOFILES) |
| 344 | |
| 345 | distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) |
| 346 | dist distdir: |
| 347 | $(MAKE) update-po |
| 348 | @$(MAKE) dist2 |
| 349 | # This is a separate target because 'update-po' must be executed before. |
| 350 | dist2: stamp-po $(DISTFILES) |
| 351 | dists="$(DISTFILES)"; \ |
| 352 | if test "$(PACKAGE)" = "gettext-tools"; then \ |
| 353 | dists="$$dists Makevars.template"; \ |
| 354 | fi; \ |
| 355 | if test -f $(srcdir)/$(DOMAIN).pot; then \ |
| 356 | dists="$$dists $(DOMAIN).pot stamp-po"; \ |
| 357 | fi; \ |
| 358 | if test -f $(srcdir)/ChangeLog; then \ |
| 359 | dists="$$dists ChangeLog"; \ |
| 360 | fi; \ |
| 361 | for i in 0 1 2 3 4 5 6 7 8 9; do \ |
| 362 | if test -f $(srcdir)/ChangeLog.$$i; then \ |
| 363 | dists="$$dists ChangeLog.$$i"; \ |
| 364 | fi; \ |
| 365 | done; \ |
| 366 | if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ |
| 367 | for file in $$dists; do \ |
| 368 | if test -f $$file; then \ |
| 369 | cp -p $$file $(distdir) || exit 1; \ |
| 370 | else \ |
| 371 | cp -p $(srcdir)/$$file $(distdir) || exit 1; \ |
| 372 | fi; \ |
| 373 | done |
| 374 | |
| 375 | update-po: Makefile |
| 376 | $(MAKE) $(DOMAIN).pot-update |
| 377 | test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) |
| 378 | $(MAKE) update-gmo |
| 379 | |
| 380 | # General rule for creating PO files. |
| 381 | |
| 382 | .nop.po-create: |
| 383 | @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ |
| 384 | echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ |
| 385 | exit 1 |
| 386 | |
| 387 | # General rule for updating PO files. |
| 388 | |
| 389 | .nop.po-update: |
| 390 | @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ |
| 391 | if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ |
| 392 | tmpdir=`pwd`; \ |
| 393 | echo "$$lang:"; \ |
| 394 | test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
| 395 | echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ |
| 396 | cd $(srcdir); \ |
| 397 | if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ |
| 398 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
| 399 | rm -f $$tmpdir/$$lang.new.po; \ |
| 400 | else \ |
| 401 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ |
| 402 | :; \ |
| 403 | else \ |
| 404 | echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ |
| 405 | exit 1; \ |
| 406 | fi; \ |
| 407 | fi; \ |
| 408 | else \ |
| 409 | echo "msgmerge for $$lang.po failed!" 1>&2; \ |
| 410 | rm -f $$tmpdir/$$lang.new.po; \ |
| 411 | fi |
| 412 | |
| 413 | $(DUMMYPOFILES): |
| 414 | |
| 415 | update-gmo: Makefile $(GMOFILES) |
| 416 | @: |
| 417 | |
| 418 | Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ |
| 419 | cd $(top_builddir) \ |
| 420 | && $(SHELL) ./config.status $(subdir)/$@.in po-directories |
| 421 | |
| 422 | force: |
| 423 | |
| 424 | # Tell versions [3.59,3.63) of GNU make not to export all variables. |
| 425 | # Otherwise a system limit (for SysV at least) may be exceeded. |
| 426 | .NOEXPORT: |