From 1e65a88a9ebbb4db7cd17fea8382e22c136e2688 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 4 Jun 2012 10:17:12 +0200 Subject: 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(+) (limited to 'bootstrap.conf') 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 } -- cgit v1.2.1