bug-grep
[Top][All Lists]
Advanced

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

[PATCH] build: fix a subtly twisted "make distcheck" failure


From: Jim Meyering
Subject: [PATCH] build: fix a subtly twisted "make distcheck" failure
Date: Mon, 04 Jun 2012 11:23:05 +0200

FYI,

>From 48119b04f7ace2f6174796a59690460a17750631 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 4 Jun 2012 10:17:12 +0200
Subject: [PATCH] build: fix a subtly twisted "make distcheck" failure

"make distcheck" would fail when, during a test build,
an attempt to overwrite the deliberately-write-protected
$(srcdir)/grep.pot file would fail.
* bootstrap.conf (bootstrap_epilogue): Don't let the existence of
a large sparse file in the build directory induce "make distcheck"
failure.  The existence of a large sparse test file named 8T-or-so
would make po/Makefile.in.in's use of grep (to search for "GNU grep"
as an indication that this is a GNU package) exit 2 without generating
any output, which made the first xgettext use --package-name=grep,
while that same search for "GNU grep" would succeed when run
from a pristine from-tarball build, thus making the second
xgettext invocation use --package-name='GNU grep'.
That mismatch:
-"Project-Id-Version: grep 2.12.18-1080\n"
+"Project-Id-Version: GNU grep 2.12.18-1080\n"
led to the attempt by Makefile.in.in's grep.pot-update rule to
overwrite ../../grep.pot in the read-only po/ source directory.
---
 bootstrap.conf | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/bootstrap.conf b/bootstrap.conf
index 57749b4..2b3563c 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -129,4 +129,15 @@ tar        -
 bootstrap_epilogue()
 {
   perl -pi -e "s/address@hidden@/$package/g" README-release
+
+  # Since this is a "GNU" package, replace this line
+  #   if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
+  #      | grep -v 'libtool:' >/dev/null; then
+  # with this:
+  #   if true; then
+  # Why?  That pipeline searches all files in $(top_srcdir), and if you
+  # happen to have large files (or apparently large sparse files), the
+  # first grep may well run out of memory.
+  perl -pi -e 's/ LC_ALL=C grep .GNU .PACKAGE.*; then/ true; then/' \
+    po/Makefile.in.in
 }
--
1.7.11.rc0.100.g5498c5f



reply via email to

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