From: Stefano Lattarini Date: Thu, 16 Feb 2012 14:12:41 +0000 (+0100) Subject: Merge branch 'master' into ng/master X-Git-Tag: ng-0.5a~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=v1.11-1987-gf85330b;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master With lots of edits to solve *spurious* failures. --- f85330b2baa5b56301a4401f36084e8bed3de651 diff --cc lib/am/header-vars.am index 1bfc5aef7,fe389036c..ee4aa46f0 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@@ -31,9 -27,13 +30,11 @@@ am__vpath_rewrite = ## DESTDIR = ## Shell code that determines whether make is running in "dry mode" -## ("make -n") or not. Useful in rules that invoke make recursively, -## and are thus executed also with "make -n" -- either because they -## are declared as dependencies to '.MAKE' (NetBSD make), or because -## their recipes contain the "$(MAKE)" string (GNU and Solari make). - +## ("make -n") or not. Useful in rules that invoke make recursively, and +## are thus executed also with "make -n" -- because, say, their recipes +## contain the "$(MAKE)" string or starts with the '+' modifier. + ## The case statement has [:] in order to not tickle makefile-deps.test + ## which greps for '^ *:'. am__make_dryrun = \ { \ am__dry=no; \ diff --cc lib/am/yacc.am index 1551232be,4d53904b9..e2a5bea8f --- a/lib/am/yacc.am +++ b/lib/am/yacc.am @@@ -41,7 -43,8 +43,8 @@@ endif %?FIRST ?GENERIC?%EXT%%DERIVED-EXT%: ?!GENERIC?%OBJ%: %SOURCE% -?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE% -?!GENERIC? %VERBOSE% \ -?!GENERIC??DIST_SOURCE? $(am__skipyacc) \ -## For non-suffix rules, we must emulate a VPATH search on %SOURCE%. -?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE% +?SUBDIROBJ? %SILENT%test -d $(dir $@) || $(MKDIR_P) $(dir $@) +?GENERIC? %VERBOSE%$(am__skipyacc) \ - ?!GENERIC??DIST_SOURCE? %VERBOSE%$(am__skipyacc) \ - $(SHELL) $(YLWRAP) $< y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE% ++-?!GENERIC??DIST_SOURCE? %VERBOSE%$(am__skipyacc) \ ++ $(SHELL) $(YLWRAP) $< y.tab.c %OBJ% y.tab.h %BASE%.h \ ++ `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE% diff --cc tests/Makefile.am index becef59e1,451a8f912..5f72e254b --- a/tests/Makefile.am +++ b/tests/Makefile.am @@@ -36,9 -34,10 +34,11 @@@ TESTS = ## Will be updated later XFAIL_TESTS = \ all.test \ + yacc-bison-skeleton-cxx.test \ + yacc-bison-skeleton.test \ cond17.test \ gcj6.test \ +interp3.test \ override-conditional-2.test \ java-nobase.test \ objext-pr10128.test \ diff --cc tests/defs index 9b54045c8,7af8f25fb..a45fb2337 --- a/tests/defs +++ b/tests/defs @@@ -378,6 -378,116 +376,52 @@@ grep_configure_help ( $EGREP "$2" am--our-help || Exit 1 } -# using_gmake -# ----------- -# Return success if $MAKE is GNU make, return failure otherwise. -# Caches the result for speed reasons. -using_gmake () -{ - case $am__using_gmake in - yes) - return 0;; - no) - return 1;; - '') - # Use --version AND -v, because SGI Make doesn't fail on --version. - # Also grep for GNU because newer versions of FreeBSD make do - # not complain about `--version' (they seem to silently ignore it). - if $MAKE --version -v | grep GNU; then - am__using_gmake=yes - return 0 - else - am__using_gmake=no - return 1 - fi;; - *) - fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";; - esac -} -am__using_gmake="" # Avoid interferences from the environment. - -# make_can_chain_suffix_rules -# --------------------------- -# Return 0 if $MAKE is a make implementation that can chain suffix rules -# automatically, return 1 otherwise. Caches the result for speed reasons. -make_can_chain_suffix_rules () -{ - if test -z "$am__can_chain_suffix_rules"; then - if using_gmake; then - am__can_chain_suffix_rules=yes - return 0 - else - mkdir am__chain.dir$$ - cd am__chain.dir$$ - unindent > Makefile << 'END' - .SUFFIXES: .u .v .w - .u.v: ; cp $< $@ - .v.w: ; cp $< $@ -END - echo make can chain suffix rules > foo.u - if $MAKE foo.w && diff foo.u foo.w; then - am__can_chain_suffix_rules=yes - else - am__can_chain_suffix_rules=no - fi - cd .. - rm -rf am__chain.dir$$ - fi - fi - case $am__can_chain_suffix_rules in - yes) return 0;; - no) return 1;; - *) fatal_ "make_can_chain_suffix_rules: internal error";; - esac -} -am__can_chain_suffix_rules="" # Avoid interferences from the environment. - + # 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 --cc tests/depcomp-shuffle-sub.test index c04eb122a,f9da113d4..933850843 --- a/tests/depcomp-shuffle-sub.test +++ b/tests/depcomp-shuffle-sub.test @@@ -1,5 -1,5 +1,5 @@@ -#!/bin/sh +#! /bin/sh - # Copyright (C) 2012 Free Software Foundation, Inc. + # Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --cc tests/extra10.test index 302ad770b,3f498b4f6..53a08300e --- a/tests/extra10.test +++ b/tests/extra10.test @@@ -16,7 -16,10 +16,9 @@@ # Check that wildcards in EXTRA_DIST are honoured. # Suggested by observations from Braden McDaniel. + # See also sister test 'extra11.test', that check a similar usage + # with the involvement of the $(wildcard) GNU make builtin. -required=GNUmake . ./defs || Exit 1 echo AC_OUTPUT >> configure.in diff --cc tests/lex5.test index df2eb4e9b,616470b04..99fab8e2e --- a/tests/lex5.test +++ b/tests/lex5.test @@@ -82,10 -84,11 +84,10 @@@ EN $sleep $AUTOMAKE -a --no-force - test -f ./ylwrap cd sub -using_gmake || $MAKE Makefile $MAKE foo/foo2.o + ls -l # For debugging. test -f foo/foo2.c test -f foo/foo2.o diff --cc tests/list-of-tests.mk index 03477099b,119ebcac7..48eaa450a --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@@ -2,8 -2,8 +2,7 @@@ ## testsuite. This fragment is meant to be included by the Makefile.am, ## but also to be executed directly by make when bootstrapping automake. - ## Copyright (C) 2011, 2012 Free Software Foundation, Inc. - ## Copyright (C) 2011, 2012 Free Software Foundation, Inc. + ## Copyright (C) 2011-2012 Free Software Foundation, Inc. -## Copyright (C) 2011, 2012 Free Software Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@@ -907,11 -920,12 +913,10 @@@ silentf77.test silentf90.test \ silent-many-gcc.test \ silent-many-generic.test \ - silent-lex-gcc.test \ - silent-lex-generic.test \ - silent-yacc-gcc.test \ - silent-yacc-generic.test \ -silent-nowarn.test \ silent-configsite.test \ -silent-nested-vars.test \ + silent-lex.test \ + silent-yacc.test \ + silent-yacc-headers.test \ srcsub.test \ srcsub2.test \ space.test \ @@@ -1177,14 -1188,28 +1179,29 @@@ yacc5.test yacc7.test \ yacc8.test \ yaccdry.test \ - yacc-subobj-nodep.test \ - yacc-dist-nobuild.test \ - yacc-nodist.test \ yaccpp.test \ yaccvpath.test \ + yacc-auxdir.test \ + yacc-basic.test \ + yacc-cxx.test \ + yacc-bison-skeleton-cxx.test \ + yacc-bison-skeleton.test \ + yacc-clean.test \ + yacc-clean-cxx.test \ + yacc-d-basic.test \ + yacc-d-cxx.test \ yacc-d-vpath.test \ + yacc-deleted-headers.test \ + yacc-depend.test \ + yacc-depend2.test \ yacc-dist-nobuild-subdir.test \ + yacc-dist-nobuild.test \ + yacc-line.test \ + yacc-mix-c-cxx.test \ + yacc-nodist.test \ + yacc-pr204.test \ ++yacc-subobj-nodep.test \ + yacc-weirdnames.test \ yflags.test \ yflags2.test \ yflags-cmdline-override.test \ diff --cc tests/suffix10.tap index 82229136d,38ce8c68d..2fef1c120 --- a/tests/suffix10.tap +++ b/tests/suffix10.tap @@@ -42,9 -42,10 +42,9 @@@ libfoo_la_SOURCES = foo.x && echo 'void yyerror (char *s) {}' \ && echo '%}' \ && echo '%%' \ - && echo 'WORD: "foo";' \ + && echo 'foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};' \ && echo '%%' \ -## Account for VPATH issues on weaker make implementations. - && cat `test -f '$<' || echo $(srcdir)/`$<; \ + && cat $<; \ } > $@-t mv -f $@-t $@ .PHONY: test