Avoid test failure in non-srcdir build vs. the git tree.
authorJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 06:47:21 +0000 (07:47 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 06:47:21 +0000 (07:47 +0100)
* tests/check.mk (vc_exe_in_TESTS): Run this test only in a
srcdir build directory.  Reported by Andreas Schwab.

ChangeLog
tests/check.mk

index b091bb4..fe4bfab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-10-29  Jim Meyering  <meyering@redhat.com>
+
+       Avoid test failure in non-srcdir build vs. the git tree.
+       * tests/check.mk (vc_exe_in_TESTS): Run this test only in a
+       srcdir build directory.  Reported by Andreas Schwab.
+
 2007-10-28  Jim Meyering  <meyering@redhat.com>
 
        Define ENOTSUP, not ENOSYS.  Needed on OpenBSD 3.9.
index 39b094d..4c299e6 100644 (file)
@@ -19,7 +19,7 @@
 # one that does not end in '\'.
 _v = TESTS
 vc_exe_in_TESTS: Makefile
-       @if test -d $(top_srcdir)/.git; then                            \
+       @if test -d $(top_srcdir)/.git && test $(srcdir) = .; then      \
          sed -n '/^$(_v) = \\$$/,/[^\]$$/p' $(srcdir)/Makefile.am      \
            | sed 's/^  *//;/^\$$.*/d;/^$(_v) =/d'                      \
            | tr -s '\012\\' '  ' | fmt -1 | sort -u > t1 &&            \