5 kx # Makefile for PO directory in any package using GNU gettext.
5 kx # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
5 kx #
5 kx # Copying and distribution of this file, with or without modification,
5 kx # are permitted in any medium without royalty provided the copyright
5 kx # notice and this notice are preserved. This file is offered as-is,
5 kx # without any warranty.
5 kx #
5 kx # Origin: gettext-0.19.8
5 kx GETTEXT_MACRO_VERSION = 0.19
5 kx
5 kx PACKAGE = @PACKAGE@
5 kx VERSION = @VERSION@
5 kx PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
5 kx
5 kx SED = @SED@
5 kx SHELL = /bin/sh
5 kx @SET_MAKE@
5 kx
5 kx srcdir = @srcdir@
5 kx top_srcdir = @top_srcdir@
5 kx top_builddir = @top_builddir@
5 kx VPATH = @srcdir@
5 kx
5 kx prefix = @prefix@
5 kx exec_prefix = @exec_prefix@
5 kx datarootdir = @datarootdir@
5 kx datadir = @datadir@
5 kx localedir = @localedir@
5 kx gettextsrcdir = $(datadir)/gettext/po
5 kx
5 kx INSTALL = @INSTALL@
5 kx INSTALL_DATA = @INSTALL_DATA@
5 kx
5 kx # We use $(mkdir_p).
5 kx # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
5 kx # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
5 kx # @install_sh@ does not start with $(SHELL), so we add it.
5 kx # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
5 kx # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
5 kx # versions, $(mkinstalldirs) and $(install_sh) are unused.
5 kx mkinstalldirs = $(SHELL) @install_sh@ -d
5 kx install_sh = $(SHELL) @install_sh@
5 kx MKDIR_P = @MKDIR_P@
5 kx mkdir_p = @mkdir_p@
5 kx
5 kx # When building gettext-tools, we prefer to use the built programs
5 kx # rather than installed programs. However, we can't do that when we
5 kx # are cross compiling.
5 kx CROSS_COMPILING = @CROSS_COMPILING@
5 kx
5 kx GMSGFMT_ = @GMSGFMT@
5 kx GMSGFMT_no = @GMSGFMT@
5 kx GMSGFMT_yes = @GMSGFMT_015@
5 kx GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
5 kx MSGFMT_ = @MSGFMT@
5 kx MSGFMT_no = @MSGFMT@
5 kx MSGFMT_yes = @MSGFMT_015@
5 kx MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
5 kx XGETTEXT_ = @XGETTEXT@
5 kx XGETTEXT_no = @XGETTEXT@
5 kx XGETTEXT_yes = @XGETTEXT_015@
5 kx XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
5 kx MSGMERGE = msgmerge
5 kx MSGMERGE_UPDATE = @MSGMERGE@ --update
5 kx MSGINIT = msginit
5 kx MSGCONV = msgconv
5 kx MSGFILTER = msgfilter
5 kx
5 kx POFILES = @POFILES@
5 kx GMOFILES = @GMOFILES@
5 kx UPDATEPOFILES = @UPDATEPOFILES@
5 kx DUMMYPOFILES = @DUMMYPOFILES@
5 kx DISTFILES.common = Makefile.in.in remove-potcdate.sin \
5 kx $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
5 kx DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
5 kx $(POFILES) $(GMOFILES) \
5 kx $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
5 kx
5 kx POTFILES = \
5 kx
5 kx CATALOGS = @CATALOGS@
5 kx
5 kx POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
5 kx POFILESDEPS_yes = $(POFILESDEPS_)
5 kx POFILESDEPS_no =
5 kx POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
5 kx
5 kx DISTFILESDEPS_ = update-po
5 kx DISTFILESDEPS_yes = $(DISTFILESDEPS_)
5 kx DISTFILESDEPS_no =
5 kx DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
5 kx
5 kx # Makevars gets inserted here. (Don't remove this line!)
5 kx
5 kx .SUFFIXES:
5 kx .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
5 kx
5 kx .po.mo:
5 kx @echo "$(MSGFMT) -c -o $@ $<"; \
5 kx $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
5 kx
5 kx .po.gmo:
5 kx @lang=`echo $* | sed -e 's,.*/,,'`; \
5 kx test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
5 kx echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
5 kx cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
5 kx
5 kx .sin.sed:
5 kx sed -e '/^#/d' $< > t-$@
5 kx mv t-$@ $@
5 kx
5 kx
5 kx all: all-@USE_NLS@
5 kx
5 kx all-yes: stamp-po
5 kx all-no:
5 kx
5 kx # Ensure that the gettext macros and this Makefile.in.in are in sync.
5 kx CHECK_MACRO_VERSION = \
5 kx test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
5 kx || { 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; \
5 kx exit 1; \
5 kx }
5 kx
5 kx # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
5 kx # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
5 kx # we don't want to bother translators with empty POT files). We assume that
5 kx # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
5 kx # In this case, stamp-po is a nop (i.e. a phony target).
5 kx
5 kx # stamp-po is a timestamp denoting the last time at which the CATALOGS have
5 kx # been loosely updated. Its purpose is that when a developer or translator
5 kx # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
5 kx # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
5 kx # invocations of "make" will do nothing. This timestamp would not be necessary
5 kx # if updating the $(CATALOGS) would always touch them; however, the rule for
5 kx # $(POFILES) has been designed to not touch files that don't need to be
5 kx # changed.
5 kx stamp-po: $(srcdir)/$(DOMAIN).pot
5 kx @$(CHECK_MACRO_VERSION)
5 kx test ! -f $(srcdir)/$(DOMAIN).pot || \
5 kx test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
5 kx @test ! -f $(srcdir)/$(DOMAIN).pot || { \
5 kx echo "touch stamp-po" && \
5 kx echo timestamp > stamp-poT && \
5 kx mv stamp-poT stamp-po; \
5 kx }
5 kx
5 kx # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
5 kx # otherwise packages like GCC can not be built if only parts of the source
5 kx # have been downloaded.
5 kx
5 kx # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
5 kx # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
5 kx # The determination of whether the package xyz is a GNU one is based on the
5 kx # heuristic whether some file in the top level directory mentions "GNU xyz".
5 kx # If GNU 'find' is available, we avoid grepping through monster files.
5 kx $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
5 kx package_gnu="$(PACKAGE_GNU)"; \
5 kx test -n "$$package_gnu" || { \
5 kx if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
5 kx LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
5 kx -size -10000000c -exec grep 'GNU @PACKAGE@' \
5 kx /dev/null '{}' ';' 2>/dev/null; \
5 kx else \
5 kx LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
5 kx fi; \
5 kx } | grep -v 'libtool:' >/dev/null; then \
5 kx package_gnu=yes; \
5 kx else \
5 kx package_gnu=no; \
5 kx fi; \
5 kx }; \
5 kx if test "$$package_gnu" = "yes"; then \
5 kx package_prefix='GNU '; \
5 kx else \
5 kx package_prefix=''; \
5 kx fi; \
5 kx if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
5 kx msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
5 kx else \
5 kx msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
5 kx fi; \
5 kx case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
5 kx '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
5 kx $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
5 kx --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
5 kx --files-from=$(srcdir)/POTFILES.in \
5 kx --copyright-holder='$(COPYRIGHT_HOLDER)' \
5 kx --msgid-bugs-address="$$msgid_bugs_address" \
5 kx ;; \
5 kx *) \
5 kx $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
5 kx --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
5 kx --files-from=$(srcdir)/POTFILES.in \
5 kx --copyright-holder='$(COPYRIGHT_HOLDER)' \
5 kx --package-name="$${package_prefix}@PACKAGE@" \
5 kx --package-version='@VERSION@' \
5 kx --msgid-bugs-address="$$msgid_bugs_address" \
5 kx ;; \
5 kx esac
5 kx test ! -f $(DOMAIN).po || { \
5 kx if test -f $(srcdir)/$(DOMAIN).pot-header; then \
5 kx sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
5 kx cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
5 kx rm -f $(DOMAIN).1po; \
5 kx fi; \
5 kx if test -f $(srcdir)/$(DOMAIN).pot; then \
5 kx sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
5 kx sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
5 kx if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
5 kx rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
5 kx else \
5 kx rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
5 kx mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
5 kx fi; \
5 kx else \
5 kx mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
5 kx fi; \
5 kx }
5 kx
5 kx # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
5 kx # every "make" invocation, only create it when it is missing.
5 kx # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
5 kx $(srcdir)/$(DOMAIN).pot:
5 kx $(MAKE) $(DOMAIN).pot-update
5 kx
5 kx # This target rebuilds a PO file if $(DOMAIN).pot has changed.
5 kx # Note that a PO file is not touched if it doesn't need to be changed.
5 kx $(POFILES): $(POFILESDEPS)
5 kx @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
5 kx if test -f "$(srcdir)/$${lang}.po"; then \
5 kx test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
5 kx test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
5 kx echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
5 kx cd $(srcdir) \
5 kx && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
5 kx '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
5 kx $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
5 kx *) \
5 kx $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
5 kx esac; \
5 kx }; \
5 kx else \
5 kx $(MAKE) $${lang}.po-create; \
5 kx fi
5 kx
5 kx
5 kx install: install-exec install-data
5 kx install-exec:
5 kx install-data: install-data-@USE_NLS@
5 kx if test "$(PACKAGE)" = "gettext-tools"; then \
5 kx $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
5 kx for file in $(DISTFILES.common) Makevars.template; do \
5 kx $(INSTALL_DATA) $(srcdir)/$$file \
5 kx $(DESTDIR)$(gettextsrcdir)/$$file; \
5 kx done; \
5 kx for file in Makevars; do \
5 kx rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
5 kx done; \
5 kx else \
5 kx : ; \
5 kx fi
5 kx install-data-no: all
5 kx install-data-yes: all
5 kx @catalogs='$(CATALOGS)'; \
5 kx for cat in $$catalogs; do \
5 kx cat=`basename $$cat`; \
5 kx lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
5 kx dir=$(localedir)/$$lang/LC_MESSAGES; \
5 kx $(mkdir_p) $(DESTDIR)$$dir; \
5 kx if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
5 kx $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
5 kx echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
5 kx for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
5 kx if test -n "$$lc"; then \
5 kx if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
5 kx link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
5 kx mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
5 kx mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
5 kx for file in *; do \
5 kx if test -f $$file; then \
5 kx ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
5 kx fi; \
5 kx done); \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
5 kx else \
5 kx if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
5 kx :; \
5 kx else \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx fi; \
5 kx fi; \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
5 kx ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
5 kx ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
5 kx cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
5 kx echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
5 kx fi; \
5 kx done; \
5 kx done
5 kx
5 kx install-strip: install
5 kx
5 kx installdirs: installdirs-exec installdirs-data
5 kx installdirs-exec:
5 kx installdirs-data: installdirs-data-@USE_NLS@
5 kx if test "$(PACKAGE)" = "gettext-tools"; then \
5 kx $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
5 kx else \
5 kx : ; \
5 kx fi
5 kx installdirs-data-no:
5 kx installdirs-data-yes:
5 kx @catalogs='$(CATALOGS)'; \
5 kx for cat in $$catalogs; do \
5 kx cat=`basename $$cat`; \
5 kx lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
5 kx dir=$(localedir)/$$lang/LC_MESSAGES; \
5 kx $(mkdir_p) $(DESTDIR)$$dir; \
5 kx for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
5 kx if test -n "$$lc"; then \
5 kx if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
5 kx link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
5 kx mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
5 kx mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
5 kx for file in *; do \
5 kx if test -f $$file; then \
5 kx ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
5 kx fi; \
5 kx done); \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
5 kx else \
5 kx if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
5 kx :; \
5 kx else \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
5 kx fi; \
5 kx fi; \
5 kx fi; \
5 kx done; \
5 kx done
5 kx
5 kx # Define this as empty until I found a useful application.
5 kx installcheck:
5 kx
5 kx uninstall: uninstall-exec uninstall-data
5 kx uninstall-exec:
5 kx uninstall-data: uninstall-data-@USE_NLS@
5 kx if test "$(PACKAGE)" = "gettext-tools"; then \
5 kx for file in $(DISTFILES.common) Makevars.template; do \
5 kx rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
5 kx done; \
5 kx else \
5 kx : ; \
5 kx fi
5 kx uninstall-data-no:
5 kx uninstall-data-yes:
5 kx catalogs='$(CATALOGS)'; \
5 kx for cat in $$catalogs; do \
5 kx cat=`basename $$cat`; \
5 kx lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
5 kx for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
5 kx rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
5 kx done; \
5 kx done
5 kx
5 kx check: all
5 kx
5 kx info dvi ps pdf html tags TAGS ctags CTAGS ID:
5 kx
5 kx mostlyclean:
5 kx rm -f remove-potcdate.sed
5 kx rm -f stamp-poT
5 kx rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
5 kx rm -fr *.o
5 kx
5 kx clean: mostlyclean
5 kx
5 kx distclean: clean
5 kx rm -f Makefile Makefile.in POTFILES *.mo
5 kx
5 kx maintainer-clean: distclean
5 kx @echo "This command is intended for maintainers to use;"
5 kx @echo "it deletes files that may require special tools to rebuild."
5 kx rm -f stamp-po $(GMOFILES)
5 kx
5 kx distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
5 kx dist distdir:
5 kx test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
5 kx @$(MAKE) dist2
5 kx # This is a separate target because 'update-po' must be executed before.
5 kx dist2: stamp-po $(DISTFILES)
5 kx dists="$(DISTFILES)"; \
5 kx if test "$(PACKAGE)" = "gettext-tools"; then \
5 kx dists="$$dists Makevars.template"; \
5 kx fi; \
5 kx if test -f $(srcdir)/$(DOMAIN).pot; then \
5 kx dists="$$dists $(DOMAIN).pot stamp-po"; \
5 kx fi; \
5 kx if test -f $(srcdir)/ChangeLog; then \
5 kx dists="$$dists ChangeLog"; \
5 kx fi; \
5 kx for i in 0 1 2 3 4 5 6 7 8 9; do \
5 kx if test -f $(srcdir)/ChangeLog.$$i; then \
5 kx dists="$$dists ChangeLog.$$i"; \
5 kx fi; \
5 kx done; \
5 kx if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
5 kx for file in $$dists; do \
5 kx if test -f $$file; then \
5 kx cp -p $$file $(distdir) || exit 1; \
5 kx else \
5 kx cp -p $(srcdir)/$$file $(distdir) || exit 1; \
5 kx fi; \
5 kx done
5 kx
5 kx update-po: Makefile
5 kx $(MAKE) $(DOMAIN).pot-update
5 kx test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
5 kx $(MAKE) update-gmo
5 kx
5 kx # General rule for creating PO files.
5 kx
5 kx .nop.po-create:
5 kx @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
5 kx echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
5 kx exit 1
5 kx
5 kx # General rule for updating PO files.
5 kx
5 kx .nop.po-update:
5 kx @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
5 kx if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
5 kx tmpdir=`pwd`; \
5 kx echo "$$lang:"; \
5 kx test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
5 kx echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
5 kx cd $(srcdir); \
5 kx if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
5 kx '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
5 kx $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
5 kx *) \
5 kx $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
5 kx esac; \
5 kx }; then \
5 kx if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
5 kx rm -f $$tmpdir/$$lang.new.po; \
5 kx else \
5 kx if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
5 kx :; \
5 kx else \
5 kx echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
5 kx exit 1; \
5 kx fi; \
5 kx fi; \
5 kx else \
5 kx echo "msgmerge for $$lang.po failed!" 1>&2; \
5 kx rm -f $$tmpdir/$$lang.new.po; \
5 kx fi
5 kx
5 kx $(DUMMYPOFILES):
5 kx
5 kx update-gmo: Makefile $(GMOFILES)
5 kx @:
5 kx
5 kx # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
5 kx # because execution permission bits may not work on the current file system.
5 kx # Use @SHELL@, which is the shell determined by autoconf for the use by its
5 kx # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
5 kx Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
5 kx cd $(top_builddir) \
5 kx && @SHELL@ ./config.status $(subdir)/$@.in po-directories
5 kx
5 kx force:
5 kx
5 kx # Tell versions [3.59,3.63) of GNU make not to export all variables.
5 kx # Otherwise a system limit (for SysV at least) may be exceeded.
5 kx .NOEXPORT: