1# Makefile for PO directory in any package using GNU gettext. 2# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu> 3# Copyright (C) 2000-2021 Free Software Foundation, Inc. 4# 5# Copying and distribution of this file, with or without modification, 6# are permitted in any medium without royalty provided the copyright 7# notice and this notice are preserved. This file is offered as-is, 8# without any warranty. 9# 10# Origin: gettext-0.20 11GETTEXT_MACRO_VERSION = 0.20 12 13PACKAGE = @PACKAGE@ 14VERSION = @VERSION@ 15PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 16 17SED = @SED@ 18SHELL = /bin/sh 19@SET_MAKE@ 20 21srcdir = @srcdir@ 22top_srcdir = @top_srcdir@ 23VPATH = @srcdir@ 24 25prefix = @prefix@ 26exec_prefix = @exec_prefix@ 27datarootdir = @datarootdir@ 28datadir = @datadir@ 29localedir = @localedir@ 30gettextsrcdir = $(datadir)/gettext/po 31 32INSTALL = @INSTALL@ 33INSTALL_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. 42mkinstalldirs = $(SHELL) @install_sh@ -d 43install_sh = $(SHELL) @install_sh@ 44MKDIR_P = @MKDIR_P@ 45mkdir_p = @mkdir_p@ 46 47# When building gettext-tools, we prefer to use the built programs 48# rather than installed programs. However, we can't do that when we 49# are cross compiling. 50CROSS_COMPILING = @CROSS_COMPILING@ 51 52GMSGFMT_ = @GMSGFMT@ 53GMSGFMT_no = @GMSGFMT@ 54GMSGFMT_yes = @GMSGFMT_015@ 55GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) 56XGETTEXT_ = @XGETTEXT@ 57XGETTEXT_no = @XGETTEXT@ 58XGETTEXT_yes = @XGETTEXT_015@ 59XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) 60MSGMERGE = @MSGMERGE@ 61MSGMERGE_UPDATE = @MSGMERGE@ --update 62MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ 63MSGINIT = msginit 64MSGCONV = msgconv 65MSGFILTER = msgfilter 66 67POFILES = @POFILES@ 68GMOFILES = @GMOFILES@ 69UPDATEPOFILES = @UPDATEPOFILES@ 70DUMMYPOFILES = @DUMMYPOFILES@ 71DISTFILES.common = Makefile.in.in remove-potcdate.sin \ 72$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) 73DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ 74$(POFILES) $(GMOFILES) \ 75$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) 76 77POTFILES = \ 78 79CATALOGS = @CATALOGS@ 80 81POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot 82POFILESDEPS_yes = $(POFILESDEPS_) 83POFILESDEPS_no = 84POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT)) 85 86DISTFILESDEPS_ = update-po 87DISTFILESDEPS_yes = $(DISTFILESDEPS_) 88DISTFILESDEPS_no = 89DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) 90 91# Makevars gets inserted here. (Don't remove this line!) 92 93.SUFFIXES: 94.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update 95 96# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. 97# The GNU Coding Standards say in 98# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>: 99# "GNU distributions usually contain some files which are not source files 100# ... . Since these files normally appear in the source directory, they 101# should always appear in the source directory, not in the build directory. 102# So Makefile rules to update them should put the updated files in the 103# source directory." 104# Therefore we put these files in the source directory, not the build directory. 105 106# During .po -> .gmo conversion, take into account the most recent changes to 107# the .pot file. This eliminates the need to update the .po files when the 108# .pot file has changed, which would be troublesome if the .po files are put 109# under version control. 110.po.gmo: $(srcdir)/$(DOMAIN).pot 111 @lang=`echo $* | sed -e 's,.*/,,'`; \ 112 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 113 echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ 114 cd $(srcdir) && \ 115 rm -f $${lang}.gmo && \ 116 $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ 117 $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ 118 mv t-$${lang}.gmo $${lang}.gmo && \ 119 rm -f $${lang}.1po 120 121.sin.sed: 122 sed -e '/^#/d' $< > t-$@ 123 mv t-$@ $@ 124 125 126all: all-@USE_NLS@ 127 128all-yes: $(srcdir)/stamp-po 129all-no: 130 131# Ensure that the gettext macros and this Makefile.in.in are in sync. 132CHECK_MACRO_VERSION = \ 133 test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ 134 || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ 135 exit 1; \ 136 } 137 138# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no 139# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because 140# we don't want to bother translators with empty POT files). We assume that 141# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. 142# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). 143 144# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS 145# have been loosely updated. Its purpose is that when a developer or translator 146# checks out the package from a version control system, and the $(DOMAIN).pot 147# file is not under version control, "make" will update the $(DOMAIN).pot and 148# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This 149# timestamp would not be necessary if updating the $(CATALOGS) would always 150# touch them; however, the rule for $(POFILES) has been designed to not touch 151# files that don't need to be changed. 152$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot 153 @$(CHECK_MACRO_VERSION) 154 test ! -f $(srcdir)/$(DOMAIN).pot || \ 155 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) 156 @test ! -f $(srcdir)/$(DOMAIN).pot || { \ 157 echo "touch $(srcdir)/stamp-po" && \ 158 echo timestamp > $(srcdir)/stamp-poT && \ 159 mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ 160 } 161 162# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', 163# otherwise packages like GCC can not be built if only parts of the source 164# have been downloaded. 165 166# This target rebuilds $(DOMAIN).pot; it is an expensive operation. 167# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. 168# The determination of whether the package xyz is a GNU one is based on the 169# heuristic whether some file in the top level directory mentions "GNU xyz". 170# If GNU 'find' is available, we avoid grepping through monster files. 171$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed 172 package_gnu="$(PACKAGE_GNU)"; \ 173 test -n "$$package_gnu" || { \ 174 if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ 175 LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ 176 else \ 177 LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ 178 fi; \ 179 } | grep -v 'libtool:' >/dev/null; then \ 180 package_gnu=yes; \ 181 else \ 182 package_gnu=no; \ 183 fi; \ 184 }; \ 185 if test "$$package_gnu" = "yes"; then \ 186 package_prefix='GNU '; \ 187 else \ 188 package_prefix=''; \ 189 fi; \ 190 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ 191 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ 192 else \ 193 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ 194 fi; \ 195 case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 196 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ 197 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 198 --add-comments=TRANSLATORS: \ 199 --files-from=$(srcdir)/POTFILES.in \ 200 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 201 --msgid-bugs-address="$$msgid_bugs_address" \ 202 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ 203 ;; \ 204 *) \ 205 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ 206 --add-comments=TRANSLATORS: \ 207 --files-from=$(srcdir)/POTFILES.in \ 208 --copyright-holder='$(COPYRIGHT_HOLDER)' \ 209 --package-name="$${package_prefix}@PACKAGE@" \ 210 --package-version='@VERSION@' \ 211 --msgid-bugs-address="$$msgid_bugs_address" \ 212 $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ 213 ;; \ 214 esac 215 test ! -f $(DOMAIN).po || { \ 216 if test -f $(srcdir)/$(DOMAIN).pot-header; then \ 217 sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ 218 cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ 219 rm -f $(DOMAIN).1po \ 220 || exit 1; \ 221 fi; \ 222 if test -f $(srcdir)/$(DOMAIN).pot; then \ 223 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ 224 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ 225 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ 226 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ 227 else \ 228 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ 229 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 230 fi; \ 231 else \ 232 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ 233 fi; \ 234 } 235 236# This rule has no dependencies: we don't need to update $(DOMAIN).pot at 237# every "make" invocation, only create it when it is missing. 238# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. 239$(srcdir)/$(DOMAIN).pot: 240 $(MAKE) $(DOMAIN).pot-update 241 242# This target rebuilds a PO file if $(DOMAIN).pot has changed. 243# Note that a PO file is not touched if it doesn't need to be changed. 244$(POFILES): $(POFILESDEPS) 245 @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot 246 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ 247 if test -f "$(srcdir)/$${lang}.po"; then \ 248 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 249 echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ 250 cd $(srcdir) \ 251 && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 252 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ 253 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ 254 0.1[6-7] | 0.1[6-7].*) \ 255 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ 256 *) \ 257 $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ 258 esac; \ 259 }; \ 260 else \ 261 $(MAKE) $${lang}.po-create; \ 262 fi 263 264 265install: install-exec install-data 266install-exec: 267install-data: install-data-@USE_NLS@ 268 if test "$(PACKAGE)" = "gettext-tools"; then \ 269 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ 270 for file in $(DISTFILES.common) Makevars.template; do \ 271 $(INSTALL_DATA) $(srcdir)/$$file \ 272 $(DESTDIR)$(gettextsrcdir)/$$file; \ 273 done; \ 274 for file in Makevars; do \ 275 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 276 done; \ 277 else \ 278 : ; \ 279 fi 280install-data-no: all 281install-data-yes: all 282 @catalogs='$(CATALOGS)'; \ 283 for cat in $$catalogs; do \ 284 cat=`basename $$cat`; \ 285 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 286 dir=$(localedir)/$$lang/LC_MESSAGES; \ 287 $(mkdir_p) $(DESTDIR)$$dir; \ 288 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ 289 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ 290 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ 291 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 292 if test -n "$$lc"; then \ 293 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 294 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 295 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 296 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 297 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 298 for file in *; do \ 299 if test -f $$file; then \ 300 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 301 fi; \ 302 done); \ 303 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 304 else \ 305 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 306 :; \ 307 else \ 308 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 309 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 310 fi; \ 311 fi; \ 312 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 313 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 314 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ 315 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 316 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ 317 fi; \ 318 done; \ 319 done 320 321install-strip: install 322 323installdirs: installdirs-exec installdirs-data 324installdirs-exec: 325installdirs-data: installdirs-data-@USE_NLS@ 326 if test "$(PACKAGE)" = "gettext-tools"; then \ 327 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ 328 else \ 329 : ; \ 330 fi 331installdirs-data-no: 332installdirs-data-yes: 333 @catalogs='$(CATALOGS)'; \ 334 for cat in $$catalogs; do \ 335 cat=`basename $$cat`; \ 336 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 337 dir=$(localedir)/$$lang/LC_MESSAGES; \ 338 $(mkdir_p) $(DESTDIR)$$dir; \ 339 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ 340 if test -n "$$lc"; then \ 341 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ 342 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ 343 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 344 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 345 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ 346 for file in *; do \ 347 if test -f $$file; then \ 348 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ 349 fi; \ 350 done); \ 351 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ 352 else \ 353 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ 354 :; \ 355 else \ 356 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ 357 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ 358 fi; \ 359 fi; \ 360 fi; \ 361 done; \ 362 done 363 364# Define this as empty until I found a useful application. 365installcheck: 366 367uninstall: uninstall-exec uninstall-data 368uninstall-exec: 369uninstall-data: uninstall-data-@USE_NLS@ 370 if test "$(PACKAGE)" = "gettext-tools"; then \ 371 for file in $(DISTFILES.common) Makevars.template; do \ 372 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ 373 done; \ 374 else \ 375 : ; \ 376 fi 377uninstall-data-no: 378uninstall-data-yes: 379 catalogs='$(CATALOGS)'; \ 380 for cat in $$catalogs; do \ 381 cat=`basename $$cat`; \ 382 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ 383 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ 384 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ 385 done; \ 386 done 387 388check: all 389 390info dvi ps pdf html tags TAGS ctags CTAGS ID: 391 392install-dvi install-ps install-pdf install-html: 393 394mostlyclean: 395 rm -f remove-potcdate.sed 396 rm -f $(srcdir)/stamp-poT 397 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po 398 rm -fr *.o 399 400clean: mostlyclean 401 402distclean: clean 403 rm -f Makefile Makefile.in POTFILES 404 405maintainer-clean: distclean 406 @echo "This command is intended for maintainers to use;" 407 @echo "it deletes files that may require special tools to rebuild." 408 rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) 409 410distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) 411dist distdir: 412 test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) 413 @$(MAKE) dist2 414# This is a separate target because 'update-po' must be executed before. 415dist2: $(srcdir)/stamp-po $(DISTFILES) 416 dists="$(DISTFILES)"; \ 417 if test "$(PACKAGE)" = "gettext-tools"; then \ 418 dists="$$dists Makevars.template"; \ 419 fi; \ 420 if test -f $(srcdir)/$(DOMAIN).pot; then \ 421 dists="$$dists $(DOMAIN).pot stamp-po"; \ 422 fi; \ 423 if test -f $(srcdir)/ChangeLog; then \ 424 dists="$$dists ChangeLog"; \ 425 fi; \ 426 for i in 0 1 2 3 4 5 6 7 8 9; do \ 427 if test -f $(srcdir)/ChangeLog.$$i; then \ 428 dists="$$dists ChangeLog.$$i"; \ 429 fi; \ 430 done; \ 431 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ 432 for file in $$dists; do \ 433 if test -f $$file; then \ 434 cp -p $$file $(distdir) || exit 1; \ 435 else \ 436 cp -p $(srcdir)/$$file $(distdir) || exit 1; \ 437 fi; \ 438 done 439 440update-po: Makefile 441 $(MAKE) $(DOMAIN).pot-update 442 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) 443 $(MAKE) update-gmo 444 445# General rule for creating PO files. 446 447.nop.po-create: 448 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ 449 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ 450 exit 1 451 452# General rule for updating PO files. 453 454.nop.po-update: 455 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ 456 if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ 457 tmpdir=`pwd`; \ 458 echo "$$lang:"; \ 459 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ 460 echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ 461 cd $(srcdir); \ 462 if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 463 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ 464 $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 465 0.1[6-7] | 0.1[6-7].*) \ 466 $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 467 *) \ 468 $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ 469 esac; \ 470 }; then \ 471 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 472 rm -f $$tmpdir/$$lang.new.po; \ 473 else \ 474 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 475 :; \ 476 else \ 477 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 478 exit 1; \ 479 fi; \ 480 fi; \ 481 else \ 482 echo "msgmerge for $$lang.po failed!" 1>&2; \ 483 rm -f $$tmpdir/$$lang.new.po; \ 484 fi 485 486$(DUMMYPOFILES): 487 488update-gmo: Makefile $(GMOFILES) 489 @: 490 491# Recreate Makefile by invoking config.status. Explicitly invoke the shell, 492# because execution permission bits may not work on the current file system. 493# Use @SHELL@, which is the shell determined by autoconf for the use by its 494# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. 495Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ 496 cd $(top_builddir) \ 497 && @SHELL@ ./config.status $(subdir)/$@.in po-directories 498 499force: 500 501# Tell versions [3.59,3.63) of GNU make not to export all variables. 502# Otherwise a system limit (for SysV at least) may be exceeded. 503.NOEXPORT: 504