* tests/defs (useless_vpath_rebuild): Fix botched logic that
was causing this function to always diagnose non-GNU make
implementations as being affected by the "useless rebuilds
in VPATH setup" bug (that affects FreeBSD make and causes
automake bug#7884).
---
 tests/defs |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/tests/defs b/tests/defs
index 93c72b7..819a96a 100644
--- a/tests/defs
+++ b/tests/defs
@@ -453,16 +453,11 @@ am__can_chain_suffix_rules="" # Avoid interferences from 
the environment.
 # directory.
 useless_vpath_rebuild ()
 {
-  case $am__useless_vpath_rebuild in
-    yes) return 0;;
-     no) return 1;;
-     "") ;;
-      *) fatal_ "no_useless_builddir_remake: internal error";;
-  esac
-  if using_gmake; then
-    am__useless_vpath_rebuild=no
-    return 1
-  else
+  if test -z "$am__useless_vpath_rebuild"; then
+    if using_gmake; then
+      am__useless_vpath_rebuild=no
+      return 1
+    fi
     mkdir am__vpath.dir$$
     cd am__vpath.dir$$
     touch foo.a foo.b bar baz
@@ -484,7 +479,14 @@ END
     cd ../..
     rm -rf am__vpath.dir$$
   fi
+  case $am__useless_vpath_rebuild in
+    yes) return 0;;
+     no) return 1;;
+     "") ;;
+      *) fatal_ "no_useless_builddir_remake: internal error";;
+  esac
 }
+am__useless_vpath_rebuild=""
 
 yl_distcheck () { useless_vpath_rebuild || $MAKE distcheck ${1+"$@"}; }
 
-- 
1.7.7.3


Reply via email to