From: Bruno Haible Date: Wed, 24 Oct 2018 23:41:42 +0000 (+0200) Subject: po, examples: Change .po -> .gmo rules to consider the newest changes to the POT... X-Git-Tag: v0.20~281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c08db47a43a55646d94e5ffa082891a718346520;p=thirdparty%2Fgettext.git po, examples: Change .po -> .gmo rules to consider the newest changes to the POT file. Reported by Claude Paroz in . * gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS): Set MSGMERGE_FOR_MSGFMT_OPTION. * gettext-runtime/po/Makefile.in.in (MSGMERGE): Use GNU msgmerge, even if not first in $PATH. (MSGMERGE_FOR_MSGFMT_OPTION): New variable. (.po.gmo): Depend on the POT file. Use msgmerge on the fly, to take into account the most recent POT file changes. * gettext-tools/examples/hello-*/po/Makefile.am: Likewise, also for the .po.qm, update-properties, update-classes targets. * gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile (MSGMERGE_FOR_MSGFMT_OPTION): New variable. ($(STRINGSFILES)): Depend on the POT file. Use msgmerge on the fly, to take into account the most recent POT file changes. --- diff --git a/gettext-runtime/m4/po.m4 b/gettext-runtime/m4/po.m4 index fba008a0a..96c738078 100644 --- a/gettext-runtime/m4/po.m4 +++ b/gettext-runtime/m4/po.m4 @@ -1,4 +1,4 @@ -# po.m4 serial 28 (gettext-0.19.9) +# po.m4 serial 29 (gettext-0.19.9) dnl Copyright (C) 1995-2014, 2016, 2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -76,6 +76,22 @@ changequote([,])dnl AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) + dnl Test whether it is GNU msgmerge >= 0.19.9. + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + dnl Test whether it is GNU msgmerge >= 0.12. + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is + dnl slow. But this is not a big problem, as such old gettext versions are + dnl hardly in use any more. + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi + AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) + dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 332b2d9f3..0fe4157bc 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -57,8 +57,9 @@ XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -92,11 +93,30 @@ DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO)) .SUFFIXES: .SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-c++-qt/po/Makefile.am b/gettext-tools/examples/hello-c++-qt/po/Makefile.am index c0f195e55..cf1067ebe 100644 --- a/gettext-tools/examples/hello-c++-qt/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-qt/po/Makefile.am @@ -65,8 +65,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -89,11 +90,30 @@ CATALOGS = @QTCATALOGS@ SUFFIXES = .po .qm .sed .sin .nop .po-create .po-update -.po.qm: +# The .pot file, stamp-po, .po files, and .qm files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .qm conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.qm: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.qm && $(GMSGFMT) -c --qt --statistics --verbose -o $${lang}.qm $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.qm && $(GMSGFMT) -c --qt --statistics --verbose -o t-$${lang}.qm $${lang}.po && mv t-$${lang}.qm $${lang}.qm + echo "$${cdcmd}rm -f $${lang}.qm && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --qt --statistics --verbose -o $${lang}.qm $${lang}.1po && rm -f $${lang}.1po"; \ + cd $(srcdir) && \ + rm -f $${lang}.qm && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --qt --statistics --verbose -o t-$${lang}.qm $${lang}.1po && \ + mv t-$${lang}.qm $${lang}.qm && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am index 558ed2a30..61658fcc5 100644 --- a/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am +++ b/gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am @@ -68,8 +68,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -92,11 +93,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-clisp/po/Makefile.am b/gettext-tools/examples/hello-clisp/po/Makefile.am index d1955fb2b..2d012b184 100644 --- a/gettext-tools/examples/hello-clisp/po/Makefile.am +++ b/gettext-tools/examples/hello-clisp/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am index 02921ca49..24ed7fdcb 100644 --- a/gettext-tools/examples/hello-csharp-forms/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp-forms/po/Makefile.am @@ -60,8 +60,9 @@ MSGINIT_OPTIONS = pkglibdir = $(libdir)/$(PACKAGE) -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -84,6 +85,17 @@ CATALOGS = @CSHARPCATALOGS@ SUFFIXES = .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .resources.dll files appear in release +# tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ diff --git a/gettext-tools/examples/hello-csharp/po/Makefile.am b/gettext-tools/examples/hello-csharp/po/Makefile.am index 02921ca49..24ed7fdcb 100644 --- a/gettext-tools/examples/hello-csharp/po/Makefile.am +++ b/gettext-tools/examples/hello-csharp/po/Makefile.am @@ -60,8 +60,9 @@ MSGINIT_OPTIONS = pkglibdir = $(libdir)/$(PACKAGE) -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -84,6 +85,17 @@ CATALOGS = @CSHARPCATALOGS@ SUFFIXES = .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .resources.dll files appear in release +# tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ diff --git a/gettext-tools/examples/hello-gawk/po/Makefile.am b/gettext-tools/examples/hello-gawk/po/Makefile.am index db6b25873..960c773e6 100644 --- a/gettext-tools/examples/hello-gawk/po/Makefile.am +++ b/gettext-tools/examples/hello-gawk/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-guile/po/Makefile.am b/gettext-tools/examples/hello-guile/po/Makefile.am index b60d3c751..793bddd78 100644 --- a/gettext-tools/examples/hello-guile/po/Makefile.am +++ b/gettext-tools/examples/hello-guile/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-java-awt/po/Makefile.am b/gettext-tools/examples/hello-java-awt/po/Makefile.am index f26518e1a..ae880a833 100644 --- a/gettext-tools/examples/hello-java-awt/po/Makefile.am +++ b/gettext-tools/examples/hello-java-awt/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGCAT = msgcat MSGINIT = msginit MSGCONV = msgconv @@ -85,6 +86,16 @@ CATALOGS = @JAVACATALOGS@ SUFFIXES = .po .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .properties or .class files appear +# in release tarballs. The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ @@ -287,6 +298,11 @@ update-po: Makefile $(DUMMYPOFILES): +# During .po -> .properties or .class conversion, take into account the most +# recent changes to the .pot file. This eliminates the need to update the .po +# files when the .pot file has changed, which would be troublesome if the .po +# files are put under version control. + update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) @echo "$(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(srcdir)/$(DOMAIN).properties"; \ $(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(DOMAIN).properties || { rm -f $(DOMAIN).properties; exit 1; } @@ -301,10 +317,12 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po || exit 1; \ - echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $(srcdir)/$${lang}.po"; \ - $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po || exit 1; \ + echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $${lang}.1po"; \ + $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $${lang}.1po || exit 1; \ if test '$(srcdir)' = .; then \ mv -f $(DOMAIN)_$$lang.properties.tmp $(DOMAIN)_$$lang.properties || exit 1; \ else \ @@ -314,6 +332,7 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$(DOMAIN)_$$lang.properties || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done # Alternatively, we could create classes instead of properties files. @@ -331,8 +350,10 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $${lang}.1po || exit 1; \ if test '$(srcdir)' != .; then \ if test -f $(srcdir)/$(DOMAIN)_$$lang.class && cmp $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class >/dev/null; then \ rm -f $(DOMAIN)_$$lang.class; \ @@ -340,6 +361,7 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done echo-catalogs: diff --git a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am index f26518e1a..ae880a833 100644 --- a/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am +++ b/gettext-tools/examples/hello-java-qtjambi/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGCAT = msgcat MSGINIT = msginit MSGCONV = msgconv @@ -85,6 +86,16 @@ CATALOGS = @JAVACATALOGS@ SUFFIXES = .po .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .properties or .class files appear +# in release tarballs. The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ @@ -287,6 +298,11 @@ update-po: Makefile $(DUMMYPOFILES): +# During .po -> .properties or .class conversion, take into account the most +# recent changes to the .pot file. This eliminates the need to update the .po +# files when the .pot file has changed, which would be troublesome if the .po +# files are put under version control. + update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) @echo "$(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(srcdir)/$(DOMAIN).properties"; \ $(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(DOMAIN).properties || { rm -f $(DOMAIN).properties; exit 1; } @@ -301,10 +317,12 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po || exit 1; \ - echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $(srcdir)/$${lang}.po"; \ - $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po || exit 1; \ + echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $${lang}.1po"; \ + $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $${lang}.1po || exit 1; \ if test '$(srcdir)' = .; then \ mv -f $(DOMAIN)_$$lang.properties.tmp $(DOMAIN)_$$lang.properties || exit 1; \ else \ @@ -314,6 +332,7 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$(DOMAIN)_$$lang.properties || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done # Alternatively, we could create classes instead of properties files. @@ -331,8 +350,10 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $${lang}.1po || exit 1; \ if test '$(srcdir)' != .; then \ if test -f $(srcdir)/$(DOMAIN)_$$lang.class && cmp $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class >/dev/null; then \ rm -f $(DOMAIN)_$$lang.class; \ @@ -340,6 +361,7 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done echo-catalogs: diff --git a/gettext-tools/examples/hello-java-swing/po/Makefile.am b/gettext-tools/examples/hello-java-swing/po/Makefile.am index f26518e1a..ae880a833 100644 --- a/gettext-tools/examples/hello-java-swing/po/Makefile.am +++ b/gettext-tools/examples/hello-java-swing/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGCAT = msgcat MSGINIT = msginit MSGCONV = msgconv @@ -85,6 +86,16 @@ CATALOGS = @JAVACATALOGS@ SUFFIXES = .po .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .properties or .class files appear +# in release tarballs. The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ @@ -287,6 +298,11 @@ update-po: Makefile $(DUMMYPOFILES): +# During .po -> .properties or .class conversion, take into account the most +# recent changes to the .pot file. This eliminates the need to update the .po +# files when the .pot file has changed, which would be troublesome if the .po +# files are put under version control. + update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) @echo "$(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(srcdir)/$(DOMAIN).properties"; \ $(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(DOMAIN).properties || { rm -f $(DOMAIN).properties; exit 1; } @@ -301,10 +317,12 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po || exit 1; \ - echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $(srcdir)/$${lang}.po"; \ - $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po || exit 1; \ + echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $${lang}.1po"; \ + $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $${lang}.1po || exit 1; \ if test '$(srcdir)' = .; then \ mv -f $(DOMAIN)_$$lang.properties.tmp $(DOMAIN)_$$lang.properties || exit 1; \ else \ @@ -314,6 +332,7 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$(DOMAIN)_$$lang.properties || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done # Alternatively, we could create classes instead of properties files. @@ -331,8 +350,10 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $${lang}.1po || exit 1; \ if test '$(srcdir)' != .; then \ if test -f $(srcdir)/$(DOMAIN)_$$lang.class && cmp $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class >/dev/null; then \ rm -f $(DOMAIN)_$$lang.class; \ @@ -340,6 +361,7 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done echo-catalogs: diff --git a/gettext-tools/examples/hello-java/po/Makefile.am b/gettext-tools/examples/hello-java/po/Makefile.am index f26518e1a..ae880a833 100644 --- a/gettext-tools/examples/hello-java/po/Makefile.am +++ b/gettext-tools/examples/hello-java/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGCAT = msgcat MSGINIT = msginit MSGCONV = msgconv @@ -85,6 +86,16 @@ CATALOGS = @JAVACATALOGS@ SUFFIXES = .po .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .properties or .class files appear +# in release tarballs. The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ @@ -287,6 +298,11 @@ update-po: Makefile $(DUMMYPOFILES): +# During .po -> .properties or .class conversion, take into account the most +# recent changes to the .pot file. This eliminates the need to update the .po +# files when the .pot file has changed, which would be troublesome if the .po +# files are put under version control. + update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) @echo "$(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(srcdir)/$(DOMAIN).properties"; \ $(MSGINIT) -i $(srcdir)/$(DOMAIN).pot --no-translator -l en --properties-output -o $(DOMAIN).properties || { rm -f $(DOMAIN).properties; exit 1; } @@ -301,10 +317,12 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -o /dev/null $(srcdir)/$${lang}.po || exit 1; \ - echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $(srcdir)/$${lang}.po"; \ - $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -o /dev/null $${lang}.1po || exit 1; \ + echo "$(MSGCAT) --properties-output -o $(srcdir)/$(DOMAIN)_$$lang.properties $${lang}.1po"; \ + $(MSGCAT) --properties-output -o $(DOMAIN)_$$lang.properties.tmp $${lang}.1po || exit 1; \ if test '$(srcdir)' = .; then \ mv -f $(DOMAIN)_$$lang.properties.tmp $(DOMAIN)_$$lang.properties || exit 1; \ else \ @@ -314,6 +332,7 @@ update-properties: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.properties.tmp $(srcdir)/$(DOMAIN)_$$lang.properties || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done # Alternatively, we could create classes instead of properties files. @@ -331,8 +350,10 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) fi @for f in $(POFILES); do \ lang=`echo $$f | sed -e 's,.*/,,' -e 's,\.po$$,,'`; \ - echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po"; \ - $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $(srcdir)/$${lang}.po || exit 1; \ + echo "$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot"; \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $(srcdir)/$${lang}.po $(srcdir)/$(DOMAIN).pot || exit 1; \ + echo "$(GMSGFMT) -c --statistics --verbose -j -d $(srcdir) -r $(DOMAIN) -l $${lang} $${lang}.1po"; \ + $(GMSGFMT) -c --statistics --verbose -j -d . -r $(DOMAIN) -l $${lang} $${lang}.1po || exit 1; \ if test '$(srcdir)' != .; then \ if test -f $(srcdir)/$(DOMAIN)_$$lang.class && cmp $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class >/dev/null; then \ rm -f $(DOMAIN)_$$lang.class; \ @@ -340,6 +361,7 @@ update-classes: Makefile $(srcdir)/$(DOMAIN).pot $(POFILES) mv -f $(DOMAIN)_$$lang.class $(srcdir)/$(DOMAIN)_$$lang.class || exit 1; \ fi; \ fi; \ + rm -f $${lang}.1po; \ done echo-catalogs: diff --git a/gettext-tools/examples/hello-librep/po/Makefile.am b/gettext-tools/examples/hello-librep/po/Makefile.am index d59a4b960..424f335e3 100644 --- a/gettext-tools/examples/hello-librep/po/Makefile.am +++ b/gettext-tools/examples/hello-librep/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile index ef6ae9e33..8c9113b0a 100644 --- a/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile +++ b/gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile @@ -70,6 +70,7 @@ PACKAGE_VERSION = 0 XGETTEXT = xgettext MSGMERGE = msgmerge MSGMERGE_UPDATE = msgmerge --update +MSGMERGE_FOR_MSGFMT_OPTION = --for-msgfmt MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -245,14 +246,16 @@ $(DUMMYPOFILES): update-strings: $(CATALOGS) @: -# I don't know how to make a dependency from a particular .strings file to its -# corresponding .po file; therefore I put here a dependency towards all .po -# files. It's safer than no dependency at all. -$(STRINGSFILES): $(POFILES) - $(MAKE) $(UNIXLOCALE_$(patsubst %.lproj,%, $(notdir $(patsubst %/,%, $(dir $@))))).po +# During .po -> .strings conversion, take into account the most recent changes +# to the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +$(STRINGSFILES): $(DOMAIN).pot $(POFILES) mkdir -p $(patsubst %/,%, $(dir $@)) - msgcat --stringtable-output -o $@.tmp $(UNIXLOCALE_$(patsubst %.lproj,%, $(notdir $(patsubst %/,%, $(dir $@))))).po + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $@.1po $(UNIXLOCALE_$(patsubst %.lproj,%, $(notdir $(patsubst %/,%, $(dir $@))))).po $(DOMAIN).pot + msgcat --stringtable-output -o $@.tmp $@.1po mv $@.tmp $@ + rm -f $@.1po $(ENSTRINGSFILES): $(DOMAIN).pot mkdir -p $(patsubst %/,%, $(dir $@)) diff --git a/gettext-tools/examples/hello-pascal/po/Makefile.am b/gettext-tools/examples/hello-pascal/po/Makefile.am index e34b6149b..b79d1afbe 100644 --- a/gettext-tools/examples/hello-pascal/po/Makefile.am +++ b/gettext-tools/examples/hello-pascal/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-perl/po/Makefile.am b/gettext-tools/examples/hello-perl/po/Makefile.am index 3231d8c2d..0809acf05 100644 --- a/gettext-tools/examples/hello-perl/po/Makefile.am +++ b/gettext-tools/examples/hello-perl/po/Makefile.am @@ -72,8 +72,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -96,11 +97,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-php/po/Makefile.am b/gettext-tools/examples/hello-php/po/Makefile.am index c8e155861..4eeee7360 100644 --- a/gettext-tools/examples/hello-php/po/Makefile.am +++ b/gettext-tools/examples/hello-php/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-python/po/Makefile.am b/gettext-tools/examples/hello-python/po/Makefile.am index b1bfdbff3..41d41398e 100644 --- a/gettext-tools/examples/hello-python/po/Makefile.am +++ b/gettext-tools/examples/hello-python/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-sh/po/Makefile.am b/gettext-tools/examples/hello-sh/po/Makefile.am index 3251cf047..bc006d5c5 100644 --- a/gettext-tools/examples/hello-sh/po/Makefile.am +++ b/gettext-tools/examples/hello-sh/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-smalltalk/po/Makefile.am b/gettext-tools/examples/hello-smalltalk/po/Makefile.am index 46269cfee..5d2024816 100644 --- a/gettext-tools/examples/hello-smalltalk/po/Makefile.am +++ b/gettext-tools/examples/hello-smalltalk/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am index 69ca0279f..bf3225611 100644 --- a/gettext-tools/examples/hello-tcl-tk/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl-tk/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -82,6 +83,16 @@ CATALOGS = @TCLCATALOGS@ SUFFIXES = .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .msg files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ diff --git a/gettext-tools/examples/hello-tcl/po/Makefile.am b/gettext-tools/examples/hello-tcl/po/Makefile.am index 69ca0279f..bf3225611 100644 --- a/gettext-tools/examples/hello-tcl/po/Makefile.am +++ b/gettext-tools/examples/hello-tcl/po/Makefile.am @@ -58,8 +58,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -82,6 +83,16 @@ CATALOGS = @TCLCATALOGS@ SUFFIXES = .sed .sin .nop .po-create .po-update +# The .pot file, stamp-po, .po files, and .msg files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ diff --git a/gettext-tools/examples/hello-ycp/po/Makefile.am b/gettext-tools/examples/hello-ycp/po/Makefile.am index 89c4da989..2456e768a 100644 --- a/gettext-tools/examples/hello-ycp/po/Makefile.am +++ b/gettext-tools/examples/hello-ycp/po/Makefile.am @@ -62,8 +62,9 @@ MSGMERGE_OPTIONS = --quiet # MSGINIT_OPTIONS. MSGINIT_OPTIONS = -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -86,11 +87,30 @@ CATALOGS = @CATALOGS@ SUFFIXES = .po .gmo .sed .sin .nop .po-create .po-update -.po.gmo: +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +.po.gmo: $(srcdir)/$(DOMAIN).pot @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + 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"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ diff --git a/gettext-tools/examples/po/Makefile.am b/gettext-tools/examples/po/Makefile.am index 3078c5846..5892280fe 100644 --- a/gettext-tools/examples/po/Makefile.am +++ b/gettext-tools/examples/po/Makefile.am @@ -152,6 +152,16 @@ DUMMYPOFILES = @DUMMYPOFILES@ SUFFIXES = .po .sed .sin .nop .po-update +# The .pot file, stamp-po, and .po files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@