bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gettext: propagate po/Makefile.in.in too


From: Paul Eggert
Subject: [PATCH] gettext: propagate po/Makefile.in.in too
Date: Sat, 25 Apr 2015 22:41:57 -0700

* 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.
---
 ChangeLog                   |  8 ++++++
 build-aux/po/Makefile.in.in | 70 ++++++++++++++++++++++++++++++---------------
 config/srclist.txt          |  3 ++
 3 files changed, 58 insertions(+), 23 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b285b82..ec5cd54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-25  Paul Eggert  <address@hidden>
+
+       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.
+
 2015-04-24  Paul Eggert  <address@hidden>
 
        file-has-acl: new module, split from acl
diff --git a/build-aux/po/Makefile.in.in b/build-aux/po/Makefile.in.in
index 32753a0..d1ca9d7 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 
<address@hidden>
 #
-# 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="address@hidden@" \
+             --package-name="address@hidden@" \
              --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: address@hidden@
        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: address@hidden@
        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)
diff --git a/config/srclist.txt b/config/srclist.txt
index ea46307..5e767ce 100644
--- a/config/srclist.txt
+++ b/config/srclist.txt
@@ -61,6 +61,9 @@ $GETTEXT/gettext-runtime/m4/lcmessage.m4      m4
 $GETTEXT/gettext-runtime/m4/nls.m4             m4
 $GETTEXT/gettext-runtime/m4/po.m4              m4
 
+$GETTEXT/gettext-runtime/po/Makefile.in.in     build-aux/po
+$GETTEXT/gettext-runtime/po/remove-potcdate.sin        build-aux/po
+
 # 
 # All below here commented out in forlorn hope of future syncs.
 
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]