2N/A# Makefile for PO directory in any package using GNU gettext.
2N/A# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2N/A# This file can be copied and used freely without restrictions. It can
2N/A# be used in projects which are not available under the GNU General Public
2N/A# License but which still want to provide support for the GNU gettext
2N/A# Please note that the actual code of GNU gettext is covered by the GNU
2N/A# General Public License and is *not* in the public domain.
2N/A# Origin: gettext-0.18
2N/AGETTEXT_MACRO_VERSION = 0.18
2N/APACKAGE_BUGREPORT = bug-grub@gnu.org
2N/Aexec_prefix = ${prefix}
2N/Adatarootdir = ${prefix}/share
2N/Adatadir = ${datarootdir}
2N/Alocaledir = ${datarootdir}/locale
2N/AINSTALL_DATA = ${INSTALL} -m 644
2N/A# In automake <=
1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
2N/A# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
2N/A# versions, $(mkinstalldirs) and $(install_sh) are unused.
2N/AGMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
2N/AMSGFMT = $(MSGFMT_$(USE_MSGCTXT))
2N/AXGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
2N/AMSGFILTER = msgfilter
2N/AGMOFILES = @GMOFILES@
2N/AUPDATEPOFILES = @UPDATEPOFILES@
2N/ADUMMYPOFILES = @DUMMYPOFILES@
2N/A$(POFILES) $(GMOFILES) \
2N/ACATALOGS = @CATALOGS@
2N/A# Makevars gets inserted here. (Don't remove this line!)
2N/A.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
2N/A @echo "$(MSGFMT) -c -o $@ $<"; \
2N/A $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
2N/A @lang=`echo $* | sed -e 's,.*/,,'`; \
2N/A test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
2N/A echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
2N/A cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
2N/A sed -e '/^#/d' $< > t-$@
2N/Aall: check-macro-version all-yes
2N/A @test "$(GETTEXT_MACRO_VERSION)" = "0.18" \
2N/A || { echo "*** error: gettext infrastructure mismatch: using a
Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version 0.18" 1>&2; \
2N/A# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
2N/A# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
2N/A# we don't want to bother translators with empty POT files). We assume that
2N/A# LINGUAS is empty in this case,
i.e. $(POFILES) and $(GMOFILES) are empty.
2N/A# In this case, stamp-po is a nop (
i.e. a phony target).
2N/A# stamp-po is a timestamp denoting the last time at which the CATALOGS have
2N/A# been loosely updated. Its purpose is that when a developer or translator
2N/A# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
2N/A# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
2N/A# invocations of "make" will do nothing. This timestamp would not be necessary
2N/A# if updating the $(CATALOGS) would always touch them; however, the rule for
2N/A# $(POFILES) has been designed to not touch files that don't need to be
2N/Astamp-po: $(srcdir)/$(DOMAIN).pot
2N/A test ! -f $(srcdir)/$(DOMAIN).pot || \
2N/A test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
2N/A @test ! -f $(srcdir)/$(DOMAIN).pot || { \
2N/A echo "touch stamp-po" && \
2N/A echo timestamp > stamp-poT && \
2N/A mv stamp-poT stamp-po; \
2N/A# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
2N/A# otherwise packages like GCC can not be built if only parts of the source
2N/A# have been downloaded.
2N/A# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
2N/A# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
2N/A package_gnu='GNU '; \
2N/A if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
2N/A msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
2N/A msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
2N/A case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
2N/A '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
2N/A $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
2N/A --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) --flag=argp_error:2:c-format --flag=argp_failure:4:c-format --flag=error:3:c-format --flag=error_at_line:5:c-format \
2N/A --copyright-holder='$(COPYRIGHT_HOLDER)' \
2N/A --msgid-bugs-address="$$msgid_bugs_address" \
2N/A $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
2N/A --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) --flag=argp_error:2:c-format --flag=argp_failure:4:c-format --flag=error:3:c-format --flag=error_at_line:5:c-format \
2N/A --copyright-holder='$(COPYRIGHT_HOLDER)' \
2N/A --package-name="$${package_gnu}grub" \
2N/A --package-version='1.99' \
2N/A --msgid-bugs-address="$$msgid_bugs_address" \
2N/A sed 's|charset=CHARSET|charset=US-ASCII|' $(DOMAIN).po > $(DOMAIN).1po; \
2N/A mv $(DOMAIN).1po $(DOMAIN).po; \
2N/A case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
2N/A '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
2N/A $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
2N/A --add-comments=TRANSLATORS: --flag=argp_error:2:c-format --flag=argp_failure:4:c-format --flag=error:3:c-format --flag=error_at_line:5:c-format \
2N/A --copyright-holder='$(COPYRIGHT_HOLDER)' \
2N/A --msgid-bugs-address="$$msgid_bugs_address" \
2N/A --join-existing --language=Shell \
2N/A --keyword=gettext_quoted --keyword=gettext_printf \
2N/A $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
2N/A --add-comments=TRANSLATORS: --flag=argp_error:2:c-format --flag=argp_failure:4:c-format --flag=error:3:c-format --flag=error_at_line:5:c-format \
2N/A --copyright-holder='$(COPYRIGHT_HOLDER)' \
2N/A --package-name="$${package_gnu}grub" \
2N/A --package-version='1.99' \
2N/A --msgid-bugs-address="$$msgid_bugs_address" \
2N/A --join-existing --language=Shell \
2N/A --keyword=gettext_quoted --keyword=gettext_printf \
2N/A test ! -f $(DOMAIN).po || { \
2N/A mv $(DOMAIN).1po $(DOMAIN).po; \
2N/A if test -f $(srcdir)/$(DOMAIN).pot; then \
2N/A rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
2N/A rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
2N/A mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
2N/A mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
2N/A# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
2N/A# every "make" invocation, only create it when it is missing.
2N/A# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
2N/A$(srcdir)/$(DOMAIN).pot:
2N/A $(MAKE) $(DOMAIN).pot-update
2N/A# This target rebuilds a PO file if $(DOMAIN).pot has changed.
2N/A# Note that a PO file is not touched if it doesn't need to be changed.
2N/A$(POFILES): $(srcdir)/$(DOMAIN).pot
2N/A @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
2N/A if test -f "$(srcdir)/$${lang}.po"; then \
2N/A test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
2N/A echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
2N/A && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
2N/A '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
2N/A $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
2N/A $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
2N/A $(MAKE) $${lang}.po-create; \
2N/Ainstall: install-exec install-data
2N/Ainstall-data: install-data-yes
2N/A if test "$(PACKAGE)" = "gettext-tools"; then \
2N/A $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
2N/A $(INSTALL_DATA) $(srcdir)/$$file \
2N/A $(DESTDIR)$(gettextsrcdir)/$$file; \
2N/A for file in Makevars; do \
2N/A rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
2N/Ainstall-data-yes: all
2N/A @catalogs='$(CATALOGS)'; \
2N/A for cat in $$catalogs; do \
2N/A cat=`basename $$cat`; \
2N/A lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
2N/A $(mkdir_p) $(DESTDIR)$$dir; \
2N/A if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
2N/A $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
2N/A echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
2N/A for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
2N/A if test -n "$$lc"; then \
2N/A if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>
/dev/null) | grep ' -> ' >
/dev/null; then \
2N/A link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
2N/A mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$
lc.old; \
2N/A mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A (cd $(DESTDIR)$(localedir)/$$lang/$$
lc.old && \
2N/A if test -f $$file; then \
2N/A ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$
lc.old; \
2N/A if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
2N/A ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>
/dev/null || \
2N/A cp -p $(DESTDIR)$(localedir)/$$
lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
2N/A echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
2N/Ainstall-strip: install
2N/Ainstalldirs: installdirs-exec installdirs-data
2N/Ainstalldirs-data: installdirs-data-yes
2N/A if test "$(PACKAGE)" = "gettext-tools"; then \
2N/A $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
2N/Ainstalldirs-data-yes:
2N/A @catalogs='$(CATALOGS)'; \
2N/A for cat in $$catalogs; do \
2N/A cat=`basename $$cat`; \
2N/A lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
2N/A $(mkdir_p) $(DESTDIR)$$dir; \
2N/A for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
2N/A if test -n "$$lc"; then \
2N/A if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>
/dev/null) | grep ' -> ' >
/dev/null; then \
2N/A link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
2N/A mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$
lc.old; \
2N/A mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A (cd $(DESTDIR)$(localedir)/$$lang/$$
lc.old && \
2N/A if test -f $$file; then \
2N/A ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$
lc.old; \
2N/A if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
2N/A# Define this as empty until I found a useful application.
2N/Auninstall: uninstall-exec uninstall-data
2N/Auninstall-data: uninstall-data-yes
2N/A if test "$(PACKAGE)" = "gettext-tools"; then \
2N/A rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
2N/A catalogs='$(CATALOGS)'; \
2N/A for cat in $$catalogs; do \
2N/A cat=`basename $$cat`; \
2N/A lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
2N/A for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
2N/A rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
2N/Ainfo dvi ps pdf html tags TAGS ctags CTAGS ID:
2N/A rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *
.new.po 2N/Amaintainer-clean: distclean
2N/A @echo "This command is intended for maintainers to use;"
2N/A @echo "it deletes files that may require special tools to rebuild."
2N/A rm -f stamp-po $(GMOFILES)
2N/Adistdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
2N/A# This is a separate target because 'update-po' must be executed before.
2N/Adist2: stamp-po $(DISTFILES)
2N/A dists="$(DISTFILES)"; \
2N/A if test "$(PACKAGE)" = "gettext-tools"; then \
2N/A if test -f $(srcdir)/$(DOMAIN).pot; then \
2N/A dists="$$dists $(DOMAIN).pot stamp-po"; \
2N/A if test -f $(srcdir)/ChangeLog; then \
2N/A dists="$$dists ChangeLog"; \
2N/A for i in 0 1 2 3 4 5 6 7 8 9; do \
2N/A if test -f $(srcdir)/ChangeLog.$$i; then \
2N/A dists="$$dists ChangeLog.$$i"; \
2N/A if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
2N/A for file in $$dists; do \
2N/A if test -f $$file; then \
2N/A cp -p $$file $(distdir) || exit 1; \
2N/A cp -p $(srcdir)/$$file $(distdir) || exit 1; \
2N/A $(MAKE) $(DOMAIN).pot-update
2N/A test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
2N/A# General rule for creating PO files.
2N/A @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
2N/A echo "File $$
lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
2N/A# General rule for updating PO files.
2N/A @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
2N/A if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
2N/A test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
2N/A echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$
lang.po $(DOMAIN).pot -o $$
lang.new.po"; \
2N/A if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
2N/A '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
2N/Aupdate-gmo: Makefile $(GMOFILES)
2N/A# because execution permission bits may not work on the current file system.
2N/A# Use
/bin/sh, which is the shell determined by autoconf for the use by its
2N/A# scripts, not $(SHELL) which is hardwired to
/bin/sh and may be deficient.
2N/A cd $(top_builddir) \
2N/A# Tell versions [3.59,3.63) of GNU make not to export all variables.
2N/A# Otherwise a system limit (for SysV at least) may be exceeded.