summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-06-04 10:17:12 +0200
committerJim Meyering <meyering@redhat.com>2012-06-05 10:45:26 +0200
commit1e65a88a9ebbb4db7cd17fea8382e22c136e2688 (patch)
treeab5e0271ece0c5710a74a579cc75dee856805823 /bootstrap.conf
parent10646e6a936233daa1c77abb8902ba9bf3007ba0 (diff)
downloadgrep-1e65a88a9ebbb4db7cd17fea8382e22c136e2688.tar.gz
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.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf11
1 files changed, 11 insertions, 0 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 57749b42..2b3563ca 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -129,4 +129,15 @@ tar -
bootstrap_epilogue()
{
perl -pi -e "s/\@PACKAGE\@/$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
}