Subject: [PATCH 2/2] cygnus: remove support for Cygnus-style trees

From: Stefano Lattarini <[email-masked]>
Date: Mon, 30 Apr 2012 18:45:43 +0200

Support for "Cygnus-style" tree as enabled by the 'cygnus' option
has been deprecated in the documentation and with runtime warning
since Automake 1.12.1.  It's now time to remove it.

Closes automake bug#11034.

* lib/Automake/Options.pm (_process_option_list): Issue a proper
error when the 'cygnus' option is seen.
* automake.in: Don't handle the 'cygnus' option anymore.
* docs/automake.texi: Remove references to cygnus option and
Cygnus-style trees.
* lib/am/dejagnu.am, lib/am/texinfos.am: Drop special setups for
cygnus mode.
* NEWS: Update.
* t/cygnus-no-more.sh: New test.
* t/flavor.sh: Adjust.
* t/cygnus-deprecation.sh: Remove.
* t/cygnus-check-without-all.sh: Likewise.
* t/cygnus-requires-maintainer-mode.sh: Likewise.
* t/cygnus-dependency-tracking.sh: Likewise.
* t/cygnus-imply-foreign.sh: Likewise.
* t/cygnus-no-installinfo.sh: Likewise.
* t/cygnus-no-dist.sh: Likewise.
* t/clean2.sh: Likewise.
* t/txinfo5.sh: Likewise.
* t/txinfo5b.sh: Likewise.
* t/list-of-tests.mk: Update.

Signed-off-by: Stefano Lattarini <[email-masked]>
---
 NEWS                                           |   10 +++
 automake.in                                    |   62 +++--------------
 doc/automake.texi                              |   79 +---------------------
 lib/Automake/Options.pm                        |    5 +-
 lib/am/dejagnu.am                              |   29 +-------
 lib/am/texinfos.am                             |   21 ------
 t/clean2.sh                                    |   68 -------------------
 t/cygnus-check-without-all.sh                  |   50 --------------
 t/cygnus-dependency-tracking.sh                |   74 --------------------
 t/cygnus-imply-foreign.sh                      |   60 -----------------
 t/cygnus-no-dist.sh                            |   86 ------------------------
 t/cygnus-no-installinfo.sh                     |   55 ---------------
 t/{cygnus-deprecation.sh => cygnus-no-more.sh} |   30 ++-------
 t/cygnus-requires-maintainer-mode.sh           |   53 ---------------
 t/flavor.sh                                    |   17 -----
 t/list-of-tests.mk                             |   11 +--
 t/txinfo5.sh                                   |   38 -----------
 t/txinfo5b.sh                                  |   42 ------------
 18 files changed, 34 insertions(+), 756 deletions(-)
 delete mode 100755 t/clean2.sh
 delete mode 100755 t/cygnus-check-without-all.sh
 delete mode 100755 t/cygnus-dependency-tracking.sh
 delete mode 100755 t/cygnus-imply-foreign.sh
 delete mode 100755 t/cygnus-no-dist.sh
 delete mode 100755 t/cygnus-no-installinfo.sh
 rename t/{cygnus-deprecation.sh => cygnus-no-more.sh} (65%)
 delete mode 100755 t/cygnus-requires-maintainer-mode.sh
 delete mode 100755 t/txinfo5.sh
 delete mode 100755 t/txinfo5b.sh

diff --git a/NEWS b/NEWS
index bc867c4..386754f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+New in 1.13:
+
+* Obsolete features removed:
+
+  - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
+    option) has been removed.  See discussion about automake bug#11034
+    for more background.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 New in 1.12.1:
 
 * Deprecated obsolescent features:
diff --git a/automake.in b/automake.in
index d5b8e43..f2f6c07 100644
--- a/automake.in
+++ b/automake.in
@@ -3364,11 +3364,6 @@ sub handle_texinfo_helper ($)
       $texinfodir = ('$(srcdir)/'
 		     . dirname (variable_value ('TEXINFO_TEX')));
     }
-  elsif (option 'cygnus')
-    {
-      $texinfodir = '$(top_srcdir)/../texinfo';
-      define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
-    }
   elsif ($config_aux_dir_set_in_configure_ac)
     {
       $texinfodir = $am_config_aux_dir;
@@ -4113,8 +4108,8 @@ sub handle_configure ($$$@)
   define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
 			  @configuredeps);
 
-  my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name)
-			 . (global_option 'no-dependencies' ? ' --ignore-deps' : '');
+  my $automake_options = '--' . $strictness_name .
+			 (global_option 'no-dependencies' ? ' --ignore-deps' : '');
 
   $output_rules .= file_contents
     ('configure',
@@ -4587,25 +4582,16 @@ sub do_check_merge_target ()
   push @check_tests, 'check-local'
     if user_phony_rule 'check-local';
 
-  # In --cygnus mode, check doesn't depend on all.
-  if (option 'cygnus')
-    {
-      # Just run the local check rules.
-      pretty_print_rule ('check-am:', "\t\t", @check);
-    }
-  else
+  # The check target must depend on the local equivalent of
+  # 'all', to ensure all the primary targets are built.  Then it
+  # must build the local check rules.
+  $output_rules .= "check-am: all-am\n";
+  if (@check)
     {
-      # The check target must depend on the local equivalent of
-      # 'all', to ensure all the primary targets are built.  Then it
-      # must build the local check rules.
-      $output_rules .= "check-am: all-am\n";
-      if (@check)
-        {
-	  pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-			     @check);
-	  depend ('.MAKE', 'check-am');
-	}
+      pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ", @check);
+      depend ('.MAKE', 'check-am');
     }
+
   if (@check_tests)
     {
       pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
@@ -5564,26 +5550,6 @@ sub scan_autoconf_files ()
 
 ################################################################
 
-# Set up for Cygnus mode.
-sub check_cygnus
-{
-  my $cygnus = option 'cygnus';
-  return unless $cygnus;
-
-  # This feature is deprecated, will be removed in the next
-  # Automake major release.
-  msg 'obsolete', $cygnus->get,
-      "support for Cygnus-style trees is deprecated";
-
-  set_strictness ('foreign');
-  set_option ('no-installinfo', $cygnus);
-  set_option ('no-dependencies', $cygnus);
-  set_option ('no-dist', $cygnus);
-
-  err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
-    if !$seen_maint_mode;
-}
-
 # Do any extra checking for GNU standards.
 sub check_gnu_standards
 {
@@ -6954,8 +6920,7 @@ sub preprocess_file ($%)
 
   # Complete %transform with global options.
   # Note that %transform goes last, so it overrides global options.
-  %transform = ('CYGNUS'      => !! option 'cygnus',
-		 'MAINTAINER-MODE'
+  %transform = ( 'MAINTAINER-MODE'
 		 => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
 
 		 'XZ'          => !! option 'dist-xz',
@@ -8097,7 +8062,6 @@ sub generate_makefile ($$)
     if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
 
   # Check first, because we might modify some state.
-  check_cygnus;
   check_gnu_standards;
   check_gnits_standards;
 
@@ -8279,7 +8243,6 @@ Dependency tracking:
       --include-deps     enable dependency tracking code
 
 Flavors:
-      --cygnus           assume program is part of Cygnus-style tree
       --foreign          set strictness to foreign
       --gnits            set strictness to gnits
       --gnu              set strictness to gnu
@@ -8337,7 +8300,6 @@ EOF
 sub parse_arguments ()
 {
   my $strict = 'gnu';
-  my $cygnus = 0;
   my $ignore_deps = 0;
   my @warnings = ();
 
@@ -8350,7 +8312,6 @@ sub parse_arguments ()
      'gnu'		=> sub { $strict = 'gnu'; },
      'gnits'		=> sub { $strict = 'gnits'; },
      'foreign'		=> sub { $strict = 'foreign'; },
-     'cygnus'		=> \$cygnus,
      'include-deps'	=> sub { $ignore_deps = 0; },
      'i|ignore-deps'	=> sub { $ignore_deps = 1; },
      'no-force'	=> sub { $force_generation = 0; },
@@ -8366,7 +8327,6 @@ sub parse_arguments ()
 
   set_strictness ($strict);
   my $cli_where = new Automake::Location;
-  set_global_option ('cygnus', $cli_where) if $cygnus;
   set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
   for my $warning (@warnings)
     {
diff --git a/doc/automake.texi b/doc/automake.texi
index 045964f..c4591cb 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -115,7 +115,6 @@ section entitled ``GNU Free Documentation License.''
 * Conditionals::                Conditionals
 * Silencing Make::              Obtain less verbose output from @command{make}
 * Gnits::                       The effect of @option{--gnu} and @option{--gnits}
-* Cygnus::                      The effect of @option{--cygnus} (deprecated, soon to be removed)
 * Not Enough::                  When Automake is not Enough
 * Distributing::                Distributing the Makefile.in
 * API Versioning::              About compatibility between Automake versions
@@ -1954,14 +1953,6 @@ standard is actually published (which may never happen).
 @xref{Gnits}, for more information on the precise implications of the
 strictness level.
 
-Automake also has a special (and @emph{today deprecated}) ``cygnus'' mode
-that is similar to strictness but handled differently.  This mode is
-useful for packages that are put into a ``Cygnus'' style tree (e.g., older
-versions of the GCC and gdb trees).  @xref{Cygnus}, for more information
-on this mode.  Please note that this mode @emph{is deprecated and will be
-removed in the next major Automake release (1.13)}; you must avoid its use
-in new packages, and should stop using it in existing packages as well.
-
 
 @node Uniform
 @section The Uniform Naming Scheme
@@ -2599,13 +2590,6 @@ scripts and data files (like e.g., @file{texinfo.texi} and
 When used with @option{--add-missing}, causes installed files to be
 copied.  The default is to make a symbolic link.
 
-@item --cygnus
-@opindex --cygnus
-Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead
-of GNU or Gnits rules.  For more information, see @ref{Cygnus}.
-Note that @emph{this mode of operation is deprecated, and will be removed}
-in the next major Automake release (1.13).
-
 @item -f
 @opindex -f
 @itemx --force-missing
@@ -9999,15 +9983,12 @@ then @samp{portability} warnings will be @emph{disabled} in
 @item @option{gnits}
 @itemx @option{gnu}
 @itemx @option{foreign}
-@itemx @option{cygnus}
 @cindex Option, @option{gnits}
 @cindex Option, @option{gnu}
 @cindex Option, @option{foreign}
-@cindex Option, @option{cygnus}
 @opindex gnits
 @opindex gnu
 @opindex foreign
-@opindex cygnus
 
 Set the strictness as appropriate.  The @option{gnits} option also
 implies options @option{readme-alpha} and @option{check-news}.
@@ -11019,64 +11000,6 @@ The file @file{THANKS} is required.
 @end itemize

-@node Cygnus
-@chapter The effect of @option{--cygnus}
-
-@cindex @option{cygnus} strictness
-
-@emph{The features described in this section are deprecated; you must
-not use any of them in new code, and should remove their use from older
-but still maintained code: they will be withdrawn the next major Automake
-release (1.13).}
-
-Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat).  Packages with
-this ancestry are sometimes referred to as ``Cygnus'' trees.
-
-A Cygnus tree has slightly different rules for how a
-@file{Makefile.in} is to be constructed.  Passing @option{--cygnus} to
-@command{automake} will cause any generated @file{Makefile.in} to
-comply with Cygnus rules.
-
-Here are the precise effects of @option{--cygnus}:
-
-@itemize @bullet
-
-@item
-The @option{foreign} strictness is implied.
-
-@item
-The options @option{no-installinfo}, @option{no-dependencies} and
-@option{no-dist} are implied (@pxref{Options}).
-
-@item
-The macro @code{AM_MAINTAINER_MODE} is required.
-
-@item
-Info files are always created in the build directory, and not in the
-source directory.  Packages that don't use the @option{cygnus} option
-can emulate this effect by using the @option{no-installinfo} option
-and listing the generated info files in the @code{CLEANFILES} variable.
-
-@item
-@file{texinfo.tex} is not required if a Texinfo source file is
-specified.  The assumption is that the file will be supplied, but in a
-place that Automake cannot find -- it is an artifact of how Cygnus
-packages are typically bundled.  This effect can be emulated in
-packages not using the @option{cygnus} option with a proper definition
-of the @code{TEXINFO_TEX} variable (@pxref{Texinfo}).
-
-@item
-Certain tools will be searched for in the build tree as well as in the
-user's @env{PATH}.  These tools are @command{runtest}, @command{expect},
-@command{makeinfo} and @command{texi2dvi}.
-
-@item
-The @code{check} target doesn't depend on @code{all}.
-@end itemize
-
-
 @node Not Enough
 @chapter When Automake Isn't Enough
 
@@ -13098,7 +13021,7 @@ suite failures, please attach the @file{tests/test-suite.log} file.
 @c  LocalWords:  texinfo setfilename settitle setchapternewpage texi direntry
 @c  LocalWords:  dircategory in's aclocal ifinfo titlepage Tromey vskip pt sp
 @c  LocalWords:  filll defcodeindex ov cv op tr syncodeindex fn cp vr ifnottex
-@c  LocalWords:  dir Automake's ac Dist Gnits gnits cygnus dfn Autoconf's pxref
+@c  LocalWords:  dir Automake's ac Dist Gnits gnits dfn Autoconf's pxref
 @c  LocalWords:  cindex Autoconf autoconf perl samp cvs dist trindex SUBST foo
 @c  LocalWords:  xs emph FIXME ref vindex pkglibdir pkgincludedir pkgdatadir mt
 @c  LocalWords:  pkg libdir cpio bindir sbindir rmt pax sbin zar zardir acindex
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 2f977bd..ede9326 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -269,7 +269,6 @@ sub _is_valid_easy_option ($)
   return scalar grep { $opt eq $_ } qw(
     check-news
     color-tests
-    cygnus
     dejagnu
     dist-bzip2
     dist-lzip
@@ -319,6 +318,10 @@ sub _process_option_list (\%@)
           error ($where,
                  "automatic de-ANSI-fication support has been removed");
         }
+      elsif ($_ eq 'cygnus')
+        {
+          error $where, "support for Cygnus-style trees has been removed";
+        }
       elsif ($_ eq 'dist-lzma')
         {
           error ($where, "support for lzma-compressed distribution " .
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index f1ee471..50c1f51 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -20,24 +20,8 @@ DEJATOOL = $(PACKAGE)
 ## Default flags to pass to dejagnu.  The user can override this.
 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
 
-## In Cygnus mode, these are found in the build tree.
-## Otherwise they are looked for in $PATH.
-if %?CYGNUS%
-EXPECT = `if test -f $(top_builddir)/../expect/expect; then \
-	    echo $(top_builddir)/../expect/expect; \
-	  else \
-	    echo expect; \
-	  fi`
-
-RUNTEST = `if test -f $(top_srcdir)/../dejagnu/runtest; then \
-	     echo $(top_srcdir)/../dejagnu/runtest; \
-	   else \
-	     echo runtest; \
-	   fi`
-else ! %?CYGNUS%
 EXPECT = expect
 RUNTEST = runtest
-endif ! %?CYGNUS%

 .PHONY: check-DEJAGNU
@@ -45,21 +29,14 @@ check-DEJAGNU: site.exp
 ## Life is easiest with an absolute srcdir, so do that.
 	srcdir='$(srcdir)'; export srcdir; \
 	EXPECT=$(EXPECT); export EXPECT; \
-## Allow this to work when expect and DejaGnu are in tree.
-## Only required when --cygnus in force.
-?CYGNUS?	if [ -f $(top_builddir)/../expect/expect ]; then \
-?CYGNUS?	  TCL_LIBRARY=`$(am__cd) $(top_srcdir)/../tcl/library && pwd`; \
-?CYGNUS?	  export TCL_LIBRARY; \
-?CYGNUS?	fi; \
-	runtest=$(RUNTEST); \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
-	if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+	if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
 	  exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
-	    if $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+	    if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
 	    then :; else exit_status=1; fi; \
 	  done; \
-	else echo "WARNING: could not find 'runtest'" 1>&2; :;\
+	else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
 	fi; \
 	exit $$exit_status
 
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 42787c7..e78cded 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -20,26 +20,7 @@
 ## ----------- ##
 
 if %?LOCAL-TEXIS%
-if ! %?CYGNUS%
 TEXI2DVI = texi2dvi
-
-else %?CYGNUS%
-
-## Find these programs wherever they may lie.  Yes, this has
-## intimate knowledge of the structure of the texinfo distribution.
-MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
-            echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
-          else \
-            echo makeinfo; \
-          fi`
-
-TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
-             echo $(top_srcdir)/../texinfo/util/texi2dvi; \
-           else \
-             echo texi2dvi; \
-           fi`
-endif %?CYGNUS%
-
 TEXI2PDF = $(TEXI2DVI) --pdf --batch
 MAKEINFOHTML = $(MAKEINFO) --html
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
@@ -428,6 +409,4 @@ maintainer-clean-aminfo:
 ?MAINTCLEAN?	-test -z "%MAINTCLEAN%" \
 ?MAINTCLEAN?	|| rm -rf %MAINTCLEAN%
 
-?CYGNUS?.PHONY: clean-info
-?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo
 endif %?LOCAL-TEXIS%
diff --git a/t/clean2.sh b/t/clean2.sh
deleted file mode 100755
index b5f5df2..0000000
--- a/t/clean2.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2004-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 distclean works in cygnus mode.
-# Report from Daniel Jacobowitz.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-END
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-
-data_DATA = bar
-
-bar:
-	touch $@
-
-DISTCLEANFILES = bar
-END
-
-mkdir sub
-
-cat > sub/Makefile.am << 'END'
-data_DATA = foo
-
-foo:
-	touch $@
-
-CLEANFILES = $(data_DATA)
-END
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
-
-./configure
-$MAKE
-ls -l
-test -f bar
-test -f sub/foo
-$MAKE distclean
-ls -l
-test ! -r bar
-test ! -r sub/foo
-test ! -r Makefile
-test ! -r config.status
-test -f Makefile.in
-test -f configure
-
-:
diff --git a/t/cygnus-check-without-all.sh b/t/cygnus-check-without-all.sh
deleted file mode 100755
index 121c657..0000000
--- a/t/cygnus-check-without-all.sh
+++ /dev/null
@@ -1,50 +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, in cygnus mode, target "check" does not depend target
-# "all".
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-all-local:
-	: > all-target-has-failed
-	exit 1
-check-local:
-	touch check-target-has-run
-END
-
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-$EGREP '(^| )all.*(:|:.* )check' Makefile.in && Exit 1
-
-$AUTOCONF
-./configure
-
-$MAKE check
-test -f check-target-has-run
-test ! -r all-target-has-failed
-# Sanity checks.
-$MAKE && Exit 1
-test -f all-target-has-failed
-
-:
diff --git a/t/cygnus-dependency-tracking.sh b/t/cygnus-dependency-tracking.sh
deleted file mode 100755
index 6c858c1..0000000
--- a/t/cygnus-dependency-tracking.sh
+++ /dev/null
@@ -1,74 +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 cygnus mode disables automatic dependency tracking.
-# And check that this *cannot* be overridden.
-
-required=cc
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_PROG_CC
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c
-.PHONY: test-nodeps
-test-nodeps:
-	test ! -d .deps
-	test ! -d _deps
-	test ! -d '$(DEPDIR)'
-END
-
-cat > foo.c <<'END'
-#include "bar.h"
-int main ()
-{
-  GIVE_BACK 0;
-}
-END
-
-cat > bar.sav <<'END'
-#define GIVE_BACK return
-END
-
-cp bar.sav bar.h
-
-$ACLOCAL
-$AUTOMAKE --include-deps --cygnus --include-deps
-$AUTOCONF
-
-# Unknown options should cause just warnings from configure.
-./configure --enable-dependency-tracking
-$MAKE
-$MAKE test-nodeps
-
-: > bar.h
-$MAKE
-$MAKE test-nodeps
-
-# Sanity check.
-$MAKE clean
-$MAKE >out 2>&1 && { cat out; Exit 1; }
-cat out
-# Not all compilers mention the undefined symbol in the error message.
-grep GIVE_BACK out || grep main out
-
-:
diff --git a/t/cygnus-imply-foreign.sh b/t/cygnus-imply-foreign.sh
deleted file mode 100755
index 3dcf671..0000000
--- a/t/cygnus-imply-foreign.sh
+++ /dev/null
@@ -1,60 +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 'cygnus' mode imply 'foreign' mode.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-# This is *required* in cygnus mode
-AM_MAINTAINER_MODE
-END
-
-$ACLOCAL
-
-: > Makefile.am
-
-# We want complete control automake flags, while honouring the
-# user overrides for $AUTOMAKE.
-AUTOMAKE=$am_original_AUTOMAKE
-
-# Sanity check: gnu mode must complain about missing files and
-# portability problems.
-AUTOMAKE_fails
-grep 'required file.*README' stderr
-
-# But cygnus mode should imply foreign mode, so no complaints.
-# And cygnus mode should by able to override gnu and gnits modes.
-$AUTOMAKE --cygnus -Werror
-$AUTOMAKE --gnu --cygnus -Werror
-$AUTOMAKE --gnits --cygnus -Werror
-
-# Try again, this time enabling cygnus mode from Makefile.am.
-cp Makefile.am Makefile.sav
-echo 'AUTOMAKE_OPTIONS = gnu cygnus' >> Makefile.am
-$AUTOMAKE -Werror
-mv -f Makefile.sav Makefile.am
-
-# Try again, this time enabling cygnus mode from configure.ac.
-cp configure.ac configure.sav
-sed 's/^AM_INIT_AUTOMAKE$/&([gnits cygnus])/' configure.sav >configure.ac
-cmp configure.ac configure.sav && fatal_ 'failed to edit configure.ac'
-
-$ACLOCAL --force
-$AUTOMAKE -Werror
-mv -f configure.sav configure.ac
-
-:
diff --git a/t/cygnus-no-dist.sh b/t/cygnus-no-dist.sh
deleted file mode 100755
index d94a8f5..0000000
--- a/t/cygnus-no-dist.sh
+++ /dev/null
@@ -1,86 +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 cygnus mode forbids creation of distribution tarball.
-
-. ./defs || Exit 1
-
-echo AM_MAINTAINER_MODE >> configure.ac
-mv -f configure.ac configure.stub
-
-cat configure.stub - > configure.ac <<'END'
-AC_OUTPUT
-END
-
-: > Makefile.am
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --cygnus -Wno-obsolete
-
-./configure
-$MAKE
-
-for target in dist distdir distcheck dist-all dist-gzip; do
-  $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
-  cat out
-  grep $target out
-done
-
-# Now check that cygnus mode in a subdirectory disables
-# distribution-building in that subdirectory.
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-END
-
-mkdir sub1 sub2
-: > sub1/Makefile.am
-cat > sub2/Makefile.am <<'END'
-# The '-Wall' after 'cygnus' should ensure no warning gets
-# unintentionally disabled.  We are particularly interested
-# in override warnings, for when (below) we add the 'distdir'
-# target.
-AUTOMAKE_OPTIONS = cygnus -Wall
-# This is required because the 'cygnus' option is now deprecated.
-AUTOMAKE_OPTIONS += -Wno-obsolete
-END
-
-cat configure.stub - > configure.ac <<'END'
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_OUTPUT
-END
-
-$AUTOCONF
-$AUTOMAKE
-
-./configure
-$MAKE
-cd sub2
-$MAKE -n distdir >out 2>&1 && { cat out; Exit 1; }
-grep distdir out
-cd ..
-
-cat >> sub2/Makefile.am <<'END'
-distdir:
-END
-$AUTOMAKE sub2/Makefile
-./config.status sub2/Makefile
-
-$MAKE distdir
-$MAKE dist
-
-:
diff --git a/t/cygnus-no-installinfo.sh b/t/cygnus-no-installinfo.sh
deleted file mode 100755
index d46b6b3..0000000
--- a/t/cygnus-no-installinfo.sh
+++ /dev/null
@@ -1,55 +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 cygnus mode enables the 'no-installinfo' option.
-
-required=makeinfo
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-AC_OUTPUT
-END
-
-cat > Makefile.am <<'END'
-info_TEXINFOS = foo.texi
-END
-
-cat > foo.texi <<'END'
-@setfilename foo.info
-END
-
-$ACLOCAL
-# -Wno-override works around a buglet in definition of $(MAKEINFO)
-# in cygnus mode; see also xfailing test 'txinfo5.test'.
-# -Wno-obsolete accounts for the fact that the cygnus mode is now
-# deprecated.
-$AUTOMAKE --cygnus -Wno-override -Wno-obsolete
-$AUTOCONF
-
-cwd=`pwd` || Exit 1
-./configure --prefix="$cwd"/_inst
-$MAKE
-$MAKE install
-test ! -d _inst
-test ! -r foo.info
-test ! -d _inst/share/info
-$MAKE install-info
-ls -l _inst
-test -f foo.info
-test -f _inst/share/info/foo.info
-
-:
diff --git a/t/cygnus-deprecation.sh b/t/cygnus-no-more.sh
similarity index 65%
rename from t/cygnus-deprecation.sh
rename to t/cygnus-no-more.sh
index 779914b..4be0561 100755
--- a/t/cygnus-deprecation.sh
+++ b/t/cygnus-no-more.sh
@@ -20,37 +20,18 @@
 
 . ./defs || Exit 1
 
-warn_rx='support for Cygnus.*trees.*deprecated'
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AM_MAINTAINER_MODE
-END
+warn_rx='support for Cygnus.*trees.*removed'
 
 $ACLOCAL
-$AUTOCONF
-
-: > Makefile.am
 
-# 'cygnus' option from command line
-$AUTOMAKE --cygnus -Wno-obsolete
-AUTOMAKE_fails --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails --cygnus -Wnone -Wobsolete
-grep "^automake.*: .*$warn_rx" stderr
-
-rm -rf autom4te*.cache
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
 
 # 'cygnus' option in Makefile.am
 echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
-cat Makefile.am # For debugging.
-$AUTOMAKE -Wno-obsolete
 AUTOMAKE_fails
 grep "^Makefile\.am:1:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^Makefile\.am:1:.*$warn_rx" stderr
 
 rm -rf autom4te*.cache
 
@@ -59,10 +40,7 @@ rm -rf autom4te*.cache
 sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
 diff configure.ac t && fatal_ "failed to edit configure.ac"
 mv -f t configure.ac
-$AUTOMAKE -Wno-obsolete
 AUTOMAKE_fails
 grep "^configure\.ac:2:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^configure\.ac:2:.*$warn_rx" stderr
 
 :
diff --git a/t/cygnus-requires-maintainer-mode.sh b/t/cygnus-requires-maintainer-mode.sh
deleted file mode 100755
index 546e898..0000000
--- a/t/cygnus-requires-maintainer-mode.sh
+++ /dev/null
@@ -1,53 +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, in cygnus mode, maintainer mode is required.
-
-. ./defs || Exit 1
-
-: > Makefile.am
-
-$ACLOCAL
-AUTOMAKE_fails -Wno-obsolete --cygnus
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
-cat >> configure.ac <<'END'
-AC_CONFIG_FILES([sub/Makefile])
-END
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub
-END
-
-mkdir sub
-cat > sub/Makefile.am <<'END'
-AUTOMAKE_OPTIONS = -Wno-obsolete cygnus
-END
-
-rm -rf autom4te.cache
-$ACLOCAL
-AUTOMAKE_fails
-grep '^configure\.ac:.*AM_MAINTAINER_MODE.*required.*cygnus' stderr
-
-cat >> configure.ac <<'END'
-AM_MAINTAINER_MODE
-END
-
-rm -rf autom4te.cache
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-:
diff --git a/t/flavor.sh b/t/flavor.sh
index 6a1fddb..8b999cc 100755
--- a/t/flavor.sh
+++ b/t/flavor.sh
@@ -57,21 +57,4 @@ for flavor in --gnits --gnu --foreign --ignore-deps; do
 
 done
 
-# Cygnus mode is deprecated now, and must be handled separately.
-$AUTOMAKE --cygnus -Wno-obsolete
-./configure --enable-maintainer-mode
-grep " --cygnus" Makefile
-$MAKE
-# Two code paths in configure.am:
-# - either a file in $(am__configure_deps) has been updated ...
-$sleep
-touch aclocal.m4
-$MAKE
-grep " --cygnus" Makefile
-# - ... or not; i.e., Makefile.am or an included file has.
-$sleep
-touch Makefile.am
-$MAKE
-grep " --cygnus" Makefile
-
 :
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 5b6f746..43d7538 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -213,7 +213,6 @@ t/check-no-test-driver.sh \
 t/check-concurrency-bug9245.sh \
 t/checkall.sh \
 t/clean.sh \
-t/clean2.sh \
 t/colneq.sh \
 t/colneq2.sh \
 t/colneq3.sh \
@@ -330,13 +329,7 @@ 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 \
-t/cygnus-imply-foreign.sh \
-t/cygnus-no-dist.sh \
-t/cygnus-no-installinfo.sh \
-t/cygnus-requires-maintainer-mode.sh \
+t/cygnus-no-more.sh \
 t/cygwin32.sh \
 t/dash.sh \
 t/defun.sh \
@@ -1157,8 +1150,6 @@ t/txinfo.sh \
 t/txinfo2.sh \
 t/txinfo3.sh \
 t/txinfo4.sh \
-t/txinfo5.sh \
-t/txinfo5b.sh \
 t/txinfo6.sh \
 t/txinfo7.sh \
 t/txinfo8.sh \
diff --git a/t/txinfo5.sh b/t/txinfo5.sh
deleted file mode 100755
index d515617..0000000
--- a/t/txinfo5.sh
+++ /dev/null
@@ -1,38 +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/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# Also check that TEXINFOS + cygnus work without requiring the
-# '-Wno-override' option.
-# See also sister test txinfo5b.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus -Wno-obsolete
-
-:
diff --git a/t/txinfo5b.sh b/t/txinfo5b.sh
deleted file mode 100755
index a99f607..0000000
--- a/t/txinfo5b.sh
+++ /dev/null
@@ -1,42 +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/>.
-
-# Test to make sure that texinfo.tex is not required by --cygnus.
-# See also sister test txinfo5.test.
-# Report from Ian Taylor.
-
-. ./defs || Exit 1
-
-cat >> configure.ac << 'END'
-AM_MAINTAINER_MODE
-END
-
-cat > Makefile.am << 'END'
-# Disable 'override' warnings to work around an unrelated
-# texi+cygnus bug.
-# Disable obsolete warnings because the 'cygnus' mode is now deprecated.
-AUTOMAKE_OPTIONS = -Wno-override -Wno-obsolete
-info_TEXINFOS = ian.texi
-END
-
-echo '@setfilename ian.info' > ian.texi
-
-$ACLOCAL
-$AUTOMAKE --cygnus
-$AUTOMAKE -a --cygnus
-test ! -f texinfo.tex
-
-:
-- 
1.7.9.5