Blame gettext-tools/examples/hello-guile/po/Makefile.am

Packit Bot 06c835
# Example for use of GNU gettext.
Packit Bot 06c835
# This file is in the public domain.
Packit Bot 06c835
#
Packit Bot 06c835
# Makefile configuration - processed by automake.
Packit Bot 06c835
Packit Bot 06c835
# List of files which contain translatable strings.
Packit Bot 06c835
POTFILES = \
Packit Bot 06c835
  hello.scm
Packit Bot 06c835
Packit Bot 06c835
# Usually the message domain is the same as the package name.
Packit Bot 06c835
DOMAIN = $(PACKAGE)
Packit Bot 06c835
Packit Bot 06c835
# These options get passed to xgettext.
Packit Bot 06c835
XGETTEXT_OPTIONS = --keyword=_ --flag=_:1:pass-scheme-format
Packit Bot 06c835
Packit Bot 06c835
# This is the copyright holder that gets inserted into the header of the
Packit Bot 06c835
# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
Packit Bot 06c835
# package.  (Note that the msgstr strings, extracted from the package's
Packit Bot 06c835
# sources, belong to the copyright holder of the package.)  Translators are
Packit Bot 06c835
# expected to transfer the copyright for their translations to this person
Packit Bot 06c835
# or entity, or to disclaim their copyright.  The empty string stands for
Packit Bot 06c835
# the public domain; in this case the translators are expected to disclaim
Packit Bot 06c835
# their copyright.
Packit Bot 06c835
COPYRIGHT_HOLDER = Yoyodyne, Inc.
Packit Bot 06c835
Packit Bot 06c835
# This is the email address or URL to which the translators shall report
Packit Bot 06c835
# bugs in the untranslated strings:
Packit Bot 06c835
# - Strings which are not entire sentences, see the maintainer guidelines
Packit Bot 06c835
#   in the GNU gettext documentation, section 'Preparing Strings'.
Packit Bot 06c835
# - Strings which use unclear terms or require additional context to be
Packit Bot 06c835
#   understood.
Packit Bot 06c835
# - Strings which make invalid assumptions about notation of date, time or
Packit Bot 06c835
#   money.
Packit Bot 06c835
# - Pluralisation problems.
Packit Bot 06c835
# - Incorrect English spelling.
Packit Bot 06c835
# - Incorrect formatting.
Packit Bot 06c835
# It can be your email address, or a mailing list address where translators
Packit Bot 06c835
# can write to without being subscribed, or the URL of a web page through
Packit Bot 06c835
# which the translators can contact you.
Packit Bot 06c835
MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
Packit Bot 06c835
Packit Bot 06c835
# This is the list of locale categories, beyond LC_MESSAGES, for which the
Packit Bot 06c835
# message catalogs shall be used.  It is usually empty.
Packit Bot 06c835
EXTRA_LOCALE_CATEGORIES =
Packit Bot 06c835
Packit Bot 06c835
# These options get passed to msgmerge.
Packit Bot 06c835
# Useful options are in particular:
Packit Bot 06c835
#   --previous            to keep previous msgids of translated messages,
Packit Bot 06c835
#   --quiet               to reduce the verbosity.
Packit Bot 06c835
MSGMERGE_OPTIONS = --quiet
Packit Bot 06c835
Packit Bot 06c835
MSGMERGE = msgmerge
Packit Bot 06c835
MSGMERGE_UPDATE = @MSGMERGE@ --update
Packit Bot 06c835
MSGINIT = msginit
Packit Bot 06c835
MSGCONV = msgconv
Packit Bot 06c835
MSGFILTER = msgfilter
Packit Bot 06c835
Packit Bot 06c835
# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
Packit Bot 06c835
POTFILES_DEPS = @POTFILES_DEPS@
Packit Bot 06c835
Packit Bot 06c835
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
Packit Bot 06c835
POFILES = @POFILES@
Packit Bot 06c835
# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).gmo)
Packit Bot 06c835
GMOFILES = @GMOFILES@
Packit Bot 06c835
# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
Packit Bot 06c835
UPDATEPOFILES = @UPDATEPOFILES@
Packit Bot 06c835
# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
Packit Bot 06c835
DUMMYPOFILES = @DUMMYPOFILES@
Packit Bot 06c835
Packit Bot 06c835
# This is computed as
Packit Bot 06c835
# $(foreach lang, user-specified subset of $(LINGUAS), $(lang).gmo)
Packit Bot 06c835
CATALOGS = @CATALOGS@
Packit Bot 06c835
Packit Bot 06c835
SUFFIXES = .po .gmo .mo .sed .sin .nop .po-create .po-update
Packit Bot 06c835
Packit Bot 06c835
.po.mo:
Packit Bot 06c835
	@echo "$(MSGFMT) -c -o $@ $<"; \
Packit Bot 06c835
	$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
Packit Bot 06c835
Packit Bot 06c835
.po.gmo:
Packit Bot 06c835
	@lang=`echo $* | sed -e 's,.*/,,'`; \
Packit Bot 06c835
	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
Packit Bot 06c835
	echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
Packit Bot 06c835
	cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
Packit Bot 06c835
Packit Bot 06c835
.sin.sed:
Packit Bot 06c835
	sed -e '/^#/d' $< > t-$@
Packit Bot 06c835
	mv t-$@ $@
Packit Bot 06c835
Packit Bot 06c835
Packit Bot 06c835
all-local: all-local-@USE_NLS@
Packit Bot 06c835
Packit Bot 06c835
all-local-yes: stamp-po
Packit Bot 06c835
all-local-no:
Packit Bot 06c835
Packit Bot 06c835
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
Packit Bot 06c835
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
Packit Bot 06c835
# we don't want to bother translators with empty POT files). We assume that
Packit Bot 06c835
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
Packit Bot 06c835
# In this case, stamp-po is a nop (i.e. a phony target).
Packit Bot 06c835
Packit Bot 06c835
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
Packit Bot 06c835
# been loosely updated. Its purpose is that when a developer or translator
Packit Bot 06c835
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
Packit Bot 06c835
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
Packit Bot 06c835
# invocations of "make" will do nothing. This timestamp would not be necessary
Packit Bot 06c835
# if updating the $(CATALOGS) would always touch them; however, the rule for
Packit Bot 06c835
# $(POFILES) has been designed to not touch files that don't need to be
Packit Bot 06c835
# changed.
Packit Bot 06c835
stamp-po: $(srcdir)/$(DOMAIN).pot
Packit Bot 06c835
	test ! -f $(srcdir)/$(DOMAIN).pot || \
Packit Bot 06c835
	  test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
Packit Bot 06c835
	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
Packit Bot 06c835
	  echo "touch stamp-po" && \
Packit Bot 06c835
	  echo timestamp > stamp-poT && \
Packit Bot 06c835
	  mv stamp-poT stamp-po; \
Packit Bot 06c835
	}
Packit Bot 06c835
Packit Bot 06c835
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
Packit Bot 06c835
# otherwise packages like GCC can not be built if only parts of the source
Packit Bot 06c835
# have been downloaded.
Packit Bot 06c835
Packit Bot 06c835
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
Packit Bot 06c835
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
Packit Bot 06c835
$(DOMAIN).pot-update: $(POTFILES_DEPS) remove-potcdate.sed
Packit Bot 06c835
	if LC_ALL=C grep 'GNU $(PACKAGE)' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
Packit Bot 06c835
	  package_gnu='GNU '; \
Packit Bot 06c835
	else \
Packit Bot 06c835
	  package_gnu=''; \
Packit Bot 06c835
	fi; \
Packit Bot 06c835
	if test -n '$(MSGID_BUGS_ADDRESS)'; then \
Packit Bot 06c835
	  msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
Packit Bot 06c835
	else \
Packit Bot 06c835
	  msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
Packit Bot 06c835
	fi; \
Packit Bot 06c835
	case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
Packit Bot 06c835
	  '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
Packit Bot 06c835
	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
Packit Bot 06c835
	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
Packit Bot 06c835
	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
Packit Bot 06c835
	      --msgid-bugs-address="$$msgid_bugs_address" \
Packit Bot 06c835
	      $(POTFILES) \
Packit Bot 06c835
	    ;; \
Packit Bot 06c835
	  *) \
Packit Bot 06c835
	    $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
Packit Bot 06c835
	      --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
Packit Bot 06c835
	      --copyright-holder='$(COPYRIGHT_HOLDER)' \
Packit Bot 06c835
	      --package-name="$${package_gnu}$(PACKAGE)" \
Packit Bot 06c835
	      --package-version='$(VERSION)' \
Packit Bot 06c835
	      --msgid-bugs-address="$$msgid_bugs_address" \
Packit Bot 06c835
	      $(POTFILES) \
Packit Bot 06c835
	    ;; \
Packit Bot 06c835
	esac
Packit Bot 06c835
	test ! -f $(DOMAIN).po || { \
Packit Bot 06c835
	  if test -f $(srcdir)/$(DOMAIN).pot; then \
Packit Bot 06c835
	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
Packit Bot 06c835
	    sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
Packit Bot 06c835
	    if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
Packit Bot 06c835
	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
Packit Bot 06c835
	    else \
Packit Bot 06c835
	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
Packit Bot 06c835
	      mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
Packit Bot 06c835
	    fi; \
Packit Bot 06c835
	  else \
Packit Bot 06c835
	    mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
Packit Bot 06c835
	  fi; \
Packit Bot 06c835
	}
Packit Bot 06c835
Packit Bot 06c835
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
Packit Bot 06c835
# every "make" invocation, only create it when it is missing.
Packit Bot 06c835
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
Packit Bot 06c835
$(srcdir)/$(DOMAIN).pot:
Packit Bot 06c835
	$(MAKE) $(DOMAIN).pot-update
Packit Bot 06c835
Packit Bot 06c835
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
Packit Bot 06c835
# Note that a PO file is not touched if it doesn't need to be changed.
Packit Bot 06c835
$(POFILES): $(srcdir)/$(DOMAIN).pot
Packit Bot 06c835
	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
Packit Bot 06c835
	if test -f "$(srcdir)/$${lang}.po"; then \
Packit Bot 06c835
	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
Packit Bot 06c835
	  echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
Packit Bot 06c835
	  cd $(srcdir) \
Packit Bot 06c835
	    && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
Packit Bot 06c835
	           '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
Packit Bot 06c835
	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
Packit Bot 06c835
	           *) \
Packit Bot 06c835
	             $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
Packit Bot 06c835
	         esac; \
Packit Bot 06c835
	       }; \
Packit Bot 06c835
	else \
Packit Bot 06c835
	  $(MAKE) $${lang}.po-create; \
Packit Bot 06c835
	fi
Packit Bot 06c835
Packit Bot 06c835
Packit Bot 06c835
install-data-local: install-data-local-@USE_NLS@
Packit Bot 06c835
install-data-local-no: all-local
Packit Bot 06c835
install-data-local-yes: all-local
Packit Bot 06c835
	$(MKDIR_P) $(DESTDIR)$(datadir)
Packit Bot 06c835
	@catalogs='$(CATALOGS)'; \
Packit Bot 06c835
	for cat in $$catalogs; do \
Packit Bot 06c835
	  cat=`basename $$cat`; \
Packit Bot 06c835
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
Packit Bot 06c835
	  dir=$(localedir)/$$lang/LC_MESSAGES; \
Packit Bot 06c835
	  $(MKDIR_P) $(DESTDIR)$$dir; \
Packit Bot 06c835
	  if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
Packit Bot 06c835
	  $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
Packit Bot 06c835
	  echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
Packit Bot 06c835
	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
Packit Bot 06c835
	    if test -n "$$lc"; then \
Packit Bot 06c835
	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
Packit Bot 06c835
	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
Packit Bot 06c835
	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
Packit Bot 06c835
	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
Packit Bot 06c835
	         for file in *; do \
Packit Bot 06c835
	           if test -f $$file; then \
Packit Bot 06c835
	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
Packit Bot 06c835
	           fi; \
Packit Bot 06c835
	         done); \
Packit Bot 06c835
	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
Packit Bot 06c835
	      else \
Packit Bot 06c835
	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
Packit Bot 06c835
	          :; \
Packit Bot 06c835
	        else \
Packit Bot 06c835
	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	        fi; \
Packit Bot 06c835
	      fi; \
Packit Bot 06c835
	      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
Packit Bot 06c835
	      ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
Packit Bot 06c835
	      ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
Packit Bot 06c835
	      cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
Packit Bot 06c835
	      echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
Packit Bot 06c835
	    fi; \
Packit Bot 06c835
	  done; \
Packit Bot 06c835
	done
Packit Bot 06c835
Packit Bot 06c835
installdirs-local: installdirs-local-@USE_NLS@
Packit Bot 06c835
installdirs-local-no:
Packit Bot 06c835
installdirs-local-yes:
Packit Bot 06c835
	$(MKDIR_P) $(DESTDIR)$(datadir)
Packit Bot 06c835
	@catalogs='$(CATALOGS)'; \
Packit Bot 06c835
	for cat in $$catalogs; do \
Packit Bot 06c835
	  cat=`basename $$cat`; \
Packit Bot 06c835
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
Packit Bot 06c835
	  dir=$(localedir)/$$lang/LC_MESSAGES; \
Packit Bot 06c835
	  $(MKDIR_P) $(DESTDIR)$$dir; \
Packit Bot 06c835
	  for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
Packit Bot 06c835
	    if test -n "$$lc"; then \
Packit Bot 06c835
	      if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
Packit Bot 06c835
	        link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
Packit Bot 06c835
	        mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
Packit Bot 06c835
	        mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	        (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
Packit Bot 06c835
	         for file in *; do \
Packit Bot 06c835
	           if test -f $$file; then \
Packit Bot 06c835
	             ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
Packit Bot 06c835
	           fi; \
Packit Bot 06c835
	         done); \
Packit Bot 06c835
	        rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
Packit Bot 06c835
	      else \
Packit Bot 06c835
	        if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
Packit Bot 06c835
	          :; \
Packit Bot 06c835
	        else \
Packit Bot 06c835
	          rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	          mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
Packit Bot 06c835
	        fi; \
Packit Bot 06c835
	      fi; \
Packit Bot 06c835
	    fi; \
Packit Bot 06c835
	  done; \
Packit Bot 06c835
	done
Packit Bot 06c835
Packit Bot 06c835
uninstall-local: uninstall-local-@USE_NLS@
Packit Bot 06c835
uninstall-local-no:
Packit Bot 06c835
uninstall-local-yes:
Packit Bot 06c835
	catalogs='$(CATALOGS)'; \
Packit Bot 06c835
	for cat in $$catalogs; do \
Packit Bot 06c835
	  cat=`basename $$cat`; \
Packit Bot 06c835
	  lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
Packit Bot 06c835
	  for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
Packit Bot 06c835
	    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
Packit Bot 06c835
	  done; \
Packit Bot 06c835
	done
Packit Bot 06c835
Packit Bot 06c835
html ID:
Packit Bot 06c835
Packit Bot 06c835
MOSTLYCLEANFILES =
Packit Bot 06c835
MOSTLYCLEANFILES += remove-potcdate.sed
Packit Bot 06c835
MOSTLYCLEANFILES += stamp-poT
Packit Bot 06c835
MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
Packit Bot 06c835
MOSTLYCLEANFILES += *.o
Packit Bot 06c835
Packit Bot 06c835
DISTCLEANFILES = *.mo
Packit Bot 06c835
Packit Bot 06c835
MAINTAINERCLEANFILES = stamp-po $(GMOFILES)
Packit Bot 06c835
Packit Bot 06c835
EXTRA_DIST = remove-potcdate.sin LINGUAS $(POFILES) $(GMOFILES)
Packit Bot 06c835
Packit Bot 06c835
# Hidden from automake, but really activated. Works around an automake-1.5 bug.
Packit Bot 06c835
#distdir: distdir1
Packit Bot 06c835
distdir1:
Packit Bot 06c835
	$(MAKE) update-po
Packit Bot 06c835
	if test -f $(srcdir)/$(DOMAIN).pot; then \
Packit Bot 06c835
	  for file in $(DOMAIN).pot stamp-po; do \
Packit Bot 06c835
	    if test -f $$file; then d=.; else d=$(srcdir); fi; \
Packit Bot 06c835
	    cp -p $$d/$$file $(distdir)/$$file || exit 1; \
Packit Bot 06c835
	  done; \
Packit Bot 06c835
	fi
Packit Bot 06c835
Packit Bot 06c835
update-po: Makefile
Packit Bot 06c835
	$(MAKE) $(DOMAIN).pot-update
Packit Bot 06c835
	test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
Packit Bot 06c835
	$(MAKE) update-gmo
Packit Bot 06c835
Packit Bot 06c835
# General rule for creating PO files.
Packit Bot 06c835
Packit Bot 06c835
.nop.po-create:
Packit Bot 06c835
	@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
Packit Bot 06c835
	echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
Packit Bot 06c835
	exit 1
Packit Bot 06c835
Packit Bot 06c835
# General rule for updating PO files.
Packit Bot 06c835
Packit Bot 06c835
.nop.po-update:
Packit Bot 06c835
	@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
Packit Bot 06c835
	tmpdir=`pwd`; \
Packit Bot 06c835
	echo "$$lang:"; \
Packit Bot 06c835
	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
Packit Bot 06c835
	echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
Packit Bot 06c835
	cd $(srcdir); \
Packit Bot 06c835
	if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
Packit Bot 06c835
	       '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
Packit Bot 06c835
	         $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
Packit Bot 06c835
	       *) \
Packit Bot 06c835
	         $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
Packit Bot 06c835
	     esac; \
Packit Bot 06c835
	   }; then \
Packit Bot 06c835
	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
Packit Bot 06c835
	    rm -f $$tmpdir/$$lang.new.po; \
Packit Bot 06c835
	  else \
Packit Bot 06c835
	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
Packit Bot 06c835
	      :; \
Packit Bot 06c835
	    else \
Packit Bot 06c835
	      echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
Packit Bot 06c835
	      exit 1; \
Packit Bot 06c835
	    fi; \
Packit Bot 06c835
	  fi; \
Packit Bot 06c835
	else \
Packit Bot 06c835
	  echo "msgmerge for $$lang.po failed!" 1>&2; \
Packit Bot 06c835
	  rm -f $$tmpdir/$$lang.new.po; \
Packit Bot 06c835
	fi
Packit Bot 06c835
Packit Bot 06c835
$(DUMMYPOFILES):
Packit Bot 06c835
Packit Bot 06c835
update-gmo: Makefile $(GMOFILES)
Packit Bot 06c835
	@: