]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Avoid grepping through monster files.
authorBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:31:23 +0000 (00:31 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Oct 2018 22:31:23 +0000 (00:31 +0200)
This mirrors the Makefile.in.in change from 2010-06-12.

Reported by Jim Meyering <jim@meyering.net>.

* gettext-tools/examples/hello-*/po/Makefile.am (($(DOMAIN).pot-update): When
GNU find is available, avoid grepping through monster files.
* gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile: Likewise.

22 files changed:
gettext-tools/examples/hello-c++-qt/po/Makefile.am
gettext-tools/examples/hello-c++-wxwidgets/po/Makefile.am
gettext-tools/examples/hello-clisp/po/Makefile.am
gettext-tools/examples/hello-csharp-forms/po/Makefile.am
gettext-tools/examples/hello-csharp/po/Makefile.am
gettext-tools/examples/hello-gawk/po/Makefile.am
gettext-tools/examples/hello-guile/po/Makefile.am
gettext-tools/examples/hello-java-awt/po/Makefile.am
gettext-tools/examples/hello-java-qtjambi/po/Makefile.am
gettext-tools/examples/hello-java-swing/po/Makefile.am
gettext-tools/examples/hello-java/po/Makefile.am
gettext-tools/examples/hello-librep/po/Makefile.am
gettext-tools/examples/hello-objc-gnustep/po/GNUmakefile
gettext-tools/examples/hello-pascal/po/Makefile.am
gettext-tools/examples/hello-perl/po/Makefile.am
gettext-tools/examples/hello-php/po/Makefile.am
gettext-tools/examples/hello-python/po/Makefile.am
gettext-tools/examples/hello-sh/po/Makefile.am
gettext-tools/examples/hello-smalltalk/po/Makefile.am
gettext-tools/examples/hello-tcl-tk/po/Makefile.am
gettext-tools/examples/hello-tcl/po/Makefile.am
gettext-tools/examples/hello-ycp/po/Makefile.am

index cf0e60dfccb0d67cc8bd9be7fe7a6290603c25bc..5e888de08f1d9c112ccd36601fed5022d35f44d5 100644 (file)
@@ -121,8 +121,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_DEPS) 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 7b7e8435677a0ec9386e9d306763f3c39f0d5730..f38f0fd9d8b5f198b70011fbd3be3d09c916a686 100644 (file)
@@ -128,8 +128,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_DEPS) 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 cf4f69c4c07b0d5b3e8a3fcea4df5014894895c5..018cab0ba8727eacd2271365870b5009b7efe5f8 100644 (file)
@@ -122,8 +122,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_DEPS) 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 56279c59b7f66d7d2e33ce2ef8f5ee6101f5d50b..29356c9612058d4d9774cb68f11b7333e42b878a 100644 (file)
@@ -110,8 +110,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_DEPS) 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 56279c59b7f66d7d2e33ce2ef8f5ee6101f5d50b..29356c9612058d4d9774cb68f11b7333e42b878a 100644 (file)
@@ -110,8 +110,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_DEPS) 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 9616ee86e6fd59da0ff7b7b5cdf818b6d8be1a31..c4afbdcf0b0baaea7e791371e530abe52b553836 100644 (file)
@@ -122,8 +122,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_DEPS) 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 8700f6084e625e4bc957b5f43959983fb5e08272..49632ccbab972c0713603c9fdc780fd1108a815c 100644 (file)
@@ -122,8 +122,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_DEPS) 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 722f6f182e1f02d1a42c71a5d0c5f13ba30a659d..4bd40a3db1fe0b76574a34bcd4fe88800a73fdee 100644 (file)
@@ -108,8 +108,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_DEPS) 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 722f6f182e1f02d1a42c71a5d0c5f13ba30a659d..4bd40a3db1fe0b76574a34bcd4fe88800a73fdee 100644 (file)
@@ -108,8 +108,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_DEPS) 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 722f6f182e1f02d1a42c71a5d0c5f13ba30a659d..4bd40a3db1fe0b76574a34bcd4fe88800a73fdee 100644 (file)
@@ -108,8 +108,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_DEPS) 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 722f6f182e1f02d1a42c71a5d0c5f13ba30a659d..4bd40a3db1fe0b76574a34bcd4fe88800a73fdee 100644 (file)
@@ -108,8 +108,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_DEPS) 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 a20b3c75f4d5f7f27b7a853f367db13c1d867225..2278db0512bb8f49e984a8c49de850d74a33c37c 100644 (file)
@@ -122,8 +122,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_DEPS) 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 eda89818b0dd4e4397607a98dc36a51ec36ab59d..da4be355f81ea7972a8917feb4def6b940e6153a 100644 (file)
@@ -96,8 +96,16 @@ all-local-no:
 
 # 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_DEPS) remove-potcdate.sed
-       if LC_ALL=C grep 'GNU $(PACKAGE_NAME)' ../* 2>/dev/null >/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_NAME)' /dev/null '{}' ';' 2>/dev/null; \
+            else \
+              LC_ALL=C grep 'GNU $(PACKAGE_NAME)' $(top_srcdir)/* 2>/dev/null; \
+            fi; \
+          } | grep -v 'libtool:' >/dev/null; then \
          package_gnu='GNU '; \
        else \
          package_gnu=''; \
index 5e3743f9eecd91d6554f99750674767a9f44de82..e9c64d583977403a20f0ddb128ab5d6df857d8ea 100644 (file)
@@ -122,8 +122,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_DEPS) 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 5e7fe98d8dd2860eaa07d9d4a6dd17b4782d1ed5..20133250e4ec6574c6797498e74b821b015550ee 100644 (file)
@@ -132,8 +132,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_DEPS) 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 b098d14a1e6901610a7962c4924422c0fd6ee7d7..1c9ebf9245964bc478ee836609a8f83fd318f569 100644 (file)
@@ -122,8 +122,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_DEPS) 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 584f078d41154a06373ca4e3f9078bb8df0f90ad..27c50aea5cbce6a9f17dcf6dd5bea841245b8bea 100644 (file)
@@ -122,8 +122,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_DEPS) 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 606bc716e8d47fe49482cbf2a6046de5d3047a2a..18cfda6787b7cdfb6c6acaaa4724f4a560316a2a 100644 (file)
@@ -122,8 +122,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_DEPS) 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 45a20a81ff95417dbd3894b5468fcf7d1e2d743d..3a6a8916b20704ea2f220be2058dea040932b9a0 100644 (file)
@@ -122,8 +122,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_DEPS) 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 fd4543295b50a3ac1c314b2a94af99f19517147a..d882e8c414ed6efa63486deeece55f6a20afe117 100644 (file)
@@ -108,8 +108,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_DEPS) 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 fd4543295b50a3ac1c314b2a94af99f19517147a..d882e8c414ed6efa63486deeece55f6a20afe117 100644 (file)
@@ -108,8 +108,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_DEPS) 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 4d6286ad923e5ed2a57aabd72fca5b1b9eb01075..222d0e352aa03b3362525d995cfa610a6b78c770 100644 (file)
@@ -122,8 +122,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_DEPS) 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=''; \