]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
yacc/lex tests: avoid spurious skips with non-GNU make
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Feb 2012 18:33:51 +0000 (19:33 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 13 Feb 2012 18:33:51 +0000 (19:33 +0100)
* 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

index 93c72b76972dada0f8ca7a4d9046e191ced93a4e..819a96a8d1dda9b2b238991fa6f1d75508f73d57 100644 (file)
@@ -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+"$@"}; }