Preparing for a grep release, I hit a "make distcheck"
failure that led me into this gnulib module. There was
a gnulib-tests/.deps/test-verify.Tpo file that was left
behind even after "make clean".

Since the test-verify.sh script invokes the .c.o rule
that creates a .Tpo file, but leaves that file behind
upon failure, I added this little fix-up. I'm sure we
could also fix this by changing automake, but I
don't want to do that just yet.
From cd6a45292cdb7b3c4b628f1cb0f199a02140ea7c Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyer...@fb.com>
Date: Tue, 2 Feb 2016 21:39:44 -0800
Subject: [PATCH] verify-tests: also remove stray test-verify.Tpo

* modules/verify-tests (Makefile.am): Arrange for "make clean"
to remove the test-verify.Tpo file that is left behind by
the automake-generated rule upon compilation failure.
Otherwise, that .Tpo file would cause a failed "make distcheck"
at least for grep.
---
 ChangeLog            | 9 +++++++++
 modules/verify-tests | 5 +++++
 2 files changed, 14 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 77acfcf..d353609 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-02-02  Jim Meyering  <meyer...@fb.com>
+
+	verify-tests: also remove stray test-verify.Tpo
+	* modules/verify-tests (Makefile.am): Arrange for "make clean"
+	to remove the test-verify.Tpo file that is left behind by
+	the automake-generated rule upon compilation failure.
+	Otherwise, that .Tpo file would cause a failed "make distcheck"
+	at least for grep.
+
 2016-02-02  Paul Eggert  <egg...@cs.ucla.edu>

 	std-gnu11: new module
diff --git a/modules/verify-tests b/modules/verify-tests
index 939a1ce..8039030 100644
--- a/modules/verify-tests
+++ b/modules/verify-tests
@@ -11,3 +11,8 @@ Makefile.am:
 TESTS_ENVIRONMENT += MAKE='$(MAKE)'
 TESTS += test-verify test-verify.sh
 check_PROGRAMS += test-verify
+
+# This test expects compilation of test-verify.c to fail, and
+# each time it fails, the makefile rule does not perform the usual
+#  "mv -f $name.Tpo $name.po, so tell make clean to remove that file.
+MOSTLYCLEANFILES += .deps/test-verify.Tpo
-- 
2.5.0

Reply via email to