summaryrefslogtreecommitdiff
path: root/build-aux/po
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-04-25 17:28:45 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-04-25 17:29:21 -0700
commitf2f698092426d2fcb69beb184d92d177adc328bf (patch)
treee1d8533ef2712b2554b61a3719971b80edc21f0a /build-aux/po
parent800807020745a5d10b95f5b9f2a9026c6de5968f (diff)
downloadgnulib-f2f698092426d2fcb69beb184d92d177adc328bf.tar.gz
gettext: propagate po/Makefile.in.in too
* build-aux/po/Makefile.in.in: Copy from latest gettext. * config/srclist.txt: In build-aux/po, copy Makefile.in.in and remove-potcdate.sin from $GETTEXT. This fixes a version mismatch between Makefile.in.in and the gettext-runtime m4 files.
Diffstat (limited to 'build-aux/po')
-rw-r--r--build-aux/po/Makefile.in.in70
1 files changed, 47 insertions, 23 deletions
diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in
index 32753a0a02..d1ca9d781a 100644
--- a/build-aux/po/Makefile.in.in
+++ b/build-aux/po/Makefile.in.in
@@ -1,20 +1,19 @@
# Makefile for PO directory in any package using GNU gettext.
# 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
-# be used in projects which are not available under the GNU General Public
-# License but which still want to provide support for the GNU gettext
-# functionality.
-# Please note that the actual code of GNU gettext is covered by the GNU
-# General Public License and is *not* in the public domain.
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
#
-# Origin: gettext-0.18
-GETTEXT_MACRO_VERSION = 0.18
+# Origin: gettext-0.19
+GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+SED = @SED@
SHELL = /bin/sh
@SET_MAKE@
@@ -32,16 +31,13 @@ gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-# Define $(MKDIR_P).
+# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# @install_sh@ does not start with $(SHELL), so we add it.
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
-# Gnulib provides a backport of autoconf 2.60's AC_PROG_MKDIR_P,
-# with a fix from autoconf 2.62 for interoperability with automake 1.9.6,
-# so use $(MKDIR_P) in the rest of this makefile.
mkinstalldirs = $(SHELL) @install_sh@ -d
install_sh = $(SHELL) @install_sh@
MKDIR_P = @MKDIR_P@
@@ -79,6 +75,16 @@ POTFILES = \
CATALOGS = @CATALOGS@
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
@@ -141,11 +147,29 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# 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.
+# 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
- if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
- package_gnu='GNU '; \
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ 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=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
else \
- package_gnu=''; \
+ package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
@@ -165,7 +189,7 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
- --package-name="$${package_gnu}@PACKAGE@" \
+ --package-name="$${package_prefix}@PACKAGE@" \
--package-version='@VERSION@' \
--msgid-bugs-address="$$msgid_bugs_address" \
;; \
@@ -193,9 +217,10 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
@@ -215,7 +240,7 @@ install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
@@ -233,7 +258,7 @@ install-data-yes: all
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(MKDIR_P) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -269,12 +294,11 @@ install-data-yes: all
install-strip: install
-install-dvi install-html install-info install-pdf install-ps:
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
if test "$(PACKAGE)" = "gettext-tools"; then \
- $(MKDIR_P) $(DESTDIR)$(gettextsrcdir); \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
@@ -285,7 +309,7 @@ installdirs-data-yes:
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(MKDIR_P) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
@@ -357,7 +381,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
- $(MAKE) update-po
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)