version 1.1, 2017/01/24 14:48:55
|
version 1.1.1.2, 2021/03/17 00:49:17
|
Line 1
|
Line 1
|
# Makefile for PO directory in any package using GNU gettext. |
# Makefile for PO directory in any package using GNU gettext. |
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu> | # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu> |
# |
# |
# This file can be copied and used freely without restrictions. It can |
# This file can be copied and used freely without restrictions. It can |
# be used in projects which are not available under the GNU General Public |
# be used in projects which are not available under the GNU General Public |
Line 8
|
Line 8
|
# Please note that the actual code of GNU gettext is covered by the GNU |
# Please note that the actual code of GNU gettext is covered by the GNU |
# General Public License and is *not* in the public domain. |
# General Public License and is *not* in the public domain. |
# |
# |
# Origin: gettext-0.16 | # Origin: gettext-0.18.2 |
| GETTEXT_MACRO_VERSION = 0.18 |
|
|
PACKAGE = @PACKAGE@ |
PACKAGE = @PACKAGE@ |
VERSION = @VERSION@ |
VERSION = @VERSION@ |
Line 87 CATALOGS = @CATALOGS@
|
Line 88 CATALOGS = @CATALOGS@
|
.po.gmo: |
.po.gmo: |
@lang=`echo $* | sed -e 's,.*/,,'`; \ |
@lang=`echo $* | sed -e 's,.*/,,'`; \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ | echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ |
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo | cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo |
|
|
.sin.sed: |
.sin.sed: |
sed -e '/^#/d' $< > t-$@ |
sed -e '/^#/d' $< > t-$@ |
Line 100 all: all-@USE_NLS@
|
Line 101 all: all-@USE_NLS@
|
all-yes: stamp-po |
all-yes: stamp-po |
all-no: |
all-no: |
|
|
|
# Ensure that the gettext macros and this Makefile.in.in are in sync. |
|
CHECK_MACRO_VERSION = \ |
|
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ |
|
|| { 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; \ |
|
exit 1; \ |
|
} |
|
|
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no |
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no |
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because |
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because |
# we don't want to bother translators with empty POT files). We assume that |
# we don't want to bother translators with empty POT files). We assume that |
Line 115 all-no:
|
Line 123 all-no:
|
# $(POFILES) has been designed to not touch files that don't need to be |
# $(POFILES) has been designed to not touch files that don't need to be |
# changed. |
# changed. |
stamp-po: $(srcdir)/$(DOMAIN).pot |
stamp-po: $(srcdir)/$(DOMAIN).pot |
|
@$(CHECK_MACRO_VERSION) |
test ! -f $(srcdir)/$(DOMAIN).pot || \ |
test ! -f $(srcdir)/$(DOMAIN).pot || \ |
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) |
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) |
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ |
@test ! -f $(srcdir)/$(DOMAIN).pot || { \ |
Line 129 stamp-po: $(srcdir)/$(DOMAIN).pot
|
Line 138 stamp-po: $(srcdir)/$(DOMAIN).pot
|
|
|
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. |
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. |
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. |
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. |
|
# The determination of whether the package xyz is a GNU one is based on the |
|
# heuristic whether some file in the top level directory mentions "GNU xyz". |
|
# If GNU 'find' is available, we avoid grepping through monster files. |
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed |
|
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ |
|
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ |
|
else \ |
|
LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ |
|
fi; \ |
|
} | grep -v 'libtool:' >/dev/null; then \ |
|
package_gnu='GNU '; \ |
|
else \ |
|
package_gnu=''; \ |
|
fi; \ |
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ |
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ |
else \ |
else \ |
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ |
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ |
fi; \ |
fi; \ |
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ | case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ |
--files-from=$(srcdir)/POTFILES.in \ | $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
--copyright-holder='$(COPYRIGHT_HOLDER)' \ | --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ |
--msgid-bugs-address="$$msgid_bugs_address" | --files-from=$(srcdir)/POTFILES.in \ |
| --copyright-holder='$(COPYRIGHT_HOLDER)' \ |
| --msgid-bugs-address="$$msgid_bugs_address" \ |
| ;; \ |
| *) \ |
| $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ |
| --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ |
| --files-from=$(srcdir)/POTFILES.in \ |
| --copyright-holder='$(COPYRIGHT_HOLDER)' \ |
| --package-name="$${package_gnu}@PACKAGE@" \ |
| --package-version='@VERSION@' \ |
| --msgid-bugs-address="$$msgid_bugs_address" \ |
| ;; \ |
| esac |
test ! -f $(DOMAIN).po || { \ |
test ! -f $(DOMAIN).po || { \ |
if test -f $(srcdir)/$(DOMAIN).pot; then \ |
if test -f $(srcdir)/$(DOMAIN).pot; then \ |
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ |
Line 167 $(POFILES): $(srcdir)/$(DOMAIN).pot
|
Line 202 $(POFILES): $(srcdir)/$(DOMAIN).pot
|
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ |
if test -f "$(srcdir)/$${lang}.po"; then \ |
if test -f "$(srcdir)/$${lang}.po"; then \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ | echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ |
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ | cd $(srcdir) \ |
| && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
| '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ |
| $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ |
| *) \ |
| $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ |
| esac; \ |
| }; \ |
else \ |
else \ |
$(MAKE) $${lang}.po-create; \ |
$(MAKE) $${lang}.po-create; \ |
fi |
fi |
Line 191 install-data: install-data-@USE_NLS@
|
Line 233 install-data: install-data-@USE_NLS@
|
fi |
fi |
install-data-no: all |
install-data-no: all |
install-data-yes: all |
install-data-yes: all |
$(mkdir_p) $(DESTDIR)$(datadir) |
|
@catalogs='$(CATALOGS)'; \ |
@catalogs='$(CATALOGS)'; \ |
for cat in $$catalogs; do \ |
for cat in $$catalogs; do \ |
cat=`basename $$cat`; \ |
cat=`basename $$cat`; \ |
Line 243 installdirs-data: installdirs-data-@USE_NLS@
|
Line 284 installdirs-data: installdirs-data-@USE_NLS@
|
fi |
fi |
installdirs-data-no: |
installdirs-data-no: |
installdirs-data-yes: |
installdirs-data-yes: |
$(mkdir_p) $(DESTDIR)$(datadir) |
|
@catalogs='$(CATALOGS)'; \ |
@catalogs='$(CATALOGS)'; \ |
for cat in $$catalogs; do \ |
for cat in $$catalogs; do \ |
cat=`basename $$cat`; \ |
cat=`basename $$cat`; \ |
Line 369 update-po: Makefile
|
Line 409 update-po: Makefile
|
tmpdir=`pwd`; \ |
tmpdir=`pwd`; \ |
echo "$$lang:"; \ |
echo "$$lang:"; \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ |
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ | echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ |
cd $(srcdir); \ |
cd $(srcdir); \ |
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ | if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ |
| '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ |
| $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ |
| *) \ |
| $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ |
| esac; \ |
| }; then \ |
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ |
rm -f $$tmpdir/$$lang.new.po; \ |
rm -f $$tmpdir/$$lang.new.po; \ |
else \ |
else \ |
Line 392 $(DUMMYPOFILES):
|
Line 438 $(DUMMYPOFILES):
|
update-gmo: Makefile $(GMOFILES) |
update-gmo: Makefile $(GMOFILES) |
@: |
@: |
|
|
|
# Recreate Makefile by invoking config.status. Explicitly invoke the shell, |
|
# because execution permission bits may not work on the current file system. |
|
# Use @SHELL@, which is the shell determined by autoconf for the use by its |
|
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. |
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ |
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ |
cd $(top_builddir) \ |
cd $(top_builddir) \ |
&& $(SHELL) ./config.status $(subdir)/$@.in po-directories | && @SHELL@ ./config.status $(subdir)/$@.in po-directories |
|
|
force: |
force: |
|
|