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