]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: don't work automake bug#7884.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Feb 2012 23:15:17 +0000 (00:15 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Feb 2012 23:15:17 +0000 (00:15 +0100)
Automake bug#7884 affects only FreeBSD make, so that we don't
need to work around in any of our tests anymore.

* syntax-checks.mk (sc_tests_make_dont_do_useless_vpath_rebuilds):
New syntax check.
(syntax_check_rules): Add it.
* tests/defs (useless_vpath_rebuild, yl_distcheck): Remove.
* tests/lex3.test: Simplify.
* tests/yacc-basic.test: Likewise.
* tests/yacc-cxx.test: Likewise.
* tests/yacc-d-basic.test: Likewise.
* tests/yacc-d-cxx.test: Likewise.
* tests/yacc-dist-nobuild-subdir.test: Likewise.

syntax-checks.mk
tests/defs
tests/lex3.test
tests/yacc-basic.test
tests/yacc-cxx.test
tests/yacc-d-basic.test
tests/yacc-d-cxx.test
tests/yacc-dist-nobuild-subdir.test

index 113cc84599dad32ae00d2703532e63d3c5fbbee3..8c797ca79a38dfacff0d68c1cac530bfae628e32 100644 (file)
@@ -56,6 +56,7 @@ sc_AMDEP_TRUE_in_automake_in \
 sc_tests_no_gmake_requirement \
 sc_tests_no_gmake_checking \
 sc_tests_make_can_chain_suffix_rules \
+sc_tests_make_dont_do_useless_vpath_rebuilds \
 sc_no_dotmake_target \
 sc_no_am_makeflags \
 sc_tests_no_make_e \
@@ -324,6 +325,16 @@ sc_tests_make_can_chain_suffix_rules:
               'should just assume that without checking.' 1>&2; \
          exit 1; \
        fi
+
+## Automake bug#7884 affects only FreeBSD make, so that we don't
+## need to work around in any of our tests anymore.
+sc_tests_make_dont_do_useless_vpath_rebuilds:
+       @if grep -E 'useless_vpath_rebuild|yl_distcheck' $(xtests); then \
+         echo 'No need to work around automake bug#7884 anymore;' \
+              'it only affects FreeBSD make.' 1>&2; \
+         exit 1; \
+       fi
+
 ## GNU make supports POSIX-style runtime include directives.
 sc_grep_for_bad_make_include = \
   if grep -E 'AM_MAKE_INCLUDE|am__(include|quote)' $$files; then \
@@ -332,7 +343,6 @@ sc_grep_for_bad_make_include = \
          'should be used anymore.' 1>&2; \
     exit 1; \
   fi
-
 sc_tests_make_simple_include: sc_ensure_testsuite_has_run
        @files=tests/*.log; $(sc_grep_for_bad_make_include)
 sc_make_simple_include:
index a45fb2337662333046b7f485f50945b10c566f25..1b2300605141ed92caa0dcbffc214c7f9ea71f83 100644 (file)
@@ -376,52 +376,6 @@ grep_configure_help ()
   $EGREP "$2" am--our-help || Exit 1
 }
 
-# useless_vpath_rebuild
-# ---------------------
-# Tell whether $MAKE suffers of the bug triggering automake bug#7884.
-# For example, this happens with FreeBSD make, since in a VPATH build
-# it tends to rebuilt files for which there is an explicit or even just
-# a suffix rule, even if said files are already available in the VPATH
-# directory.
-useless_vpath_rebuild ()
-{
-  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
-    mkdir build
-    cd build
-    unindent > Makefile << 'END'
-        .SUFFIXES: .a .b
-        VPATH = ..
-        all: foo.b baz
-        .PHONY: all
-        .a.b: ; cp $< $@
-        baz: bar ; cp ../baz bar
-END
-    if $MAKE all && test ! -f foo.b && test ! -f bar; then
-      am__useless_vpath_rebuild=no
-    else
-      am__useless_vpath_rebuild=yes
-    fi
-    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+"$@"}; }
-
 # seq_ - print a sequence of numbers
 # ----------------------------------
 # This function simulates GNU seq(1) portably.  Valid usages:
index b8bb4659d4c695146f70645007f1e7fd3ac54fb4..b8a207b91a2baeb4ff8febe6502a847aa48a9c04 100755 (executable)
@@ -74,7 +74,7 @@ $MAKE distdir
 test -f $distdir/foo.c
 
 # Sanity check on distribution.
-yl_distcheck
+$MAKE distcheck
 
 # While we are at it, make sure that foo.c is erased by
 # maintainer-clean, and not by distclean.
index ff233c03acddbffb97741a329e3b65cdd61e1799..99e044430d4f2eddeb8ad52cd5f0ca2a6f597080 100755 (executable)
@@ -90,7 +90,7 @@ test -f $distdir/bar-parse.c
 # be distributed, or properly cleaned by automake-generated rules.
 # We don't want to set the exact semantics yet, but want to ensure
 # they are are consistent.
-yl_distcheck
+$MAKE distcheck
 
 # Make sure that the Yacc-derived C sources are erased by
 # maintainer-clean, and not by distclean.
index 71fb61ccb60fc68aa276ab8e0b034b54126cd898..adc9558cebd9971421fbbb01efff7c9c11ec1938 100755 (executable)
@@ -114,7 +114,7 @@ test -f $distdir/foo4-parse4.cpp
 # must either not be distributed, or properly cleaned by automake-generated
 # rules.  We don't want to set the exact semantics yet, but want to ensure
 # they are are consistent.
-yl_distcheck
+$MAKE distcheck
 
 # Make sure that the Yacc-derived C++ sources are erased by
 # maintainer-clean, and not by distclean.
index 933b2bd09b691213c04b7619a8f7f87fdcc540bf..00287da484ee29e795b1ec7446b4f20017648ee9 100755 (executable)
@@ -131,7 +131,7 @@ test -f $distdir/baz/zardoz-parse.c
 test -f $distdir/baz/zardoz-parse.h
 
 # Sanity check the distribution.
-yl_distcheck
+$MAKE distcheck
 
 # While we are at it, make sure that `parse.c' and `parse.h' are erased
 # by maintainer-clean, and not by distclean.
index 21d830200df3be1ed35107f317e0f14d6dba0cff..b5ac0c2f50ab5f7a50814a842d284302afde90fe 100755 (executable)
@@ -197,7 +197,7 @@ test -f $distdir/qux/maude-parse.hxx
 # The Yacc-derived C++ sources must be created, and not removed once
 # compiled (i.e., not treated like "intermediate files" in the GNU
 # make sense).
-yl_distcheck
+$MAKE distcheck
 
 # Check that we can recover from deleted headers.
 $MAKE clean
index 18d22eda6256a1c2f4719f2b0faa34c9a8639e8b..fb4f1d7cfcbabf27431562c4a76f6d497ffff031 100755 (executable)
 required=yacc
 . ./defs || Exit 1
 
-# This test is bounded to fail for any implementation that
-# triggers automake bug#7884.
-useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O