From a2437fee3612a2186005d361c84d62a9859278d7 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 13 Feb 2012 19:33:51 +0100 Subject: [PATCH] yacc/lex tests: avoid spurious skips with non-GNU make * 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 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/defs b/tests/defs index 93c72b769..819a96a8d 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+"$@"}; } -- 2.47.2