Aaron Laws dartme18 at
Thu Aug 7 13:37:58 EDT 2014

I have GREP_OPTIONS="--color=always -n --directories=skip", so when I run
make distcheck, it fails. make-gnucash-potfiles is expecting grep to *not*
put out line numbers nor colors. If the response to this is "don't do
that", then you can stop reading. However, if we're wanting this script to
run reliably in the face of a customized environment, the following patch

>From 0a150b770f895df9420bd5133bc8ba3960580a28 Mon Sep 17 00:00:00 2001
From: lmat <dartme18 at>
Date: Thu, 7 Aug 2014 13:35:17 -0400
Subject: [PATCH] make-gnucash-potfiles is now more reliable

make-gnucash-potfiles relies on certain behaviour from grep. This patch
helps ensure that grep behaves in the way we expect.
--- | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ b/
index 35f4771..4a2e285 100644
--- a/
+++ b/
@@ -185,7 +185,7 @@ pot: Makefile po/

 $(srcdir)/po/ make-gnucash-potfiles .potfiles
-    if test -w $(srcdir)/po/ ; then ./make-gnucash-potfiles >
$(srcdir)/po/ ; fi
+    if test -w $(srcdir)/po/ ; then GREP_OPTIONS="-o
--color=auto" ./make-gnucash-potfiles > $(srcdir)/po/ ; fi

 # Creation rules so that po/gnucash.pot can always be created for
 # make dist.

It's also possible to similarly patch make-gnucash-potfiles itself. If
that's desired, I'll be happy to come up with a patch like that.

In Christ,
Aaron Laws

More information about the gnucash-devel mailing list