From: Stefano Lattarini Date: Thu, 16 Feb 2012 23:15:17 +0000 (+0100) Subject: [ng] tests: don't work automake bug#7884. X-Git-Tag: ng-0.5a~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec08262650b5266cdb649f364283833192311c17;p=thirdparty%2Fautomake.git [ng] tests: don't work automake bug#7884. 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. --- diff --git a/syntax-checks.mk b/syntax-checks.mk index 113cc8459..8c797ca79 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -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: diff --git a/tests/defs b/tests/defs index a45fb2337..1b2300605 100644 --- a/tests/defs +++ b/tests/defs @@ -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: diff --git a/tests/lex3.test b/tests/lex3.test index b8bb4659d..b8a207b91 100755 --- a/tests/lex3.test +++ b/tests/lex3.test @@ -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. diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test index ff233c03a..99e044430 100755 --- a/tests/yacc-basic.test +++ b/tests/yacc-basic.test @@ -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. diff --git a/tests/yacc-cxx.test b/tests/yacc-cxx.test index 71fb61ccb..adc9558ce 100755 --- a/tests/yacc-cxx.test +++ b/tests/yacc-cxx.test @@ -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. diff --git a/tests/yacc-d-basic.test b/tests/yacc-d-basic.test index 933b2bd09..00287da48 100755 --- a/tests/yacc-d-basic.test +++ b/tests/yacc-d-basic.test @@ -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. diff --git a/tests/yacc-d-cxx.test b/tests/yacc-d-cxx.test index 21d830200..b5ac0c2f5 100755 --- a/tests/yacc-d-cxx.test +++ b/tests/yacc-d-cxx.test @@ -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 diff --git a/tests/yacc-dist-nobuild-subdir.test b/tests/yacc-dist-nobuild-subdir.test index 18d22eda6..fb4f1d7cf 100755 --- a/tests/yacc-dist-nobuild-subdir.test +++ b/tests/yacc-dist-nobuild-subdir.test @@ -21,10 +21,6 @@ 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