* t/yacc5.sh: Renamed ...
* t/yacc-grepping2.sh: ... like this.
* t/yacc7.sh: Renamed ...
* t/yacc-headers-and-pr47.sh: ... like this.
* t/yacc8.sh: Renamed ...
* t/yacc-subdir.sh: ... like this.
* t/subdir10.sh: Rename ...
* t/subdir-env-interference.sh: ... like this.
* t/specflg10.sh: Rename ...
* t/am-default-source-ext.sh: ... like this.
* t/suffix12.sh: Rename ...
* t/suffix-custom-subobj.sh: ... like this.
* t/suffix13.sh: Rename ...
* t/suffix-custom-subobj-and-specflg.sh: ... like this.
* t/check3.sh: Rename ...
* t/built-sources-check.sh: ... like this.
* t/subdirbuiltsources.sh: Rename ...
* t/built-sources-subdir.sh: ... like this.
* t/bsource.sh: Rename ...
* t/no-spurious-install-recursive.sh: ... like this.
* t/list-of-tests.mk: Adjust.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2008-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# AM_DEFAULT_SOURCE_EXT
+
+required='cc c++'
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+mkdir sub sub2
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub sub2
+bin_PROGRAMS = foo
+END
+
+cat > sub/Makefile.am << 'END'
+bin_PROGRAMS = bar baz
+AM_DEFAULT_SOURCE_EXT = .cpp
+END
+
+cat > sub2/Makefile.am << 'END'
+bin_PROGRAMS = bla
+if COND
+AM_DEFAULT_SOURCE_EXT = .foo .quux
+endif
+SUFFIXES = .foo .c
+.foo.c:
+ cat $< >$@
+BUILT_SOURCES = bla.c
+CLEANFILES = bla.c
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cp foo.c sub/bar.cpp
+cp foo.c sub/baz.cpp
+cp foo.c sub2/bla.foo
+
+$ACLOCAL
+$AUTOCONF
+
+# Conditional AM_DEFAULT_SOURCE_EXT does not work yet :-(
+# (this limitation could be lifted).
+AUTOMAKE_fails --add-missing
+grep 'defined conditionally' stderr
+
+sed '/^if/d; /^endif/d' sub2/Makefile.am > t
+mv -f t sub2/Makefile.am
+
+# AM_DEFAULT_SOURCE_EXT can only assume one value
+# (lifting this limitation is not such a good idea).
+AUTOMAKE_fails --add-missing
+grep 'at most one value' stderr
+
+sed 's/ \.quux//' sub2/Makefile.am > t
+mv -f t sub2/Makefile.am
+
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+$MAKE distcheck
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2003-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Regression test for install-recursive appearing in a non recursive Makefile.
-# Report from Bruno Haible.
-
-. ./defs || exit 1
-
-cat > Makefile.am << 'END'
-noinst_SCRIPTS = hostname
-include_HEADERS = gettext-po.h
-BUILT_SOURCES = po-hash-gen.c
-END
-
-$ACLOCAL
-$AUTOMAKE
-grep 'install-recursive' Makefile.in && exit 1
-
-:
--- /dev/null
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure 'check:' and 'install:' honor $(BUILT_SOURCES).
+# PR/359.
+
+# For gen-testsuite-part: ==> try-with-serial-tests <==
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([dir/Makefile])
+AC_OUTPUT
+END
+
+mkdir dir
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = command1.inc
+SUBDIRS = dir
+TESTS = subrun.sh
+subrun.sh:
+ (echo '#! /bin/sh'; cat command1.inc) > $@
+ chmod +x $@
+command1.inc:
+ echo 'dir/echo.sh' > $@
+CLEANFILES = subrun.sh command1.inc
+END
+
+cat > dir/Makefile.am << 'END'
+BUILT_SOURCES = command2.inc
+check_SCRIPTS = echo.sh
+echo.sh:
+## The next line ensures that command1.inc has been built before
+## recurring into the subdir.
+ test -f ../command1.inc
+ (echo '#! /bin/sh'; cat command2.inc) > $@
+ chmod +x $@
+command2.inc:
+ echo 'echo Hello' > $@
+CLEANFILES = echo.sh command2.inc
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure --prefix "$(pwd)/inst"
+
+$MAKE check >stdout || { cat stdout; exit 1; }
+cat stdout
+grep '^PASS: subrun\.sh *$' stdout
+grep 'PASS.*echo\.sh' stdout && exit 1
+
+# check should depend directly on $(BUILT_SOURCES) (similar tests
+# are in check.sh and check2.sh).
+$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' Makefile.in
+$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' dir/Makefile.in
+
+$MAKE clean
+# Sanity checks
+test ! -e command1.inc
+test ! -e dir/command2.inc
+# Now make sure these two files are rebuilt during make install.
+$MAKE install
+test -f command1.inc
+test -f dir/command2.inc
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2001-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure when using SUBDIR that all BUILT_SOURCES are built.
+# A bug occurred where subdirs do not have all-recursive or
+# all-recursive-am which depended on BUILT_SOURCES.
+
+required=cc
+. ./defs || exit 1
+
+mkdir lib
+
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([lib/Makefile])
+AC_PROG_RANLIB
+AC_PROG_CC
+AM_PROG_AR
+AC_OUTPUT
+END
+
+# Files required because we are using '--gnu'.
+: > INSTALL
+: > NEWS
+: > README
+: > COPYING
+: > AUTHORS
+: > ChangeLog
+
+cat > Makefile.am << 'END'
+SUBDIRS = lib
+END
+
+cat > lib/Makefile.am << 'END'
+pkgdata_DATA =
+noinst_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+BUILT_SOURCES=foo.h
+foo.h:
+ echo \#define FOO_DEFINE 1 >$@
+END
+
+cat > lib/foo.c << 'END'
+#include <foo.h>
+int foo () { return !FOO_DEFINE;}
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
+
+./configure
+
+# Remove the comment to get a successful test.
+# $MAKE -C lib foo.h
+$MAKE
+
+:
+++ /dev/null
-#! /bin/sh
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure 'check:' and 'install:' honor $(BUILT_SOURCES).
-# PR/359.
-
-# For gen-testsuite-part: ==> try-with-serial-tests <==
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([dir/Makefile])
-AC_OUTPUT
-END
-
-mkdir dir
-
-cat > Makefile.am << 'END'
-BUILT_SOURCES = command1.inc
-SUBDIRS = dir
-TESTS = subrun.sh
-subrun.sh:
- (echo '#! /bin/sh'; cat command1.inc) > $@
- chmod +x $@
-command1.inc:
- echo 'dir/echo.sh' > $@
-CLEANFILES = subrun.sh command1.inc
-END
-
-cat > dir/Makefile.am << 'END'
-BUILT_SOURCES = command2.inc
-check_SCRIPTS = echo.sh
-echo.sh:
-## The next line ensures that command1.inc has been built before
-## recurring into the subdir.
- test -f ../command1.inc
- (echo '#! /bin/sh'; cat command2.inc) > $@
- chmod +x $@
-command2.inc:
- echo 'echo Hello' > $@
-CLEANFILES = echo.sh command2.inc
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-./configure --prefix "$(pwd)/inst"
-
-$MAKE check >stdout || { cat stdout; exit 1; }
-cat stdout
-grep '^PASS: subrun\.sh *$' stdout
-grep 'PASS.*echo\.sh' stdout && exit 1
-
-# check should depend directly on $(BUILT_SOURCES) (similar tests
-# are in check.sh and check2.sh).
-$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' Makefile.in
-$EGREP '^check:.* \$\(BUILT_SOURCES\)( |$)' dir/Makefile.in
-
-$MAKE clean
-# Sanity checks
-test ! -e command1.inc
-test ! -e dir/command2.inc
-# Now make sure these two files are rebuilt during make install.
-$MAKE install
-test -f command1.inc
-test -f dir/command2.inc
-
-:
t/amopts-location.sh \
t/amopts-variable-expansion.sh \
t/amsubst.sh \
+t/am-default-source-ext.sh \
t/ansi2knr-no-more.sh \
t/ar-lib.sh \
t/ar-lib2.sh \
t/badopt.sh \
t/badprog.sh \
t/block.sh \
-t/bsource.sh \
+t/built-sources-check.sh \
+t/built-sources-subdir.sh \
t/candist.sh \
t/canon.sh \
t/canon2.sh \
t/ccnoco3.sh \
t/check.sh \
t/check2.sh \
-t/check3.sh \
t/check4.sh \
t/check5.sh \
t/check6.sh \
t/multlib.sh \
t/no-extra-makefile-code.sh \
t/no-outdir-option.sh \
+t/no-spurious-install-recursive.sh \
t/nobase.sh \
t/nobase-libtool.sh \
t/nobase-python.sh \
t/specflg7.sh \
t/specflg8.sh \
t/specflg9.sh \
-t/specflg10.sh \
t/specflg-dummy.sh \
t/spell.sh \
t/spell2.sh \
t/subdir-am-cond.sh \
t/subdir-cond-err.sh \
t/subdir-cond-gettext.sh \
+t/subdir-env-interference.sh \
t/subdir-order.sh \
t/subdir-with-slash.sh \
t/subdir-subsub.sh \
-t/subdir10.sh \
t/subdir-distclean.sh \
-t/subdirbuiltsources.sh \
t/subobj.sh \
t/subobj2.sh \
t/subobj4.sh \
t/suffix9.sh \
t/suffix10.tap \
t/suffix11.tap \
-t/suffix12.sh \
-t/suffix13.sh \
t/suffix-chain.tap \
+t/suffix-custom-subobj.sh \
+t/suffix-custom-subobj-and-specflg.sh \
t/symlink.sh \
t/symlink2.sh \
t/syntax.sh \
t/whoami.sh \
t/xsource.sh \
t/yacc4.sh \
-t/yacc5.sh \
-t/yacc7.sh \
-t/yacc8.sh \
t/yaccdry.sh \
t/yaccpp.sh \
t/yaccvpath.sh \
t/yacc-dist-nobuild-subdir.sh \
t/yacc-dist-nobuild.sh \
t/yacc-grepping.sh \
+t/yacc-grepping2.sh \
+t/yacc-headers-and-dist-pr47.sh \
t/yacc-line.sh \
t/yacc-mix-c-cxx.sh \
t/yacc-nodist.sh \
t/yacc-pr204.sh \
+t/yacc-subdir.sh \
t/yacc-weirdnames.sh \
t/yflags.sh \
t/yflags2.sh \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2003-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Regression test for install-recursive appearing in a non recursive Makefile.
+# Report from Bruno Haible.
+
+. ./defs || exit 1
+
+cat > Makefile.am << 'END'
+noinst_SCRIPTS = hostname
+include_HEADERS = gettext-po.h
+BUILT_SOURCES = po-hash-gen.c
+END
+
+$ACLOCAL
+$AUTOMAKE
+grep 'install-recursive' Makefile.in && exit 1
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2008-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# AM_DEFAULT_SOURCE_EXT
-
-required='cc c++'
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_CXX
-AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
-AM_CONDITIONAL([COND], [:])
-AC_OUTPUT
-END
-
-mkdir sub sub2
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub sub2
-bin_PROGRAMS = foo
-END
-
-cat > sub/Makefile.am << 'END'
-bin_PROGRAMS = bar baz
-AM_DEFAULT_SOURCE_EXT = .cpp
-END
-
-cat > sub2/Makefile.am << 'END'
-bin_PROGRAMS = bla
-if COND
-AM_DEFAULT_SOURCE_EXT = .foo .quux
-endif
-SUFFIXES = .foo .c
-.foo.c:
- cat $< >$@
-BUILT_SOURCES = bla.c
-CLEANFILES = bla.c
-END
-
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cp foo.c sub/bar.cpp
-cp foo.c sub/baz.cpp
-cp foo.c sub2/bla.foo
-
-$ACLOCAL
-$AUTOCONF
-
-# Conditional AM_DEFAULT_SOURCE_EXT does not work yet :-(
-# (this limitation could be lifted).
-AUTOMAKE_fails --add-missing
-grep 'defined conditionally' stderr
-
-sed '/^if/d; /^endif/d' sub2/Makefile.am > t
-mv -f t sub2/Makefile.am
-
-# AM_DEFAULT_SOURCE_EXT can only assume one value
-# (lifting this limitation is not such a good idea).
-AUTOMAKE_fails --add-missing
-grep 'at most one value' stderr
-
-sed 's/ \.quux//' sub2/Makefile.am > t
-mv -f t sub2/Makefile.am
-
-$AUTOMAKE --add-missing
-
-./configure
-$MAKE
-$MAKE distcheck
-
-:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2009-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# SUDBIRS with $fail set in the environment.
+
+. ./defs || exit 1
+
+mkdir sub
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+echo SUBDIRS = sub >Makefile.am
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+env fail=1 $MAKE all clean
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2009-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# SUDBIRS with $fail set in the environment.
-
-. ./defs || exit 1
-
-mkdir sub
-
-cat >> configure.ac <<'END'
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-echo SUBDIRS = sub >Makefile.am
-: > sub/Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE
-./configure
-env fail=1 $MAKE all clean
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2001-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure when using SUBDIR that all BUILT_SOURCES are built.
-# A bug occurred where subdirs do not have all-recursive or
-# all-recursive-am which depended on BUILT_SOURCES.
-
-required=cc
-. ./defs || exit 1
-
-mkdir lib
-
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([lib/Makefile])
-AC_PROG_RANLIB
-AC_PROG_CC
-AM_PROG_AR
-AC_OUTPUT
-END
-
-# Files required because we are using '--gnu'.
-: > INSTALL
-: > NEWS
-: > README
-: > COPYING
-: > AUTHORS
-: > ChangeLog
-
-cat > Makefile.am << 'END'
-SUBDIRS = lib
-END
-
-cat > lib/Makefile.am << 'END'
-pkgdata_DATA =
-noinst_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = foo.c
-BUILT_SOURCES=foo.h
-foo.h:
- echo \#define FOO_DEFINE 1 >$@
-END
-
-cat > lib/foo.c << 'END'
-#include <foo.h>
-int foo () { return !FOO_DEFINE;}
-END
-
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
-
-./configure
-
-# Remove the comment to get a successful test.
-# $MAKE -C lib foo.h
-$MAKE
-
-:
--- /dev/null
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tests that Automake understands suffix rules with renamed objects
+# and subdir objects.
+# Reported by Florian Briegel.
+
+required=cc
+. ./defs || exit 1
+
+cat >>configure.ac <<EOF
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+EOF
+
+cat >Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+SUFFIXES = .baz .c
+.baz.c:
+ case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
+## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5).
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
+
+DISTCLEANFILES = sub/bar.c
+
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c sub/bar.baz
+foo_CFLAGS =
+END
+
+mkdir sub
+cat > sub/bar.baz <<'END'
+extern int foo ();
+int main () { return foo (); }
+END
+cat > foo.c <<'END'
+int foo () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE
+
+$MAKE distcheck
+$MAKE distclean
+
+# Should also work without subdir-objects.
+
+sed '/subdir-objects/d' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE
+./configure
+$MAKE
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Tests that Automake understands suffix rules with subdir objects.
+# Reported by John Ratliff.
+
+required=cc
+. ./defs || exit 1
+
+cat >>configure.ac <<EOF
+AC_PROG_CC
+AC_OUTPUT
+EOF
+
+cat >Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+SUFFIXES = .baz .o
+# We fake here:
+.baz.o:
+## Account for VPATH issues on weaker make implementations.
+ cp `test -f '$<' || echo $(srcdir)/`$< $@
+
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c sub/bar.baz
+
+.PHONY: test-fake test-real
+test-fake:
+ echo $(foo_OBJECTS) | grep '^foo\.quux sub/bar\.quux$$'
+test-real:
+ echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT) sub/bar\.$(OBJEXT)$$'
+END
+
+mkdir sub
+: > sub/bar.baz
+: > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+OBJEXT=quux $MAKE -e test-fake
+$MAKE test-real
+
+:
+++ /dev/null
-#! /bin/sh
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Tests that Automake understands suffix rules with subdir objects.
-# Reported by John Ratliff.
-
-required=cc
-. ./defs || exit 1
-
-cat >>configure.ac <<EOF
-AC_PROG_CC
-AC_OUTPUT
-EOF
-
-cat >Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-SUFFIXES = .baz .o
-# We fake here:
-.baz.o:
-## Account for VPATH issues on weaker make implementations.
- cp `test -f '$<' || echo $(srcdir)/`$< $@
-
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c sub/bar.baz
-
-.PHONY: test-fake test-real
-test-fake:
- echo $(foo_OBJECTS) | grep '^foo\.quux sub/bar\.quux$$'
-test-real:
- echo $(foo_OBJECTS) | grep '^foo\.$(OBJEXT) sub/bar\.$(OBJEXT)$$'
-END
-
-mkdir sub
-: > sub/bar.baz
-: > foo.c
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-./configure
-
-OBJEXT=quux $MAKE -e test-fake
-$MAKE test-real
-
-:
+++ /dev/null
-#! /bin/sh
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Tests that Automake understands suffix rules with renamed objects
-# and subdir objects.
-# Reported by Florian Briegel.
-
-required=cc
-. ./defs || exit 1
-
-cat >>configure.ac <<EOF
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-EOF
-
-cat >Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-SUFFIXES = .baz .c
-.baz.c:
- case $@ in sub/*) $(MKDIR_P) sub;; *) :;; esac
-## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5).
- cp `test -f '$<' || echo $(srcdir)/`$< $@
-
-DISTCLEANFILES = sub/bar.c
-
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c sub/bar.baz
-foo_CFLAGS =
-END
-
-mkdir sub
-cat > sub/bar.baz <<'END'
-extern int foo ();
-int main () { return foo (); }
-END
-cat > foo.c <<'END'
-int foo () { return 0; }
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-./configure
-$MAKE
-
-$MAKE distcheck
-$MAKE distclean
-
-# Should also work without subdir-objects.
-
-sed '/subdir-objects/d' < Makefile.am > t
-mv -f t Makefile.am
-$AUTOMAKE
-./configure
-$MAKE
-$MAKE distcheck
-
-:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2001-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test of yacc functionality, derived from GNU binutils
+# by Tim Van Holder.
+
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_YACC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = maude
+maude_SOURCES = sub/maude.y
+END
+
+mkdir sub
+
+: > sub/maude.y
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '^maude\.c:.*maude\.y' Makefile.in
+
+
+## Try again with subdir-objects.
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = maude
+maude_SOURCES = sub/maude.y
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# No rule needed, the default .y.c: inference rule is enough
+# (but there may be an additional dependency on a dirstamp file).
+grep '^sub/maude\.c:.*maude\.y' Makefile.in && exit 1
+
+
+## Try again with per-exe flags.
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = maude
+maude_SOURCES = sub/maude.y
+## A particularly trickey case.
+maude_YFLAGS = -d
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# Rule should use maude_YFLAGS.
+grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
+
+# Silly regression.
+grep 'maudec' Makefile.in && exit 1
+
+# Make sure the .o file is required.
+grep '^am_maude_OBJECTS.*maude' Makefile.in
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2001-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure dependencies are generated correctly for .h files.
+# Report from Richard Boulton.
+#
+# Also check that the sources of the generated parser are distributed.
+# PR/47.
+
+required='cc yacc'
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+AM_YFLAGS = -d
+
+check-dist: distdir
+ test -f $(distdir)/foo.y
+ test -f $(distdir)/foo.c
+ test -f $(distdir)/foo.h
+END
+
+# The %union will cause Bison to output '#line's in y.tab.h too.
+cat > foo.y << 'END'
+%union
+{
+ int i;
+ char c;
+}
+%%
+WORD: "up";
+%%
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+./configure
+
+$MAKE foo.h
+
+test -f foo.h
+
+rm -f foo.h foo.c
+$MAKE check-dist
+
+# We should be able to recover if foo.h is deleted.
+
+rm -f foo.h
+$MAKE foo.h
+test -f foo.h
+
+# Make sure '#line ... y.tab.h' gets replaced.
+$FGREP 'y.tab.h' foo.h && exit 1
+
+# Make distclean must not erase foo.c nor foo.h (by GNU standards) ...
+$MAKE foo.c
+test -f foo.h
+test -f foo.c
+$MAKE distclean
+test -f foo.h
+test -f foo.c
+# ... but maintainer-clean should.
+./configure # Re-create 'Makefile'.
+$MAKE maintainer-clean
+test ! -e foo.h
+test ! -e foo.c
+
+:
--- /dev/null
+#! /bin/sh
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for subdir parsers.
+
+required='cc yacc'
+
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = foo/foo
+foo_foo_SOURCES = foo/parse.y
+AM_YFLAGS = -d
+
+.PHONY: obj
+obj: foo/parse.$(OBJEXT)
+
+.PHONY: test1 test2
+test1: foo/parse.$(OBJEXT)
+ test -f foo/parse.c
+ test -f foo/parse.$(OBJEXT)
+test2: foo/parse2.$(OBJEXT)
+ test -f foo/parse2.c
+ test -f foo/parse2.$(OBJEXT)
+END
+
+mkdir foo
+
+cat > foo/parse.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir sub
+cd sub
+
+../configure
+$MAKE test1
+
+# Aside of the rest of this test, let's see if we can recover from
+# parse.h removal.
+test -f foo/parse.h
+rm -f foo/parse.h
+$MAKE foo/parse.h
+test -f foo/parse.h
+
+# Make sure foo/parse.h is not updated, unless when needed.
+$sleep
+touch ../foo/parse.y
+$MAKE obj
+is_newest ../foo/parse.y foo/parse.h
+$sleep
+sed 's/%%/%token TOKEN\n%%/g' ../foo/parse.y >../foo/parse.yt
+mv -f ../foo/parse.yt ../foo/parse.y
+$MAKE obj
+is_newest foo/parse.h ../foo/parse.y
+
+# Now, adds another parser to test ylwrap.
+
+cd ..
+
+# Sleep some to make sure timestamp of Makefile.am will change.
+$sleep
+
+cp foo/parse.y foo/parse2.y
+cat >> Makefile.am << 'END'
+EXTRA_foo_foo_SOURCES = foo/parse2.y
+END
+
+$AUTOMAKE -a
+test -f ./ylwrap
+
+cd sub
+# Regenerate Makefile (automatic in GNU Make, but not in other Makes).
+./config.status
+$MAKE test2
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2001-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test of yacc functionality, derived from GNU binutils
-# by Tim Van Holder.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_YACC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = maude
-maude_SOURCES = sub/maude.y
-END
-
-mkdir sub
-
-: > sub/maude.y
-
-$ACLOCAL
-$AUTOMAKE -a
-
-grep '^maude\.c:.*maude\.y' Makefile.in
-
-
-## Try again with subdir-objects.
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = maude
-maude_SOURCES = sub/maude.y
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-# No rule needed, the default .y.c: inference rule is enough
-# (but there may be an additional dependency on a dirstamp file).
-grep '^sub/maude\.c:.*maude\.y' Makefile.in && exit 1
-
-
-## Try again with per-exe flags.
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = maude
-maude_SOURCES = sub/maude.y
-## A particularly trickey case.
-maude_YFLAGS = -d
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-# Rule should use maude_YFLAGS.
-grep 'AM_YFLAGS.*maude' Makefile.in && exit 1
-
-# Silly regression.
-grep 'maudec' Makefile.in && exit 1
-
-# Make sure the .o file is required.
-grep '^am_maude_OBJECTS.*maude' Makefile.in
-
-:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2001-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test to make sure dependencies are generated correctly for .h files.
-# Report from Richard Boulton.
-#
-# Also check that the sources of the generated parser are distributed.
-# PR/47.
-
-required='cc yacc'
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.y
-AM_YFLAGS = -d
-
-check-dist: distdir
- test -f $(distdir)/foo.y
- test -f $(distdir)/foo.c
- test -f $(distdir)/foo.h
-END
-
-# The %union will cause Bison to output '#line's in y.tab.h too.
-cat > foo.y << 'END'
-%union
-{
- int i;
- char c;
-}
-%%
-WORD: "up";
-%%
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-$AUTOCONF
-./configure
-
-$MAKE foo.h
-
-test -f foo.h
-
-rm -f foo.h foo.c
-$MAKE check-dist
-
-# We should be able to recover if foo.h is deleted.
-
-rm -f foo.h
-$MAKE foo.h
-test -f foo.h
-
-# Make sure '#line ... y.tab.h' gets replaced.
-$FGREP 'y.tab.h' foo.h && exit 1
-
-# Make distclean must not erase foo.c nor foo.h (by GNU standards) ...
-$MAKE foo.c
-test -f foo.h
-test -f foo.c
-$MAKE distclean
-test -f foo.h
-test -f foo.c
-# ... but maintainer-clean should.
-./configure # Re-create 'Makefile'.
-$MAKE maintainer-clean
-test ! -e foo.h
-test ! -e foo.c
-
-:
+++ /dev/null
-#! /bin/sh
-# 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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Test for subdir parsers.
-
-required='cc yacc'
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_YACC
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = foo/foo
-foo_foo_SOURCES = foo/parse.y
-AM_YFLAGS = -d
-
-.PHONY: obj
-obj: foo/parse.$(OBJEXT)
-
-.PHONY: test1 test2
-test1: foo/parse.$(OBJEXT)
- test -f foo/parse.c
- test -f foo/parse.$(OBJEXT)
-test2: foo/parse2.$(OBJEXT)
- test -f foo/parse2.c
- test -f foo/parse2.$(OBJEXT)
-END
-
-mkdir foo
-
-cat > foo/parse.y << 'END'
-%{
-int yylex () { return 0; }
-void yyerror (char *s) {}
-%}
-%%
-foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-mkdir sub
-cd sub
-
-../configure
-$MAKE test1
-
-# Aside of the rest of this test, let's see if we can recover from
-# parse.h removal.
-test -f foo/parse.h
-rm -f foo/parse.h
-$MAKE foo/parse.h
-test -f foo/parse.h
-
-# Make sure foo/parse.h is not updated, unless when needed.
-$sleep
-touch ../foo/parse.y
-$MAKE obj
-is_newest ../foo/parse.y foo/parse.h
-$sleep
-sed 's/%%/%token TOKEN\n%%/g' ../foo/parse.y >../foo/parse.yt
-mv -f ../foo/parse.yt ../foo/parse.y
-$MAKE obj
-is_newest foo/parse.h ../foo/parse.y
-
-# Now, adds another parser to test ylwrap.
-
-cd ..
-
-# Sleep some to make sure timestamp of Makefile.am will change.
-$sleep
-
-cp foo/parse.y foo/parse2.y
-cat >> Makefile.am << 'END'
-EXTRA_foo_foo_SOURCES = foo/parse2.y
-END
-
-$AUTOMAKE -a
-test -f ./ylwrap
-
-cd sub
-# Regenerate Makefile (automatic in GNU Make, but not in other Makes).
-./config.status
-$MAKE test2
-
-: