]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid grepping through monster files.
authorBruno Haible <bruno@clisp.org>
Sat, 12 Jun 2010 00:14:06 +0000 (02:14 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 30 Aug 2010 20:58:32 +0000 (22:58 +0200)
gettext-runtime/po/ChangeLog
gettext-runtime/po/Makefile.in.in
gettext-tools/po/ChangeLog
gettext-tools/po/Makefile.in.in

index 557a0b21a9bc84bc781947ca734ae2f22e79d0ff..fcacd91da085c6274da24d5d9dc84e8541d2e4d1 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-12  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.in.in ($(DOMAIN).pot-update): When GNU find is available,
+       avoid grepping through monster files.
+       Reported by Jim Meyering <jim@meyering.net>.
+
 2010-06-04  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.18.1 released.
index 83d8838ac017b8602f0ac150d7bda5a90da81c2f..e666eaaa249a1a79a1167d841ed0d9f2a5b0c1fc 100644 (file)
@@ -8,7 +8,7 @@
 # Please note that the actual code of GNU gettext is covered by the GNU
 # General Public License and is *not* in the public domain.
 #
-# Origin: gettext-0.18
+# Origin: gettext-0.18.2
 GETTEXT_MACRO_VERSION = 0.18
 
 PACKAGE = @PACKAGE@
@@ -137,8 +137,16 @@ 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 \
+       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=''; \
index 2667b20ce9b9c480b8be7450f3889f5ebf3b415e..d5c1ea92435aafb25284d843ae80660297ff0978 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-12  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.in.in ($(DOMAIN).pot-update): When GNU find is available,
+       avoid grepping through monster files.
+       Reported by Jim Meyering <jim@meyering.net>.
+
 2010-06-04  Bruno Haible  <bruno@clisp.org>
 
        Offer more choices in the Makevars template.
index 83d8838ac017b8602f0ac150d7bda5a90da81c2f..e666eaaa249a1a79a1167d841ed0d9f2a5b0c1fc 100644 (file)
@@ -8,7 +8,7 @@
 # Please note that the actual code of GNU gettext is covered by the GNU
 # General Public License and is *not* in the public domain.
 #
-# Origin: gettext-0.18
+# Origin: gettext-0.18.2
 GETTEXT_MACRO_VERSION = 0.18
 
 PACKAGE = @PACKAGE@
@@ -137,8 +137,16 @@ 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 \
+       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=''; \