With lots of edits to solve *spurious* failures.
## 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; \
?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%
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 \
$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:
-#!/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
# 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
$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
## 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
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 \
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 \
&& 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