Subject: bug#17480: closed (Re: Unnecessary file lib/colorize.c in grep tarball)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 24 May 2014 20:41:05 +0000

Your bug report

#17480: Unnecessary file lib/colorize.c in grep tarball

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17480: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17480
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: Unnecessary file lib/colorize.c in grep tarball
From: Paul Eggert <[email-masked]>
To: [email-masked]
Date: Sat, 24 May 2014 13:40:14 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

I pushed the attached patch to fix this.
From 4704f4c7c5c14820d46beb7d1a02867523654ee7 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sat, 24 May 2014 13:38:15 -0700
Subject: [PATCH] dist: don't distribute lib/colorize.c

'configure' creates this file, so it shouldn't be distributed; see:
http://bugs.gnu.org/17480
* configure.ac (COLORIZE_SOURCE): New macro.
Don't use AC_CONFIG_LINKS for lib/colorize.c.
* lib/Makefile.am (nodist_libgreputils_a_SOURCES): New macro.
(libgreputils_a_SOURCES): Remove colorize.c.
(CLEANFILES): Add colorize.c
(colorize.c): New rule.
---
 configure.ac    | 3 ++-
 lib/Makefile.am | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index c301ebe..7ac2937 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,7 +190,8 @@ case $host_os in
   mingw*) suffix=w32 ;;
   *) suffix=posix ;;
 esac
-AC_CONFIG_LINKS([lib/colorize.c:lib/colorize-$suffix.c])
+COLORIZE_SOURCE=colorize-$suffix.c
+AC_SUBST([COLORIZE_SOURCE])
 
 AC_CONFIG_FILES([
   Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index dc41fbf..f9e5444 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -29,10 +29,12 @@ include gnulib.mk
 
 AM_CFLAGS += $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)
 
-libgreputils_a_SOURCES += \
-  colorize.c colorize.h
-
+nodist_libgreputils_a_SOURCES = colorize.c
+libgreputils_a_SOURCES += colorize.h
 EXTRA_DIST += colorize-posix.c colorize-w32.c
+CLEANFILES += colorize.c
+colorize.c:
+	$(AM_V_GEN)echo '#include <$(COLORIZE_SOURCE)>' >$@
 
 libgreputils_a_LIBADD += $(LIBOBJS) $(ALLOCA)
 libgreputils_a_DEPENDENCIES += $(LIBOBJS) $(ALLOCA)
-- 
1.9.0

Subject: Unnecessary file lib/colorize.c in grep tarball
From: Paul Eggert <[email-masked]>
To: [email-masked]
Date: Mon, 12 May 2014 13:19:41 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

The latest grep tarball announced in:

http://lists.gnu.org/archive/html/platform-testers/2014-05/msg00000.html

has a file grep-2.18.143-b298/lib/colorize.c that should not be part of 
the tarball, because 'configure' creates this file.

The same problem occurs in the grep 2.18 tarball, so this is not a 
regression.  The presence of the unnecessary file shouldn't break 
anything as far as I can see, so I guess it's not necessary to fix this 
before the next release.