automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.3-43-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.3-43-g9a2796a
Date: Sat, 27 Oct 2012 14:28:44 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=9a2796ad854c70c221c9d19956264246d9783430

The branch, maint has been updated
       via  9a2796ad854c70c221c9d19956264246d9783430 (commit)
       via  44d202536a5fd0ac670eef7f43326093c8c9bc5b (commit)
       via  7a3e5c7c58d5f3dab27776b5b07e3d4e1b2e5fdd (commit)
       via  d26ddc825605b6b6098fcc4be5dc33ac2a8a48d1 (commit)
      from  0610fc8ebe02125d556bd81b6a78c3306efd25e2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 t/{specflg10.sh => am-default-source-ext.sh}       |    0
 t/{check3.sh => built-sources-check.sh}            |   16 +---
 t/{ltlibsrc.sh => built-sources-cond.sh}           |   89 ++++++++++-------
 t/built-sources-fork-bomb.sh                       |   70 ++++++++++++++
 t/{check3.sh => built-sources-install.sh}          |   61 +++++-------
 ...bdirbuiltsources.sh => built-sources-subdir.sh} |   21 +---
 t/built-sources.sh                                 |   68 +++++++++++++
 t/cxxcpp.sh                                        |    4 +-
 t/cxxo.sh                                          |   34 -------
 t/{empty.sh => empty-data-primary.sh}              |    0
 t/{empty4.sh => empty-sources-primary.tap}         |   27 ++++--
 t/empty2.sh                                        |   35 -------
 t/empty3.sh                                        |   32 ------
 t/fo.sh                                            |   36 -------
 t/list-of-tests.mk                                 |   40 ++++-----
 t/no-outdir-option.sh                              |   29 ------
 t/{bsource.sh => no-spurious-install-recursive.sh} |    0
 t/per-target-flags.sh                              |  100 ++++++++++++++++++++
 t/specflg.sh                                       |   51 ----------
 t/specflg2.sh                                      |   59 ------------
 t/specflg3.sh                                      |   43 ---------
 t/{subdir10.sh => subdir-env-interference.sh}      |    0
 ...ix13.sh => suffix-custom-subobj-and-specflg.sh} |    0
 t/{suffix12.sh => suffix-custom-subobj.sh}         |    0
 t/{yacc2.sh => yacc-grepping.sh}                   |   16 +++-
 t/{yacc5.sh => yacc-grepping2.sh}                  |    0
 t/{yacc7.sh => yacc-headers-and-dist-pr47.sh}      |    0
 t/{yacc8.sh => yacc-subdir.sh}                     |    0
 t/yacc.sh                                          |   37 -------
 29 files changed, 376 insertions(+), 492 deletions(-)
 rename t/{specflg10.sh => am-default-source-ext.sh} (100%)
 copy t/{check3.sh => built-sources-check.sh} (77%)
 copy t/{ltlibsrc.sh => built-sources-cond.sh} (50%)
 create mode 100755 t/built-sources-fork-bomb.sh
 rename t/{check3.sh => built-sources-install.sh} (52%)
 rename t/{subdirbuiltsources.sh => built-sources-subdir.sh} (76%)
 create mode 100755 t/built-sources.sh
 delete mode 100755 t/cxxo.sh
 rename t/{empty.sh => empty-data-primary.sh} (100%)
 rename t/{empty4.sh => empty-sources-primary.tap} (63%)
 delete mode 100755 t/empty2.sh
 delete mode 100755 t/empty3.sh
 delete mode 100755 t/fo.sh
 delete mode 100755 t/no-outdir-option.sh
 rename t/{bsource.sh => no-spurious-install-recursive.sh} (100%)
 create mode 100755 t/per-target-flags.sh
 delete mode 100755 t/specflg.sh
 delete mode 100755 t/specflg2.sh
 delete mode 100755 t/specflg3.sh
 rename t/{subdir10.sh => subdir-env-interference.sh} (100%)
 rename t/{suffix13.sh => suffix-custom-subobj-and-specflg.sh} (100%)
 rename t/{suffix12.sh => suffix-custom-subobj.sh} (100%)
 rename t/{yacc2.sh => yacc-grepping.sh} (80%)
 rename t/{yacc5.sh => yacc-grepping2.sh} (100%)
 rename t/{yacc7.sh => yacc-headers-and-dist-pr47.sh} (100%)
 rename t/{yacc8.sh => yacc-subdir.sh} (100%)
 delete mode 100755 t/yacc.sh

diff --git a/t/specflg10.sh b/t/am-default-source-ext.sh
similarity index 100%
rename from t/specflg10.sh
rename to t/am-default-source-ext.sh
diff --git a/t/check3.sh b/t/built-sources-check.sh
similarity index 77%
copy from t/check3.sh
copy to t/built-sources-check.sh
index 3e4ce96..d4d3c51 100755
--- a/t/check3.sh
+++ b/t/built-sources-check.sh
@@ -14,7 +14,7 @@
 # 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).
+# Make sure 'check:' honors $(BUILT_SOURCES).
 # PR/359.
 
 # For gen-testsuite-part: ==> try-with-serial-tests <==
@@ -63,18 +63,6 @@ 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
+$MAKE distcheck
 
 :
diff --git a/t/ltlibsrc.sh b/t/built-sources-cond.sh
similarity index 50%
copy from t/ltlibsrc.sh
copy to t/built-sources-cond.sh
index 7c84814..ac78a97 100755
--- a/t/ltlibsrc.sh
+++ b/t/built-sources-cond.sh
@@ -14,61 +14,78 @@
 # 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 a sensible default source for libraries is used.
+# Interaction of BUILT_SOURCES with conditionals.
 
-required='cc libtool'
 . ./defs || exit 1
 
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_LIBTOOL
+cat >> configure.ac <<'END'
+AM_CONDITIONAL([COND1], [test $cond1 = yes])
+AM_CONDITIONAL([COND2], [test $cond2 = yes])
 AC_OUTPUT
 END
 
-mkdir zoo.d
-
 cat > Makefile.am << 'END'
-AM_LDFLAGS = -module
-pkglib_LTLIBRARIES = zoo.d/bar.la old.la
-noinst_LTLIBRARIES = foo.la zoo.d/old2.la
+if COND1
+BUILT_SOURCES = a
+else
+BUILT_SOURCES = b
+endif
+if COND2
+BUILT_SOURCES += c
+endif
 
-$(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
-       cp $(srcdir)/old_la.c $@
+a b c:
+       echo who cares > $@
 END
 
-cat > foo.c << 'END'
-int foo (void)
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+cleanup ()
 {
-  return 0;
+  # Files in $(BUILT_SOURCES) should be automatically removed
+  # upon maintainer-clean.
+  $MAKE maintainer-clean
+  test ! -f a
+  test ! -f b
+  test ! -f c
 }
-END
 
-cp foo.c zoo.d/bar.c
-cp foo.c old_la.c
+./configure cond1=yes cond2=yes
 
-libtoolize
-$ACLOCAL
-$AUTOCONF
-AUTOMAKE_fails -a
-grep '^Makefile\.am:2:.*old_la\.c' stderr
-grep '^Makefile\.am:2:.*old\.c' stderr
-grep '^Makefile\.am:3:.*zoo_d_old2_la\.c' stderr
-grep '^Makefile\.am:3:.*zoo\.d/old2\.c' stderr
+$MAKE
+test -f a
+test ! -f b
+test -f c
 
-$AUTOMAKE -Wno-obsolete
+cleanup
 
-mkdir sub
-cd sub
+./configure cond1=no cond2=yes
 
-../configure
 $MAKE
+test ! -f a
+test -f b
+test -f c
 
-test -f foo.la
-test -f zoo.d/bar.la
-test -f old.la
-test -f zoo.d/old2.la
+cleanup
+
+./configure cond1=yes cond2=no
+
+$MAKE
+test -f a
+test ! -f b
+test ! -f c
+
+cleanup
+
+./configure cond1=no cond2=no
+
+$MAKE
+test ! -f a
+test -f b
+test ! -f c
 
-$MAKE distcheck
+cleanup
 
 :
diff --git a/t/built-sources-fork-bomb.sh b/t/built-sources-fork-bomb.sh
new file mode 100755
index 0000000..fac3750
--- /dev/null
+++ b/t/built-sources-fork-bomb.sh
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 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/>.
+
+# Due to how the handling of $(BUILT_SOURCES) is implemented in Automake-NG,
+# a recursive make call in the recipe of any $(BUILT_SOURCES) (or of any of
+# its prerequisites) might cause an infinite recursion (complete with fork
+# bomb, yuck) if not handled correctly.  Verify that this doesn't happen.
+# For more background, see:
+# <http://lists.gnu.org/archive/html/help-smalltalk/2012-08/msg00027.html>
+# <http://lists.gnu.org/archive/html/automake-patches/2012-08/msg00052.html>
+# Backported to improve coverage of mainline Automake.
+
+required=GNUmake
+. ./defs || exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = foo
+.PHONY: build-foo
+build-foo:
+       echo OK > foo
+foo:
+       $(MAKE) build-foo
+
+# If the bug is still present, we want this test to fail, not to actually
+# go fork bomb and potentially crash the user machine.  Take care of that.
+
+is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
+
+## Extra indentation here required to avoid confusing Automake.
+ ifeq ($(is_too_deep),no)
+   # All is ok.
+ else
+   $(error ::OOPS:: Recursion too deep, $(MAKELEVEL) levels)
+ endif
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-portability
+$AUTOCONF
+
+./configure
+
+$MAKE -n foo >output 2>&1 || { cat output; exit 1; }
+cat output
+test ! -f foo
+# Guard against possible infinite recursion.
+$FGREP '::OOPS::' output && exit 1
+
+$MAKE foo >output 2>&1 || { cat output; exit 1; }
+cat output
+$MAKE foo
+# Guard against possible infinite recursion.
+$FGREP '::OOPS::' output && exit 1
+
+:
diff --git a/t/check3.sh b/t/built-sources-install.sh
similarity index 52%
rename from t/check3.sh
rename to t/built-sources-install.sh
index 3e4ce96..2f53bb5 100755
--- a/t/check3.sh
+++ b/t/built-sources-install.sh
@@ -14,10 +14,9 @@
 # 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).
+# Make sure 'install:' honors $(BUILT_SOURCES).
 # PR/359.
 
-# For gen-testsuite-part: ==> try-with-serial-tests <==
 . ./defs || exit 1
 
 cat >> configure.ac << 'END'
@@ -28,53 +27,43 @@ END
 mkdir dir
 
 cat > Makefile.am << 'END'
-BUILT_SOURCES = command1.inc
+BUILT_SOURCES = built1
 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
+built1:
+       echo ok > $@
+CLEANFILES = built1
+install-data-hook:
+       $(MKDIR_P) $(DESTDIR)$(prefix)/dir2
+       cp built1 $(DESTDIR)$(prefix)/built1
+       cp dir/built2 $(DESTDIR)$(prefix)/dir2/built3
+uninstall-hook:
+       rm -f $(DESTDIR)$(prefix)/built1
+       rm -f $(DESTDIR)$(prefix)/dir2/built3
+       rmdir $(DESTDIR)$(prefix)/dir2
+installcheck-local:
+       test -f $(prefix)/built1
+       test -f $(prefix)/dir2/built3
 END
 
 cat > dir/Makefile.am << 'END'
-BUILT_SOURCES = command2.inc
-check_SCRIPTS = echo.sh
-echo.sh:
+BUILT_SOURCES = built2
+built2:
 ## 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
+       cp ../built1 $@
+CLEANFILES = built2
 END
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE
 ./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
+test -f built1
+test -f dir/built2
+$MAKE installcheck
+$MAKE distcheck
 
 :
diff --git a/t/subdirbuiltsources.sh b/t/built-sources-subdir.sh
similarity index 76%
rename from t/subdirbuiltsources.sh
rename to t/built-sources-subdir.sh
index 84f65a6..cc162bb 100755
--- a/t/subdirbuiltsources.sh
+++ b/t/built-sources-subdir.sh
@@ -14,7 +14,7 @@
 # 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.
+# Make sure when using SUBDIRS 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.
 
@@ -31,14 +31,6 @@ 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
@@ -47,25 +39,24 @@ cat > lib/Makefile.am << 'END'
 pkgdata_DATA =
 noinst_LIBRARIES = libfoo.a
 libfoo_a_SOURCES = foo.c
-BUILT_SOURCES=foo.h
+BUILT_SOURCES = foo.h
 foo.h:
        echo \#define FOO_DEFINE 1 >$@
+CLEANFILES = $(BUILT_SOURCES)
 END
 
 cat > lib/foo.c << 'END'
 #include <foo.h>
-int foo () { return !FOO_DEFINE;}
+int foo (void) { return !FOO_DEFINE; }
 END
 
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE --include-deps --copy --force-missing --add-missing --gnu
+$AUTOMAKE --copy --add-missing
 
 ./configure
-
-# Remove the comment to get a successful test.
-# $MAKE -C lib foo.h
 $MAKE
+$MAKE distcheck
 
 :
diff --git a/t/built-sources.sh b/t/built-sources.sh
new file mode 100755
index 0000000..5173136
--- /dev/null
+++ b/t/built-sources.sh
@@ -0,0 +1,68 @@
+#! /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/>.
+
+# Basic test on BUILT_SOURCES.
+
+required=cc
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BUILT_SOURCES = foo.c
+noinst_PROGRAMS = bar baz
+foo.c:
+       rm -f $@ address@hidden
+## Use printf, not echo, to avoid spurious interpretation of
+## the "\n" as a newline (seen on NetBSD 5.1).
+       printf '%s\n' '#include <stdio.h>'               >  address@hidden
+       printf '%s\n' 'int main (void)'                  >> address@hidden
+       printf '%s\n' '{               '                 >> address@hidden
+       printf '%s\n' '  printf ("%s\n", FOOMSG);'       >> address@hidden
+       printf '%s\n' '  return 0;'                      >> address@hidden
+       printf '%s\n' '}'                                >> address@hidden
+       mv -f address@hidden $@
+CLEANFILES = foo.c
+END
+
+cat > bar.c <<'END'
+#define FOOMSG "Howdy, World"
+#include "foo.c"
+END
+
+cat > baz.c <<'END'
+#define FOOMSG "Hello, Earth"
+#include "foo.c"
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE
+if cross_compiling; then :; else
+  ./bar
+  ./bar | grep 'Howdy, World'
+  ./baz
+  ./baz | grep 'Hello, Earth'
+fi
+$MAKE distcheck
+
+:
diff --git a/t/cxxcpp.sh b/t/cxxcpp.sh
index f2bb75a..cd5d392 100755
--- a/t/cxxcpp.sh
+++ b/t/cxxcpp.sh
@@ -27,4 +27,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^CXXCPP' Makefile.in
+grep '^CXXCPP =' Makefile.in
+
+:
diff --git a/t/cxxo.sh b/t/cxxo.sh
deleted file mode 100755
index 4a02131..0000000
--- a/t/cxxo.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 C++ files are rewritten to ".o" and not just "o".
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CXX
-END
-
-cat > Makefile.am << 'END'
-sbin_PROGRAMS = anonymous
-anonymous_SOURCES = doe.C
-END
-
-: > doe.C
-
-$ACLOCAL
-$AUTOMAKE
-
-$FGREP 'doe.$(OBJEXT)' Makefile.in
diff --git a/t/empty.sh b/t/empty-data-primary.sh
similarity index 100%
rename from t/empty.sh
rename to t/empty-data-primary.sh
diff --git a/t/empty4.sh b/t/empty-sources-primary.tap
similarity index 63%
rename from t/empty4.sh
rename to t/empty-sources-primary.tap
index 1233f40..3e5b3f4 100755
--- a/t/empty4.sh
+++ b/t/empty-sources-primary.tap
@@ -14,25 +14,36 @@
 # 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 empty _SOURCES works.
-# From Paul Berrevoets.
+# A test for missing _SOURCES variable.  Also test to make sure empty
+# _SOURCES suppresses assumption about default name.
 
 . ./defs || exit 1
 
+plan_ 5
+
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AC_SUBST(ZOO_OBJ)
+AC_SUBST([zoo_obj])
 END
 
 cat > Makefile.am << 'END'
+sbin_PROGRAMS = pavel
+
+bin_PROGRAMS = pavel2
+pavel2_SOURCES =
+
 noinst_PROGRAMS = zoo
 zoo_SOURCES =
 EXTRA_zoo_SOURCES = bar.c foo.c
-zoo_DEPENDENCIES = $(ZOO_OBJ)
+zoo_DEPENDENCIES = $(zoo_obj)
 zoo_LDADD = $(zoo_DEPENDENCIES)
 END
 
-$ACLOCAL
-$AUTOMAKE
-$FGREP zoo. Makefile.in && exit 1
-exit 0
+command_ok_ "aclocal" $ACLOCAL
+command_ok_ "automake" $AUTOMAKE
+
+command_ok_ "default _SOURCES" $FGREP ' pavel.c' Makefile.in
+command_ok_ "empty _SOURCES (basic)" not $FGREP 'pavel2.' Makefile.in
+command_ok_ "empty _SOURCES (elaborate)" not $FGREP 'zoo.' Makefile.in
+
+:
diff --git a/t/empty2.sh b/t/empty2.sh
deleted file mode 100755
index 47a0792..0000000
--- a/t/empty2.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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 empty _SOURCES suppresses assumption about default
-# name.  Report from Pavel Roskin.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = pavel
-pavel_SOURCES =
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep 'pavel\.[co]' Makefile.in && exit 1
-exit 0
diff --git a/t/empty3.sh b/t/empty3.sh
deleted file mode 100755
index f77f439..0000000
--- a/t/empty3.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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/>.
-
-# A test for missing _SOURCES variable.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = pavel
-END
-
-$ACLOCAL
-$AUTOMAKE
-
-grep 'pavel\.[co]' Makefile.in
diff --git a/t/fo.sh b/t/fo.sh
deleted file mode 100755
index 4ca1a05..0000000
--- a/t/fo.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1998-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 Fortran 77 files are rewritten to ".o" and not just "o".
-# Matthew D. Langston <address@hidden>
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_F77
-END
-
-cat > Makefile.am << 'END'
-sbin_PROGRAMS = anonymous
-anonymous_SOURCES = doe.f
-END
-
-: > doe.f
-
-$ACLOCAL
-$AUTOMAKE
-
-$FGREP 'doe.$(OBJEXT)' Makefile.in
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 4994338..e38e7ff 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -127,6 +127,7 @@ t/amopt.sh \
 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 \
@@ -184,7 +185,12 @@ t/badline.sh \
 t/badopt.sh \
 t/badprog.sh \
 t/block.sh \
-t/bsource.sh \
+t/built-sources-check.sh \
+t/built-sources-cond.sh \
+t/built-sources-fork-bomb.sh \
+t/built-sources-install.sh \
+t/built-sources-subdir.sh \
+t/built-sources.sh \
 t/candist.sh \
 t/canon.sh \
 t/canon2.sh \
@@ -200,7 +206,6 @@ t/ccnoco2.sh \
 t/ccnoco3.sh \
 t/check.sh \
 t/check2.sh \
-t/check3.sh \
 t/check4.sh \
 t/check5.sh \
 t/check6.sh \
@@ -336,7 +341,6 @@ t/cxx-lt-demo.sh \
 t/cxxlibobj.sh \
 t/cxxlink.sh \
 t/cxxnoc.sh \
-t/cxxo.sh \
 t/cygnus-deprecation.sh \
 t/cygnus-check-without-all.sh \
 t/cygnus-dependency-tracking.sh \
@@ -423,10 +427,8 @@ t/dollarvar2.sh \
 t/double.sh \
 t/dup2.sh \
 t/else.sh \
-t/empty.sh \
-t/empty2.sh \
-t/empty3.sh \
-t/empty4.sh \
+t/empty-data-primary.sh \
+t/empty-sources-primary.tap \
 t/exdir.sh \
 t/exdir2.sh \
 t/exdir3.sh \
@@ -462,7 +464,6 @@ t/flibs.sh \
 t/fn99.sh \
 t/fn99subdir.sh \
 t/fnoc.sh \
-t/fo.sh \
 t/forcemiss.sh \
 t/forcemiss2.sh \
 t/fort1.sh \
@@ -696,7 +697,7 @@ t/mmode.sh \
 t/mmodely.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 \
@@ -826,6 +827,7 @@ t/test-extensions-cond.sh \
 t/parse.sh \
 t/percent.sh \
 t/percent2.sh \
+t/per-target-flags.sh \
 t/phony.sh \
 t/pluseq.sh \
 t/pluseq2.sh \
@@ -985,14 +987,10 @@ t/silent-yacc-headers.sh \
 t/src-acsubst.sh \
 t/sourcefile-in-subdir.sh \
 t/space.sh \
-t/specflg.sh \
-t/specflg2.sh \
-t/specflg3.sh \
 t/specflg6.sh \
 t/specflg7.sh \
 t/specflg8.sh \
 t/specflg9.sh \
-t/specflg10.sh \
 t/specflg-dummy.sh \
 t/spell.sh \
 t/spell2.sh \
@@ -1016,12 +1014,11 @@ t/subdir-add2-pr46.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 \
@@ -1063,9 +1060,9 @@ t/suffix8.tap \
 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 \
@@ -1246,12 +1243,7 @@ t/werror3.sh \
 t/werror4.sh \
 t/whoami.sh \
 t/xsource.sh \
-t/yacc.sh \
-t/yacc2.sh \
 t/yacc4.sh \
-t/yacc5.sh \
-t/yacc7.sh \
-t/yacc8.sh \
 t/yaccdry.sh \
 t/yaccpp.sh \
 t/yaccvpath.sh \
@@ -1270,10 +1262,14 @@ t/yacc-depend.sh \
 t/yacc-depend2.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 \
diff --git a/t/no-outdir-option.sh b/t/no-outdir-option.sh
deleted file mode 100755
index 59987b5..0000000
--- a/t/no-outdir-option.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2010-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/>.
-
-# Check that the '-o' aka '--output-dir' option is not recognized anymore.
-
-. ./defs || exit 1
-
-: > Makefile.am
-
-AUTOMAKE_fails -Wno-error --output-dir=foo
-grep 'unrecognized option.*--output-dir' stderr
-
-AUTOMAKE_fails -Wno-error -o foo
-grep 'unrecognized option.*-o' stderr
-
-:
diff --git a/t/bsource.sh b/t/no-spurious-install-recursive.sh
similarity index 100%
rename from t/bsource.sh
rename to t/no-spurious-install-recursive.sh
diff --git a/t/per-target-flags.sh b/t/per-target-flags.sh
new file mode 100755
index 0000000..e5278fb
--- /dev/null
+++ b/t/per-target-flags.sh
@@ -0,0 +1,100 @@
+#! /bin/sh
+# Copyright (C) 1999-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 executable-specific and library-specific flags, both with
+# and without dependency tracking.
+
+. ./defs || Exit 1
+
+makefiles='Makefile libMakefile Makefile2 libMakefile2'
+
+cat > configure.ac << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([-Wno-extra-portability])
+AC_CONFIG_FILES([$makefiles])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+$ACLOCAL
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c
+foo_CFLAGS = -DBAR
+END
+
+cat > libMakefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c bar.cc
+libfoo_a_CFLAGS = -DBAR
+libfoo_a_CXXFLAGS = -DZOT
+END
+
+cat - Makefile.am > Makefile2.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
+END
+
+cat - libMakefile.am > libMakefile2.am << 'END'
+AUTOMAKE_OPTIONS = no-dependencies
+END
+
+# Make sure 'compile' is required.
+for m in $makefiles; do
+  AUTOMAKE_fails $m
+  $EGREP " required file.* '(compile|\./compile)'" stderr
+done
+
+makefiles=$(for mkf in $makefiles; do echo $mkf.in; done)
+
+: > compile
+$AUTOMAKE
+
+# Sanity check.
+for mkf in $makefiles; do test -f $mkf || exit 99; done
+
+# Regression test for missing space.
+$FGREP ')-c' $makefiles && exit 1
+
+# Regression test for botchedly transformed object names.
+$FGREP '.o.o' $makefiles && exit 1
+$FGREP '.obj.obj' $makefiles && exit 1
+$FGREP '.$(OBJEXT).$(OBJEXT)' $makefiles && exit 1
+
+# Watch against non-transformed "foo.$(OBJEXT)", "foo.o" and "foo.obj"
+# (and similarly for bar).
+$EGREP '[^-](foo|bar)\.[o$]' $makefiles && exit 1
+
+# All our programs and libraries have per-target flags, so all
+# the compilers invocations must use an explicit '-c' option.
+grep '\$.COMPILE' $makefiles | grep -v ' -c' && exit 1
+
+$FGREP 'foo-foo.$(OBJEXT)' Makefile.in
+$FGREP 'foo-foo.$(OBJEXT)' Makefile2.in
+$FGREP 'libfoo_a-foo.$(OBJEXT)' libMakefile.in
+$FGREP 'libfoo_a-foo.$(OBJEXT)' libMakefile2.in
+$FGREP 'libfoo_a-bar.$(OBJEXT)' libMakefile.in
+$FGREP 'libfoo_a-bar.$(OBJEXT)' libMakefile2.in
+
+$FGREP '$(foo_CFLAGS)' Makefile.in
+$FGREP '$(foo_CFLAGS)' Makefile2.in
+$FGREP '$(libfoo_a_CFLAGS)' libMakefile.in
+$FGREP '$(libfoo_a_CFLAGS)' libMakefile2.in
+
+:
diff --git a/t/specflg.sh b/t/specflg.sh
deleted file mode 100755
index c56c6aa..0000000
--- a/t/specflg.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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 flags specific to executable.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-foo_CFLAGS = -DBAR
-END
-
-# Make sure 'compile' is required.
-$ACLOCAL
-AUTOMAKE_fails
-grep 'required.*compile' stderr
-
-: > compile
-
-$AUTOMAKE
-
-# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && exit 1
-
-# Look for foo-foo.o.
-grep '[^-]foo\.o' Makefile.in && exit 1
-
-# Regression test for missing space.
-$FGREP ')-c' Makefile.in && exit 1
-
-exit 0
diff --git a/t/specflg2.sh b/t/specflg2.sh
deleted file mode 100755
index 4560715..0000000
--- a/t/specflg2.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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 library-specific flags.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_CXX
-AM_PROG_AR
-AC_PROG_RANLIB
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = no-dependencies
-lib_LIBRARIES = libfoo.a
-libfoo_a_SOURCES = foo.c bar.cc
-libfoo_a_CFLAGS = -DBAR
-libfoo_a_CXXFLAGS = -DZOT
-END
-
-: > ar-lib
-
-# Make sure 'compile' is required.
-$ACLOCAL
-AUTOMAKE_fails
-grep 'required.*compile' stderr
-
-: > compile
-
-$AUTOMAKE
-
-# Look for $(COMPILE) -c in .c.o rule.
-grep 'COMPILE. [^-]' Makefile.in && exit 1
-
-# Look for libfoo_a-foo.o.
-grep foo Makefile.in
-grep '[^-]foo\.o' Makefile.in && exit 1
-
-# Look for libfoo_a-bar.o.
-grep bar Makefile.in
-grep '[^-]bar\.o' Makefile.in && exit 1
-
-exit 0
diff --git a/t/specflg3.sh b/t/specflg3.sh
deleted file mode 100755
index 9c56aca..0000000
--- a/t/specflg3.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999-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 exe-specific flags with dependency tracking.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-foo_CFLAGS = -DFOO
-END
-
-: > compile
-
-$ACLOCAL
-$AUTOMAKE
-
-$FGREP ' -o foo-foo' Makefile.in
-$FGREP 'foo.o.o' Makefile.in && exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && exit 1
-$FGREP '$(foo_CFLAGS)' Makefile.in
-
-:
diff --git a/t/subdir10.sh b/t/subdir-env-interference.sh
similarity index 100%
rename from t/subdir10.sh
rename to t/subdir-env-interference.sh
diff --git a/t/suffix13.sh b/t/suffix-custom-subobj-and-specflg.sh
similarity index 100%
rename from t/suffix13.sh
rename to t/suffix-custom-subobj-and-specflg.sh
diff --git a/t/suffix12.sh b/t/suffix-custom-subobj.sh
similarity index 100%
rename from t/suffix12.sh
rename to t/suffix-custom-subobj.sh
diff --git a/t/yacc2.sh b/t/yacc-grepping.sh
similarity index 80%
rename from t/yacc2.sh
rename to t/yacc-grepping.sh
index 64e5421..19036c4 100755
--- a/t/yacc2.sh
+++ b/t/yacc-grepping.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-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
@@ -14,9 +14,14 @@
 # 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 intermediate .h file is not generated nor removed
-# if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
-# See also the related semantic test 'yacc-d-basic.sh'.
+# Some grep-based checks on yacc support:
+#
+#  - Make sure intermediate .c file is built from yacc source.
+#    Report from Thomas Morgan.
+#
+#  - Make sure intermediate .h file is not generated nor removed
+#    if (AM_)?YFLAGS do not contain '-d'.
+#    Requested by Jim Meyering.
 
 . ./defs || exit 1
 
@@ -38,18 +43,21 @@ END
 cp Makefile.am Makefile.src
 
 $AUTOMAKE -a
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in && exit 1
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = -d' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h is NOT mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in
 
 cp Makefile.src Makefile.am
 echo 'AM_YFLAGS = ' >> Makefile.am
 $AUTOMAKE
+$FGREP 'zardoz.c' Makefile.in
 # If zardoz.h IS mentioned, fail.
 $FGREP 'zardoz.h' Makefile.in && exit 1
 
diff --git a/t/yacc5.sh b/t/yacc-grepping2.sh
similarity index 100%
rename from t/yacc5.sh
rename to t/yacc-grepping2.sh
diff --git a/t/yacc7.sh b/t/yacc-headers-and-dist-pr47.sh
similarity index 100%
rename from t/yacc7.sh
rename to t/yacc-headers-and-dist-pr47.sh
diff --git a/t/yacc8.sh b/t/yacc-subdir.sh
similarity index 100%
rename from t/yacc8.sh
rename to t/yacc-subdir.sh
diff --git a/t/yacc.sh b/t/yacc.sh
deleted file mode 100755
index 0a838a9..0000000
--- a/t/yacc.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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 intermediate .c file is built from yacc source.
-# Bug from Thomas Morgan.
-
-. ./defs || exit 1
-
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-END
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-$FGREP 'zardoz.c' Makefile.in
-
-:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]