summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--COPYING2
-rw-r--r--INSTALL3
-rw-r--r--NEWS78
-rw-r--r--PLANS/obsolete-removed/am-prog-mkdir-p.txt14
-rw-r--r--README2
-rw-r--r--bin/aclocal.in13
-rw-r--r--bin/automake.in449
-rwxr-xr-xbootstrap13
-rw-r--r--configure.ac19
-rw-r--r--doc/automake.texi150
-rw-r--r--lib/Automake/Language.pm4
-rw-r--r--lib/Automake/Options.pm18
-rw-r--r--lib/Automake/Variable.pm7
-rw-r--r--lib/Automake/local.mk1
-rw-r--r--lib/COPYING2
-rw-r--r--lib/am/depend2.am72
-rw-r--r--lib/am/distdir.am20
-rw-r--r--lib/am/texibuild.am42
-rw-r--r--lib/am/texinfos.am53
-rwxr-xr-xlib/depcomp35
-rwxr-xr-xlib/ylwrap15
-rw-r--r--m4/amversion.m46
-rw-r--r--m4/depend.m45
-rw-r--r--m4/init.m48
-rw-r--r--m4/local.mk2
-rw-r--r--m4/obsolete.m411
-rw-r--r--maintainer/syntax-checks.mk16
-rw-r--r--old/TODO4
-rw-r--r--t/aclocal-acdir.sh10
-rw-r--r--t/aclocal-amflags.sh15
-rw-r--r--t/aclocal-deleted-header-aclocal-amflags.sh5
-rw-r--r--t/aclocal-dirlist.sh10
-rw-r--r--t/aclocal-m4-include-are-scanned-aclocal-amflags.sh1
-rw-r--r--t/aclocal-path-precedence.sh18
-rw-r--r--t/autodist-configure-no-subdir.sh10
-rw-r--r--t/ax/distcheck-hook-m4.am2
-rw-r--r--t/backcompat6.sh3
-rw-r--r--t/compile_f_c_cxx.sh15
-rw-r--r--t/cscope.tap6
-rw-r--r--t/depcomp8a.sh21
-rw-r--r--t/depcomp8b.sh23
-rw-r--r--t/dist-missing-m4.sh5
-rw-r--r--t/dist-shar.sh14
-rw-r--r--t/dist-tarZ.sh27
-rw-r--r--t/distcheck-Tpo.sh (renamed from t/mkdir_p.sh)53
-rw-r--r--t/fort2.sh15
-rw-r--r--t/fort4.sh39
-rw-r--r--t/fort5.sh15
-rw-r--r--t/gcj.sh37
-rw-r--r--t/gettext-macros.sh3
-rw-r--r--t/help.sh7
-rw-r--r--t/includes-deprecation.sh (renamed from t/subobj4.sh)35
-rw-r--r--t/lex-line.sh32
-rw-r--r--t/libobj20b.sh2
-rw-r--r--t/libobj20c.sh2
-rw-r--r--t/libtool-macros.sh5
-rw-r--r--t/libtool3.sh14
-rw-r--r--t/list-of-tests.mk15
-rw-r--r--t/ltlibsrc.sh9
-rw-r--r--t/mdate5.sh51
-rw-r--r--t/pluseq5.sh20
-rw-r--r--t/pr401.sh11
-rw-r--r--t/pr401b.sh9
-rw-r--r--t/pr401c.sh10
-rw-r--r--t/remake-deleted-m4-file.sh5
-rw-r--r--t/remake-gnulib-add-acsubst.sh4
-rw-r--r--t/remake-gnulib-add-header.sh4
-rw-r--r--t/remake-gnulib-remove-header.sh4
-rw-r--r--t/remake-moved-m4-file.sh5
-rw-r--r--t/remake-renamed-m4-file.sh4
-rw-r--r--t/remake-renamed-m4-macro-and-file.sh4
-rw-r--r--t/remake-renamed-m4-macro.sh4
-rw-r--r--t/silent-nested-vars.sh2
-rw-r--r--t/subobj-pr13928-more-langs.sh2
-rw-r--r--t/subobj.sh32
-rw-r--r--t/subobj11a.sh10
-rw-r--r--t/subpkg-yacc.sh14
-rw-r--r--t/subpkg.sh7
-rw-r--r--t/txinfo-clean.sh1
-rw-r--r--t/txinfo-makeinfo-error-no-clobber.sh7
-rw-r--r--t/txinfo-no-extra-dist.sh62
-rw-r--r--t/warnings-obsolete-default.sh9
-rw-r--r--t/warnopts.sh42
-rw-r--r--t/werror2.sh1
-rw-r--r--t/xsource.sh18
-rw-r--r--t/yacc-grepping2.sh30
-rw-r--r--t/yacc-line.sh45
87 files changed, 756 insertions, 1193 deletions
diff --git a/COPYING b/COPYING
index d511905c1..73e818e98 100644
--- a/COPYING
+++ b/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ Copyright (C) 1989-2017 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/INSTALL b/INSTALL
index 4cbd15f99..422dd3a1c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,8 +1,7 @@
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2014 Free Software Foundation,
-Inc.
+Copyright (C) 1994-2017 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/NEWS b/NEWS
index 04a285565..2b4803f71 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,81 @@
+New in 2.0:
+
+* Compilation and object files:
+
+ - If a source file is placed in a subdirectory, the corresponding compiled
+ object will *always* be put into the subdirectory named after the source
+ file, rather than in the current directory. For instance, 'src/file.c'
+ and 'src/file.f90' will be compiled to 'src/file.o', and 'sub/dir/mu.cc'
+ will be compiled to 'sub/dir/mu.o'. Put in another way, Automake 2.0
+ and later will *unconditionally* behave as older Automake versions did
+ when the 'subdir-objects' option was given.
+
+* Texinfo support:
+
+ - Automake used to implement an undocumented hack causing '.info' files
+ that appeared to be cleaned (by e.g. being listed in the CLEANFILES
+ variable) to also be built in the builddir rather than in the srcdir;
+ this was for backward compatibility with packages such as Texinfo,
+ which did things like:
+
+ info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
+ DISTCLEANFILES = texinfo texinfo-* info*.info*
+ # Do not create info files for distribution.
+ dist-info:
+ @:
+
+ in order not to distribute .info files.
+
+ Now that we have the 'info-in-builddir' option that explicitly causes
+ generated '.info' files to be placed in the builddir, this hack is no
+ longer necessary. We have thus removed\ it.
+
+* Aclocal search path:
+
+ - Third-party m4 files located in the system-wide aclocal directory,
+ as well as in any directory listed in the ACLOCAL_PATH environment
+ variable, now take precedence over "built-in" Automake macros.
+ For example, assuming Automake is installed in the '/usr/local'
+ hierarchy, a definition of the AM_PROG_VALAC macro found in file
+ (say) '/usr/local/share/aclocal/my-vala.m4' should take precedence
+ over the same-named automake-provided macro, as defined in file
+ '/usr/local/share/aclocal-2.0/vala.m4'.
+
+* Obsolescent features flagged:
+
+ - Use of the special makefile variable 'ACLOCAL_AMFLAGS' is deprecated.
+ To specify locations of extra m4 files, the 'AC_CONFIG_MACRO_DIR' or
+ 'AC_CONFIG_MACRO_DIRS' (the latter introduced with autoconf 2.70)
+ should be used instead. And use of the '--install' aclocal option in
+ 'ACLOCAL_AMFLAGS' has proved to be a bad idea anyway -- see automake
+ bug#9037.
+
+* Obsolete features removed:
+
+ - Support for the long-deprecated name 'configure.in' for the Autoconf
+ input file has been removed altogether. Just use the modern name
+ 'configure.ac' instead.
+
+ - Support for the long-obsolete variable $(ACLOCAL_M4_SOURCES) has
+ been removed. It should be safe to simply remove any definition
+ of it you have in your Makefiles.
+
+* Removed support for obsolete platforms:
+
+ - Support for automatic dependency tracking with the SGI C/C++ compilers
+ on IRIX has been removed. The SGI depmode had been reported broken
+ "in the wild" already, and we don't think investing time in debugging
+ and fixing it would have been worthwhile, especially considering that
+ SGI has last updated those compilers in 2006, and is expected to retire
+ support for them in December 2013:
+ <http://www.sgi.com/services/support/irix_mips_support.html>
+
+ - Support for DJGPP on MS-DOS and/or Windows 95/98/ME has been removed.
+ Note that both Cygwin and MSYS/MinGW on modern Windows versions will
+ continue to be fully supported.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
* WARNING: Future backward-incompatibilities!
- Makefile recipes generated by Automake 2.0 will expect to use an
diff --git a/PLANS/obsolete-removed/am-prog-mkdir-p.txt b/PLANS/obsolete-removed/am-prog-mkdir-p.txt
index c18f94571..f2fd4c8d0 100644
--- a/PLANS/obsolete-removed/am-prog-mkdir-p.txt
+++ b/PLANS/obsolete-removed/am-prog-mkdir-p.txt
@@ -1,5 +1,15 @@
-The macro AM_PROG_MKDIR_P is no longer going to be removed from Automake.
-Let's see a bit of history to understand why.
+We have dropped any plan to remove the obsolescent macro AM_PROG_MKDIR_P,
+(today just an alias for the Autoconf-provided macro AC_PROG_MKDIR_P), as
+well as the related $(mkdir_p) make variable and the @mkdir_p@ configure
+substitution.
+
+That planned removal has already proven source of countless headaches and
+backward-compatibility issues, which vastly outweigh any "clean-up benefit"
+we would get from the removal of that obsolescent but unobtrusive cruft.
+
+-*-*-*-
+
+Let's see a bit of history.
I had already scheduled the removal of the long-deprecated AM_PROG_MKDR_P
macro (superseded by the Autoconf-provided one AC_PROG_MKDIR_P) for
diff --git a/README b/README
index b71266907..e0150b81c 100644
--- a/README
+++ b/README
@@ -52,7 +52,7 @@ that the range specifies every single year in that closed interval.
-----
-Copyright (C) 1994-2012 Free Software Foundation, Inc.
+Copyright (C) 1994-2017 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/bin/aclocal.in b/bin/aclocal.in
index aad0cfb4e..45140feb5 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -35,7 +35,6 @@ use strict;
use Automake::Config;
use Automake::General;
-use Automake::Configure_ac;
use Automake::Channels;
use Automake::ChannelDefs;
use Automake::XFile;
@@ -80,8 +79,9 @@ my @diff_command;
# --dry-run
my $dry_run = 0;
-# configure.ac or configure.in.
-my $configure_ac;
+# Name of the Autoconf input file. We used to support 'configure.in'
+# as well once, that that is long obsolete now.
+my $configure_ac = 'configure.ac';
# Output file name.
my $output_file = 'aclocal.m4';
@@ -449,8 +449,8 @@ sub scan_m4_files ()
SCAN_M4_DIRS_ERROR,
@user_includes[1..$#user_includes]);
}
- scan_m4_dirs (FT_AUTOMAKE, SCAN_M4_DIRS_ERROR, @automake_includes);
scan_m4_dirs (FT_SYSTEM, SCAN_M4_DIRS_ERROR, @system_includes);
+ scan_m4_dirs (FT_AUTOMAKE, SCAN_M4_DIRS_ERROR, @automake_includes);
# Construct a new function that does the searching. We use a
# function (instead of just evaluating $search in the loop) so that
@@ -1033,7 +1033,7 @@ sub usage ($)
print <<'EOF';
Usage: aclocal [OPTION]...
-Generate 'aclocal.m4' by scanning 'configure.ac' or 'configure.in'
+Generate 'aclocal.m4' by scanning 'configure.ac'
Options:
--automake-acdir=DIR directory holding automake-provided m4 files
@@ -1178,7 +1178,8 @@ if (exists $ENV{"AUTOMAKE_UNINSTALLED"})
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
parse_ACLOCAL_PATH;
-$configure_ac = require_configure_ac;
+
+fatal "$configure_ac is required" unless -f $configure_ac;
# We may have to rerun aclocal if some file have been installed, but
# it should not happen more than once. The reason we must run again
diff --git a/bin/automake.in b/bin/automake.in
index 653340563..6621302d8 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -33,15 +33,6 @@ BEGIN
{
unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
unless $ENV{AUTOMAKE_UNINSTALLED};
-
- # Override SHELL. This is required on DJGPP so that system() uses
- # bash, not COMMAND.COM which doesn't quote arguments properly.
- # Other systems aren't expected to use $SHELL when Automake
- # runs, but it should be safe to drop the "if DJGPP" guard if
- # it turns up other systems need the same thing. After all,
- # if SHELL is used, ./configure's SHELL is always better than
- # the user's SHELL (which may be something like tcsh).
- $ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'};
}
use Automake::Config;
@@ -59,7 +50,6 @@ use Automake::General;
use Automake::XFile;
use Automake::Channels;
use Automake::ChannelDefs;
-use Automake::Configure_ac;
use Automake::FileUtils;
use Automake::Location;
use Automake::Condition qw/TRUE FALSE/;
@@ -216,7 +206,7 @@ my @common_files =
# is used for the --help output only.
my @common_sometimes =
qw(aclocal.m4 acconfig.h config.h.top config.h.bot configure
- configure.ac configure.in stamp-vti);
+ configure.ac stamp-vti);
# Standard directories from the GNU Coding Standards, and additional
# pkg* directories from Automake. Stored in a hash for fast member check.
@@ -241,14 +231,6 @@ my $gen_copyright = "\
# PARTICULAR PURPOSE.
";
-# These constants are returned by the lang_*_rewrite functions.
-# LANG_SUBDIR means that the resulting object file should be in a
-# subdir if the source file is. In this case the file name cannot
-# have '..' components.
-use constant LANG_IGNORE => 0;
-use constant LANG_PROCESS => 1;
-use constant LANG_SUBDIR => 2;
-
# These are used when keeping track of whether an object can be built
# by two different paths.
use constant COMPILE_LIBTOOL => 1;
@@ -288,8 +270,9 @@ my $force_missing = 0;
## Variables filled during files scanning. ##
## ---------------------------------------- ##
-# Name of the configure.ac file.
-my $configure_ac;
+# Name of the Autoconf input file. We used to support 'configure.in'
+# as well once, that that is long obsolete now.
+my $configure_ac = 'configure.ac';
# Files found by scanning configure.ac for LIBOBJS.
my %libsources = ();
@@ -702,8 +685,6 @@ register_language ('name' => 'c',
'ld' => '$(CC)',
'linker' => 'LINK',
'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'CC',
'extensions' => ['.c']);
@@ -718,8 +699,6 @@ register_language ('name' => 'cxx',
'compile' => "\$(CXX) @cpplike_flags \$(AM_CXXFLAGS) \$(CXXFLAGS)",
'ccer' => 'CXX',
'compiler' => 'CXXCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'CXX',
'lder' => 'CXXLD',
'ld' => '$(CXX)',
@@ -737,8 +716,6 @@ register_language ('name' => 'objc',
'compile' => "\$(OBJC) @cpplike_flags \$(AM_OBJCFLAGS) \$(OBJCFLAGS)",
'ccer' => 'OBJC',
'compiler' => 'OBJCCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'lder' => 'OBJCLD',
'ld' => '$(OBJC)',
'pure' => 1,
@@ -755,8 +732,6 @@ register_language ('name' => 'objcxx',
'compile' => "\$(OBJCXX) @cpplike_flags \$(AM_OBJCXXFLAGS) \$(OBJCXXFLAGS)",
'ccer' => 'OBJCXX',
'compiler' => 'OBJCXXCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'lder' => 'OBJCXXLD',
'ld' => '$(OBJCXX)',
'pure' => 1,
@@ -773,8 +748,6 @@ register_language ('name' => 'upc',
'compile' => "\$(UPC) @cpplike_flags \$(AM_UPCFLAGS) \$(UPCFLAGS)",
'ccer' => 'UPC',
'compiler' => 'UPCCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'lder' => 'UPCLD',
'ld' => '$(UPC)',
'pure' => 1,
@@ -790,7 +763,7 @@ register_language ('name' => 'header',
# Nothing to do.
'_finish' => sub { });
-# Vala
+# Vala.
register_language ('name' => 'vala',
'Name' => 'Vala',
'config_vars' => ['VALAC'],
@@ -798,9 +771,10 @@ register_language ('name' => 'vala',
'compile' => '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)',
'ccer' => 'VALAC',
'compiler' => 'VALACOMPILE',
- 'extensions' => ['.vala'],
- 'output_extensions' => sub { (my $ext = $_[0]) =~ s/vala$/c/;
- return ($ext,) },
+ 'extensions' => ['.vala', '.vapi'],
+ # Vala compilation must be handled in a special way, so
+ # nothing to do or return here.
+ 'output_extensions' => sub { },
'rule_file' => 'vala',
'_finish' => \&lang_vala_finish,
'_target_hook' => \&lang_vala_target_hook,
@@ -872,14 +846,12 @@ register_language ('name' => 'asm',
'config_vars' => ['CCAS', 'CCASFLAGS'],
'flags' => ['CCASFLAGS'],
- # Users can set AM_CCASFLAGS to include DEFS, INCLUDES,
- # or anything else required. They can also set CCAS.
- # Or simply use Preprocessed Assembler.
+ # Users can set AM_CCASFLAGS to include $(DEFS),
+ # $(INCLUDES), or anything else required. They can also
+ # set CCAS. Or simply use Preprocessed Assembler.
'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
'ccer' => 'CCAS',
'compiler' => 'CCASCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'extensions' => ['.s']);
# Preprocessed Assembler.
@@ -892,8 +864,6 @@ register_language ('name' => 'cppasm',
'compile' => "\$(CCAS) @cpplike_flags \$(AM_CCASFLAGS) \$(CCASFLAGS)",
'ccer' => 'CPPAS',
'compiler' => 'CPPASCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'extensions' => ['.S', '.sx']);
# Fortran 77
@@ -906,8 +876,6 @@ register_language ('name' => 'f77',
'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS)',
'ccer' => 'F77',
'compiler' => 'F77COMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'F77',
'lder' => 'F77LD',
'ld' => '$(F77)',
@@ -924,8 +892,6 @@ register_language ('name' => 'fc',
'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)',
'ccer' => 'FC',
'compiler' => 'FCCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'FC',
'lder' => 'FCLD',
'ld' => '$(FC)',
@@ -944,8 +910,6 @@ register_language ('name' => 'ppfc',
'ccer' => 'PPFC',
'compiler' => 'PPFCCOMPILE',
'compile' => "\$(FC) @cpplike_flags \$(AM_FCFLAGS) \$(FCFLAGS)",
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'FC',
'pure' => 1,
'extensions' => ['.F90','.F95', '.F03', '.F08']);
@@ -976,8 +940,6 @@ register_language ('name' => 'ppf77',
'ccer' => 'PPF77',
'compiler' => 'PPF77COMPILE',
'compile' => "\$(F77) @cpplike_flags \$(AM_FFLAGS) \$(FFLAGS)",
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'F77',
'pure' => 1,
'extensions' => ['.F']);
@@ -995,8 +957,6 @@ register_language ('name' => 'ratfor',
'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) $(RFLAGS)',
'ccer' => 'F77',
'compiler' => 'RCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'F77',
'pure' => 1,
'extensions' => ['.r']);
@@ -1012,8 +972,6 @@ register_language ('name' => 'java',
'compile' => '$(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS)',
'ccer' => 'GCJ',
'compiler' => 'GCJCOMPILE',
- 'compile_flag' => '-c',
- 'output_flag' => '-o',
'libtool_tag' => 'GCJ',
'lder' => 'GCJLD',
'ld' => '$(GCJ)',
@@ -1372,10 +1330,8 @@ sub handle_languages ()
'FPFX' => $fpfx,
'AMDEP' => $AMDEP,
'FASTDEP' => $FASTDEP,
- '-c' => $lang->compile_flag || '',
# These are not used, but they need to be defined
- # so transform() do not complain.
- SUBDIROBJ => 0,
+ # so transform() does not complain.
'DERIVED-EXT' => 'BUG',
DIST_SOURCE => 1,
VERBOSE => $verbose,
@@ -1391,27 +1347,13 @@ sub handle_languages ()
# This is not used by depend2.am.
my $der_ext = ($lang->output_extensions->($ext))[0];
- # When we output an inference rule like '.c.o:' we
- # have two cases to consider: either subdir-objects
- # is used, or it is not.
- #
- # In the latter case the rule is used to build objects
- # in the current directory, and dependencies always
- # go into './$(DEPDIR)/'. We can hard-code this value.
- #
- # In the former case the rule can be used to build
- # objects in sub-directories too. Dependencies should
- # go into the appropriate sub-directories, e.g.,
- # 'sub/$(DEPDIR)/'. The value of this directory
- # needs to be computed on-the-fly.
- #
- # DEPBASE holds the name of this directory, plus the
- # basename part of the object file (extensions Po, TPo,
- # Plo, TPlo will be added later as appropriate). It is
- # either hardcoded, or a shell variable ('$depbase') that
- # will be computed by the rule.
- my $depbase =
- option ('subdir-objects') ? '$$depbase' : '$(DEPDIR)/$*';
+ # Even when subdir sources are present, an inference rule
+ # like '.c.o:' can be used to build corresponding objects
+ # in the sane subdirectory too. We should be careful to also
+ # place dependency files into the appropriate subdirectory,
+ # e.g., 'sub/$(DEPDIR)/'. The value of this directory needs
+ # to be computed on-the-fly (that is done by our makefile
+ # recipes in 'depend2.am').
$output_rules .=
file_contents ($rule_file,
new Automake::Location,
@@ -1420,9 +1362,9 @@ sub handle_languages ()
'DERIVED-EXT' => $der_ext,
- DEPBASE => $depbase,
BASE => '$*',
SOURCE => '$<',
+ XSOURCE => '$<',
SOURCEFLAG => $sourceflags{$ext} || '',
OBJ => '$@',
OBJOBJ => '$@',
@@ -1430,8 +1372,7 @@ sub handle_languages ()
COMPILE => '$(' . $lang->compiler . ')',
LTCOMPILE => '$(LT' . $lang->compiler . ')',
- -o => $lang->output_flag,
- SUBDIROBJ => !! option 'subdir-objects');
+ );
}
# Now include code for each specially handled object with this
@@ -1475,15 +1416,8 @@ sub handle_languages ()
"\$(LIBTOOL) $ltverbose $libtool_tag\$($ptltflags) \$(LIBTOOLFLAGS) "
. "--mode=compile $obj_compile";
- # We _need_ '-o' for per object rules.
- my $output_flag = $lang->output_flag || '-o';
-
- my $depbase = dirname ($obj);
- $depbase = ''
- if $depbase eq '.';
- $depbase .= '/'
- unless $depbase eq '';
- $depbase .= '$(DEPDIR)/' . basename ($obj);
+ # For non-suffix rules, we must emulate a VPATH search.
+ my $xsource = "`test -f '$source' || echo '\$(srcdir)/'`$source";
$output_rules .=
file_contents ($rule_file,
@@ -1491,9 +1425,9 @@ sub handle_languages ()
%transform,
GENERIC => 0,
- DEPBASE => $depbase,
BASE => $obj,
SOURCE => $source,
+ XSOURCE => $xsource,
SOURCEFLAG => $sourceflags{$srcext} || '',
# Use $myext and not '.o' here, in case
# we are actually building a new source
@@ -1507,7 +1441,6 @@ sub handle_languages ()
SILENT => $silent,
COMPILE => $obj_compile,
LTCOMPILE => $obj_ltcompile,
- -o => $output_flag,
%file_transform);
}
@@ -1669,10 +1602,6 @@ sub handle_single_transform
next;
}
- # If the source file is in a subdirectory then the '.o' is put
- # into the current directory, unless the subdir-objects option
- # is in effect.
-
# Split file name into base and extension.
next if ! /^(?:(.*)\/)?([^\/]*)($KNOWN_EXTENSIONS_PATTERN)$/;
my $full = $_;
@@ -1716,20 +1645,24 @@ sub handle_single_transform
}
}
- # Note: computed subr call. The language rewrite function
- # should return one of the LANG_* constants. It could
- # also return a list whose first value is such a constant
- # and whose second value is a new source extension which
- # should be applied. This means this particular language
- # generates another source file which we must then process
- # further.
- my $subr = \&{'lang_' . $lang->name . '_rewrite'};
- defined &$subr or $subr = \&lang_sub_obj;
- my ($r, $source_extension)
- = &$subr ($directory, $base, $extension,
- $obj, $have_per_exec_flags, $var);
- # Skip this entry if we were asked not to process it.
- next if $r == LANG_IGNORE;
+ # NOTE: computed subr calls here.
+
+ # The language ignore function can ask not to preprocess
+ # a source file further.
+ my $subr_ignore = \&{'lang_' . $lang->name . '_ignore'};
+ next if defined &$subr_ignore
+ and &$subr_ignore ($directory, $base, $extension);
+ # The language rewrite function can return a new source
+ # extension which should be applied. This means this
+ # particular language generates another source file which
+ # we must then process further. This happens, for example,
+ # with yacc and lex.
+ my $subr_rewrite = \&{'lang_' . $lang->name . '_rewrite'};
+ $subr_rewrite = sub { } unless defined &$subr_rewrite;
+ my $source_extension = &$subr_rewrite ($directory, $base,
+ $extension, $obj,
+ $have_per_exec_flags,
+ $var);
# Now extract linker and other info.
$linker = $lang->linker;
@@ -1774,25 +1707,24 @@ sub handle_single_transform
# We choose the name 'DERIVED_OBJECT' to ensure (1) uniqueness,
# and (2) continuity between invocations. However, this will
# result in a name that is too long for losing systems, in some
- # situations. So we attempt to shorten automatically under
- # subdir-objects, and provide _SHORTNAME to override as a last
- # resort. If subdir-object is in effect, it's usually
- # unnecessary to use the complete 'DERIVED_OBJECT' (that is
- # often the result from %canon_reldir%/%C% usage) since objects
- # are placed next to their source file. Generally, this means
- # it is already unique within that directory (see below for an
- # exception). Thus, we try to avoid unnecessarily long file
- # names by stripping the directory components of
- # 'DERIVED_OBJECT'. This allows avoiding explicit _SHORTNAME
- # usage in many cases. EXCEPTION: If two (or more) targets in
- # different directories but with the same base name (after
- # canonicalization), using target-specific FLAGS, link the same
- # object, then this logic clashes. Thus, we don't strip if
- # this is detected.
+ # situations. So we attempt to shorten automatically, and
+ # provide _SHORTNAME to override as a last resort. If
+ # subdir-object is in effect, it's usually unnecessary to use
+ # the complete 'DERIVED_OBJECT' (that is often the result from
+ # %canon_reldir%/%C% usage) since objects are placed next to
+ # their source file. Generally, this means it is already
+ # unique within that directory (see below for an exception).
+ # Thus, we try to avoid unnecessarily long file names by
+ # stripping the directory components of 'DERIVED_OBJECT'.
+ # This allows avoiding explicit _SHORTNAME usage in many
+ # cases. EXCEPTION: If two (or more) targets in different
+ # directories but with the same base name (after
+ # canonicalization), using target-specific FLAGS, link the
+ # same object, then this logic clashes. Thus, we don't strip
+ # if this is detected.
my $dname = $derived;
if ($directory ne ''
- && option 'subdir-objects'
- && none { $dname =~ /$_$/ } @dup_shortnames)
+ && none { $dname =~ /$_$/ } @dup_shortnames)
{
# At this point, we don't clear information about what
# parts of $derived are truly file name components. We can
@@ -1831,47 +1763,14 @@ sub handle_single_transform
}
# If rewrite said it was ok, put the object into a subdir.
- if ($directory ne '')
- {
- if ($r == LANG_SUBDIR)
- {
- $object = $directory . '/' . $object;
- }
- else
- {
- # Since the next major version of automake (2.0) will
- # make the behaviour so far only activated with the
- # 'subdir-object' option mandatory, it's better if we
- # start warning users not using that option.
- # As suggested by Peter Johansson, we strive to avoid
- # the warning when it would be irrelevant, i.e., if
- # all source files sit in "current" directory.
- msg_var 'unsupported', $var,
- "source file '$full' is in a subdirectory,"
- . "\nbut option 'subdir-objects' is disabled";
- msg 'unsupported', INTERNAL, <<'EOF', uniq_scope => US_GLOBAL;
-possible forward-incompatibility.
-At least a source file is in a subdirectory, but the 'subdir-objects'
-automake option hasn't been enabled. For now, the corresponding output
-object file(s) will be placed in the top-level directory. However,
-this behaviour will change in future Automake versions: they will
-unconditionally cause object files to be placed in the same subdirectory
-of the corresponding sources.
-You are advised to start using 'subdir-objects' option throughout your
-project, to avoid future incompatibilities.
-EOF
- }
- }
+ $object = $directory . '/' . $object
+ unless $directory eq '';
# If the object file has been renamed (because per-target
# flags are used) we cannot compile the file with an
# inference rule: we need an explicit rule.
#
- # If the source is in a subdirectory and the object is in
- # the current directory, we also need an explicit rule.
- #
# If both source and object files are in a subdirectory
- # (this happens when the subdir-objects option is used),
# then the inference will work.
#
# The latter case deserves a historical note. When the
@@ -1893,7 +1792,6 @@ EOF
# with GNU make, Solaris make, Ultrix make, BSD make,
# HP-UX make, and OSF1 make successfully.
if ($renamed
- || ($directory ne '' && ! option 'subdir-objects')
# We must also use specific rules for a nodist_ source
# if its language requests it.
|| ($lang->nodist_specific && ! $transform{'DIST_SOURCE'}))
@@ -1960,6 +1858,8 @@ EOF
next;
}
+ # FIXME: this is likely an internal error now that we use
+ # FIXME: subdir-objects unconditionally ...
err_am "object '$object' created by '$full' and '$object_map{$object}'"
if (defined $object_map{$object}
&& $object_map{$object} ne $full);
@@ -2344,38 +2244,29 @@ sub handle_LIBOBJS_or_ALLOCA
# to define LIBOBJDIR and ensure the files get cleaned.
# Otherwise LIBOBJDIR can be left undefined, and the cleaning
# is achieved by 'rm -f *.$(OBJEXT)' in compile.am.
- if ($config_libobj_dir
- && $relative_dir ne $config_libobj_dir)
- {
- if (option 'subdir-objects')
- {
- # In the top-level Makefile we do not use $(top_builddir), because
- # we are already there, and since the targets are built without
- # a $(top_builddir), it helps BSD Make to match them with
- # dependencies.
- $dir = "$config_libobj_dir/"
- if $config_libobj_dir ne '.';
- $dir = backname ($relative_dir) . "/$dir"
- if $relative_dir ne '.';
- define_variable ('LIBOBJDIR', "$dir", INTERNAL);
- if ($dir && !defined $clean_files{"$dir$base.\$(OBJEXT)"})
- {
- my $dirstamp = require_build_directory ($dir);
- $output_rules .= "$dir$base.\$(OBJEXT): $dirstamp\n";
- $output_rules .= "$dir$base.lo: $dirstamp\n"
- if ($var =~ /^LT/);
- }
- # libtool might create .$(OBJEXT) as a side-effect of using
- # LTLIBOBJS or LTALLOCA.
- $clean_files{"$dir$base.\$(OBJEXT)"} = MOSTLY_CLEAN;
- $clean_files{"$dir$base.lo"} = MOSTLY_CLEAN
+ if ($config_libobj_dir && $relative_dir ne $config_libobj_dir)
+ {
+ # In the top-level Makefile we do not use $(top_builddir), because
+ # we are already there, and since the targets are built without
+ # a $(top_builddir), it helps BSD Make to match them with
+ # dependencies.
+ $dir = "$config_libobj_dir/"
+ if $config_libobj_dir ne '.';
+ $dir = backname ($relative_dir) . "/$dir"
+ if $relative_dir ne '.';
+ define_variable ('LIBOBJDIR', "$dir", INTERNAL);
+ if ($dir && !defined $clean_files{"$dir$base.\$(OBJEXT)"})
+ {
+ my $dirstamp = require_build_directory ($dir);
+ $output_rules .= "$dir$base.\$(OBJEXT): $dirstamp\n";
+ $output_rules .= "$dir$base.lo: $dirstamp\n"
if ($var =~ /^LT/);
}
- else
- {
- error ("'\$($var)' cannot be used outside '$config_libobj_dir' if"
- . " 'subdir-objects' is not set");
- }
+ # libtool might create .$(OBJEXT) as a side-effect of using
+ # LTLIBOBJS or LTALLOCA.
+ $clean_files{"$dir$base.\$(OBJEXT)"} = MOSTLY_CLEAN;
+ $clean_files{"$dir$base.lo"} = MOSTLY_CLEAN
+ if ($var =~ /^LT/);
}
return $dir;
@@ -2531,7 +2422,7 @@ sub handle_libtool ()
{
my $dir = ($item eq '.') ? '' : "$item/";
# .libs is for Unix, _libs for DOS.
- push (@libtool_rms, "\t-rm -rf ${dir}.libs ${dir}_libs");
+ push (@libtool_rms, "\t-rm -rf ${dir}.libs");
}
check_user_variables 'LIBTOOLFLAGS';
@@ -3206,15 +3097,6 @@ sub handle_texinfo_helper
my $done = 0;
my (@mostly_cleans, @texi_cleans, @maint_cleans) = ('', '', '');
- # Build a regex matching user-cleaned files.
- my $d = var 'DISTCLEANFILES';
- my $c = var 'CLEANFILES';
- my @f = ();
- push @f, $d->value_as_list_recursive (inner_expand => 1) if $d;
- push @f, $c->value_as_list_recursive (inner_expand => 1) if $c;
- @f = map { s|[^A-Za-z_0-9*\[\]\-]|\\$&|g; s|\*|[^/]*|g; $_; } @f;
- my $user_cleaned_files = '^(?:' . join ('|', @f) . ')$';
-
foreach my $texi
($info_texinfos->value_as_list_recursive (inner_expand => 1))
{
@@ -3254,6 +3136,7 @@ sub handle_texinfo_helper
# generic rules.
my $outdir = dirname ($texi) . '/';
$outdir = "" if $outdir eq './';
+ my $src_outdir = '$(srcdir)/'. $outdir;
$out_file = $outdir . $out_file;
# Until Automake 1.6.3, .info files were built in the
@@ -3344,54 +3227,22 @@ sub handle_texinfo_helper
# Consequently, starting with Automake 1.8, .info files are
# built in the source tree again. Because we still plan to
# support non-distributed .info files at some point, we
- # have a single variable ($INSRC) that controls whether
+ # have a single variable ('$insrc') that controls whether
# the current .info file must be built in the source tree
# or in the build tree. Actually this variable is switched
- # off in two cases:
- # (1) For '.info' files that appear to be cleaned; this is for
- # backward compatibility with package such as Texinfo,
- # which do things like
- # info_TEXINFOS = texinfo.txi info-stnd.texi info.texi
- # DISTCLEANFILES = texinfo texinfo-* info*.info*
- # # Do not create info files for distribution.
- # dist-info:
- # in order not to distribute .info files.
- # (2) When the undocumented option 'info-in-builddir' is given.
- # This is done to allow the developers of GCC, GDB, GNU
- # binutils and the GNU bfd library to force the '.info' files
- # to be generated in the builddir rather than the srcdir, as
- # was once done when the (now removed) 'cygnus' option was
- # given. See automake bug#11034 for more discussion.
- my $insrc = 1;
- my $soutdir = '$(srcdir)/' . $outdir;
-
- if (option 'info-in-builddir')
- {
- $insrc = 0;
- }
- elsif ($out_file =~ $user_cleaned_files)
- {
- $insrc = 0;
- msg 'obsolete', "$am_file.am", <<EOF;
-Oops!
- It appears this file (or files included by it) are triggering
- an undocumented, soon-to-be-removed automake hack.
- Future automake versions will no longer place in the builddir
- (rather than in the srcdir) the generated '.info' files that
- appear to be cleaned, by e.g. being listed in CLEANFILES or
- DISTCLEANFILES.
- If you want your '.info' files to be placed in the builddir
- rather than in the srcdir, you have to use the shiny new
- 'info-in-builddir' automake option.
-EOF
- }
-
- $outdir = $soutdir if $insrc;
+ # off when the automake option 'info-in-builddir' is given.
+ # This is done to allow the developers of GCC, GDB, GNU
+ # binutils and the GNU bfd library to force the '.info' files
+ # to be generated in the builddir rather than the srcdir, as
+ # was once done when the (now removed) 'cygnus' option was
+ # given. See automake bug#11034 for more discussion.
+ my $insrc = ! option 'info-in-builddir';
+ $outdir = $src_outdir if $insrc;
# If user specified file_TEXINFOS, then use that as explicit
# dependency list.
@texi_deps = ();
- push (@texi_deps, "${soutdir}${vtexi}") if $vtexi;
+ push (@texi_deps, "${src_outdir}${vtexi}") if $vtexi;
my $canonical = canonicalize ($infobase);
if (var ($canonical . "_TEXINFOS"))
@@ -3445,8 +3296,8 @@ EOF
new Automake::Location,
TEXI => $texi,
VTI => $vti,
- STAMPVTI => "${soutdir}stamp-$vti",
- VTEXI => "$soutdir$vtexi",
+ STAMPVTI => "${src_outdir}stamp-$vti",
+ VTEXI => "${src_outdir}$vtexi",
MDDIR => $conf_dir,
DIRSTAMP => $dirstamp);
}
@@ -3809,7 +3660,7 @@ sub handle_dist ()
{
my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
$archive_defined ||=
- grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip xz);
+ grep { option "dist-$_" } qw(zip bzip2 lzip xz);
error (option 'no-dist-gzip',
"no-dist-gzip specified but no dist-* specified,\n"
. "at least one archive format must be enabled")
@@ -3993,21 +3844,13 @@ sub scan_aclocal_m4 ()
$regen_aclocal = $line =~ 'generated automatically by aclocal';
}
- my @ac_deps = ();
-
- if (set_seen ('ACLOCAL_M4_SOURCES'))
- {
- push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
- msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
- "'ACLOCAL_M4_SOURCES' is obsolete.\n"
- . "It should be safe to simply remove it");
- }
+ reject_var ('ACLOCAL_M4_SOURCES',
+ "'ACLOCAL_M4_SOURCES' is obsolete; just remove it");
# Note that it might be possible that aclocal.m4 doesn't exist but
# should be auto-generated. This case probably isn't very
# important.
-
- return ($regen_aclocal, @ac_deps);
+ return $regen_aclocal;
}
@@ -4123,10 +3966,9 @@ sub handle_configure
my $colon_infile = ':' . join (':', @inputs);
$colon_infile = '' if $colon_infile eq ":$makefile.in";
my @rewritten = rewrite_inputs_into_dependencies ($makefile, @inputs);
- my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4;
+ my $regen_aclocal_m4 = scan_aclocal_m4;
define_pretty_variable ('am__aclocal_m4_deps', TRUE, INTERNAL,
- @configure_deps, @aclocal_m4_deps,
- '$(top_srcdir)/' . $configure_ac);
+ @configure_deps, "\$(top_srcdir)/$configure_ac");
my @configuredeps = ('$(am__aclocal_m4_deps)', '$(CONFIGURE_DEPENDENCIES)');
push @configuredeps, '$(ACLOCAL_M4)' if -f 'aclocal.m4';
define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
@@ -5227,7 +5069,6 @@ sub scan_autoconf_traces
AC_REQUIRE_AUX_FILE => 1,
AC_SUBST_TRACE => 1,
AM_AUTOMAKE_VERSION => 1,
- AM_PROG_MKDIR_P => 0,
AM_CONDITIONAL => 2,
AM_EXTRA_RECURSIVE_TARGETS => 1,
AM_GNU_GETTEXT => 0,
@@ -5339,9 +5180,7 @@ sub scan_autoconf_traces
elsif ($macro eq 'AC_FC_SRCEXT')
{
my $suffix = $args[1];
- # These flags are used as %SOURCEFLAG% in depend2.am,
- # where the trailing space is important.
- $sourceflags{'.' . $suffix} = '$(FCFLAGS_' . $suffix . ') '
+ $sourceflags{'.' . $suffix} = '$(FCFLAGS_' . $suffix . ')'
if ($suffix eq 'f90' || $suffix eq 'f95' || $suffix eq 'f03' || $suffix eq 'f08');
}
elsif ($macro eq 'AC_INIT')
@@ -5382,14 +5221,6 @@ sub scan_autoconf_traces
$seen_automake_version = 1;
}
- elsif ($macro eq 'AM_PROG_MKDIR_P')
- {
- msg 'obsolete', $where, <<'EOF';
-The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
-You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
-and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
-EOF
- }
elsif ($macro eq 'AM_CONDITIONAL')
{
$configure_cond{$args[1]} = $where;
@@ -5508,8 +5339,7 @@ EOF
}
-# Check whether we use 'configure.ac' or 'configure.in'.
-# Scan it (and possibly 'aclocal.m4') for interesting things.
+# Scan 'configure.ac' (and possibly 'aclocal.m4') for interesting things.
# We must scan aclocal.m4 because there might be AC_SUBSTs and such there.
sub scan_autoconf_files ()
{
@@ -5637,48 +5467,37 @@ sub check_gnits_standards ()
#
# Functions to handle files of each language.
-# Each 'lang_X_rewrite($DIRECTORY, $BASE, $EXT)' function follows a
-# simple formula: Return value is LANG_SUBDIR if the resulting object
-# file should be in a subdir if the source file is, LANG_PROCESS if
-# file is to be dealt with, LANG_IGNORE otherwise.
-
# Much of the actual processing is handled in
# handle_single_transform. These functions exist so that
# auxiliary information can be recorded for a later cleanup pass.
# Note that the calls to these functions are computed, so don't bother
# searching for their precise names in the source.
-# This is just a convenience function that can be used to determine
-# when a subdir object should be used.
-sub lang_sub_obj ()
-{
- return option 'subdir-objects' ? LANG_SUBDIR : LANG_PROCESS;
-}
+# Header files are simply ignored.
+sub lang_header_ignore { 1; }
-# Rewrite a single header file.
-sub lang_header_rewrite
+# Vala '.vapi' are a kind of header files as well, and should
+# not be processed into compilation rules.
+sub lang_vala_ignore
{
- # Header files are simply ignored.
- return LANG_IGNORE;
+ my ($directory, $base, $ext) = @_;
+ return ($ext =~ m/\.vapi$/ ? 1 : 0);
}
# Rewrite a single Vala source file.
sub lang_vala_rewrite
{
my ($directory, $base, $ext) = @_;
-
- (my $newext = $ext) =~ s/vala$/c/;
- return (LANG_SUBDIR, $newext);
+ $ext =~ s/vala$/c/;
+ return $ext;
}
# Rewrite a single yacc/yacc++ file.
sub lang_yacc_rewrite
{
my ($directory, $base, $ext) = @_;
-
- my $r = lang_sub_obj;
- (my $newext = $ext) =~ tr/y/c/;
- return ($r, $newext);
+ $ext =~ tr/y/c/;
+ return $ext;
}
sub lang_yaccxx_rewrite { lang_yacc_rewrite (@_); };
@@ -5686,19 +5505,11 @@ sub lang_yaccxx_rewrite { lang_yacc_rewrite (@_); };
sub lang_lex_rewrite
{
my ($directory, $base, $ext) = @_;
-
- my $r = lang_sub_obj;
- (my $newext = $ext) =~ tr/l/c/;
- return ($r, $newext);
+ $ext =~ tr/l/c/;
+ return $ext;
}
sub lang_lexxx_rewrite { lang_lex_rewrite (@_); };
-# Rewrite a single Java file.
-sub lang_java_rewrite
-{
- return LANG_SUBDIR;
-}
-
# The lang_X_finish functions are called after all source file
# processing is done. Each should handle defining rules for the
# language, etc. A finish function is only called if a source file of
@@ -6787,9 +6598,7 @@ sub preprocess_file
'XZ' => !! option 'dist-xz',
'LZIP' => !! option 'dist-lzip',
'BZIP2' => !! option 'dist-bzip2',
- 'COMPRESS' => !! option 'dist-tarZ',
'GZIP' => ! option 'no-dist-gzip',
- 'SHAR' => !! option 'dist-shar',
'ZIP' => !! option 'dist-zip',
'INSTALL-INFO' => ! option 'no-installinfo',
@@ -7805,8 +7614,7 @@ sub require_build_directory
$directory_map{$cdir} = $dirstamp;
# Set a variable for the dirstamp basename.
- define_pretty_variable ('am__dirstamp', TRUE, INTERNAL,
- '$(am__leading_dot)dirstamp');
+ define_pretty_variable ('am__dirstamp', TRUE, INTERNAL, '.dirstamp');
# Directory must be removed by 'make distclean'.
$clean_files{$dirstamp} = DIST_CLEAN;
@@ -7902,9 +7710,18 @@ sub generate_makefile
}
# Catch some obsolete variables.
- msg_var ('obsolete', 'INCLUDES',
- "'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')")
- if var ('INCLUDES');
+ if (my $ovar = var ('ACLOCAL_AMFLAGS'))
+ {
+ msg_var 'obsolete', $ovar,
+ "'ACLOCAL_AMFLAGS' is deprecated; use 'AC_CONFIG_MACRO_DIRS'"
+ . " in configure.ac instead";
+ }
+ if (my $ovar = var ('INCLUDES'))
+ {
+ msg_var 'obsolete', $ovar,
+ "'INCLUDES' is deprecated; you should use 'AM_CPPFLAGS'"
+ . " (or '*_CPPFLAGS') instead"
+ }
# Must do this after reading .am file.
define_variable ('subdir', $relative_dir, INTERNAL);
@@ -8351,7 +8168,7 @@ parse_WARNINGS;
# Parse command line.
parse_arguments;
-$configure_ac = require_configure_ac;
+fatal "$configure_ac is required" unless -f $configure_ac;
# Do configure.ac scan only once.
scan_autoconf_files;
diff --git a/bootstrap b/bootstrap
index b57623798..28b1ace11 100755
--- a/bootstrap
+++ b/bootstrap
@@ -44,15 +44,6 @@ datadir=.
# rule of our Makefile.
RELEASE_YEAR=2017
-# Override SHELL. This is required on DJGPP so that Perl's system()
-# uses bash, not COMMAND.COM which doesn't quote arguments properly.
-# It's not used otherwise.
-if test -n "$DJDIR"; then
- BOOTSTRAP_SHELL=/dev/env/DJDIR/bin/bash.exe
-else
- BOOTSTRAP_SHELL=/bin/sh
-fi
-
# Sanity checks.
if test -z "$VERSION"; then
echo "$me: cannot find VERSION" >&2
@@ -71,8 +62,8 @@ if test -d automake-$APIVERSION; then
find automake-$APIVERSION -exec chmod u+wx '{}' ';'
fi
rm -rf automake-$APIVERSION
-# Can't use "ln -s lib automake-$APIVERSION", that would create a
-# lib.exe stub under DJGPP 2.03.
+# Can't use "ln -s lib automake-$APIVERSION", that might not work
+# properly on MinGW/MSYS.
mkdir automake-$APIVERSION
cp -rf lib/* automake-$APIVERSION
diff --git a/configure.ac b/configure.ac
index 9a5cafd47..1aee6af27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
-AC_INIT([GNU Automake], [1.15a], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.99a], [bug-automake@gnu.org])
AC_CONFIG_SRCDIR([bin/automake.in])
AC_CONFIG_AUX_DIR([lib])
@@ -49,7 +49,7 @@ AC_SUBST([RELEASE_YEAR])
# The API version is the base version. We must guarantee
# compatibility for all releases with the same API version.
-APIVERSION=1.15a
+APIVERSION=1.99a
AC_SUBST([APIVERSION])
AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
@@ -167,16 +167,11 @@ result=no
test "x$am_cv_prog_ln" = xln && result=yes
AC_MSG_RESULT([$result])
-# The amount we should wait after modifying files depends on the platform.
-# On Windows '95, '98 and ME, files modifications have 2-seconds
-# granularity and can be up to 3 seconds in the future w.r.t. the
-# system clock. When it is important to ensure one file is older
-# than another we wait at least 5 seconds between creations.
-case $build in
- *-pc-msdosdjgpp) MODIFICATION_DELAY=5;;
- *) MODIFICATION_DELAY=2;;
-esac
-AC_SUBST([MODIFICATION_DELAY])
+# The amount we should wait after modifying files.
+# FIXME: for file systems with sub-second timestamp resolutions, this
+# FIXME: might be just one second (or even less if 'sleep' supports
+# FIXME: non-integer arguments); is it worth pursuing that road?
+AC_SUBST([MODIFICATION_DELAY], [2])
## ------------------------------------------- ##
## Test for things needed by the test suite. ##
diff --git a/doc/automake.texi b/doc/automake.texi
index 050c9811d..347d74535 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -193,6 +193,7 @@ Auto-generating aclocal.m4
Autoconf macros supplied with Automake
* Public Macros:: Macros that you can use.
+* Obsolete Macros:: Obsolete macros you should no longer use
* Private Macros:: Macros that you should not use.
Directories
@@ -3334,15 +3335,10 @@ way as it is for @command{automake} (@pxref{automake Invocation}).
@cindex Macro search path
@cindex @command{aclocal} search path
-By default, @command{aclocal} searches for @file{.m4} files in the following
-directories, in this order:
+By default, @command{aclocal} searches for @file{.m4} files in the
+following directories, in this order:
@table @code
-@item @var{acdir-APIVERSION}
-This is where the @file{.m4} macros distributed with Automake itself
-are stored. @var{APIVERSION} depends on the Automake release used;
-for example, for Automake 1.11.x, @var{APIVERSION} = @code{1.11}.
-
@item @var{acdir}
This directory is intended for third party @file{.m4} files, and is
configured when @command{automake} itself is built. This is
@@ -3350,14 +3346,19 @@ configured when @command{automake} itself is built. This is
expands to @file{$@{prefix@}/share/aclocal/}. To find the compiled-in
value of @var{acdir}, use the @option{--print-ac-dir} option
(@pxref{aclocal Options}).
+
+@item @var{acdir-APIVERSION}
+This is where the @file{.m4} macros distributed with Automake itself
+are stored. @var{APIVERSION} depends on the Automake release used;
+for example, for Automake 1.11.x, @var{APIVERSION} = @code{1.11}.
@end table
As an example, suppose that @command{automake-1.11.2} was configured with
@option{--prefix=@-/usr/local}. Then, the search path would be:
@enumerate
-@item @file{/usr/local/share/aclocal-1.11.2/}
@item @file{/usr/local/share/aclocal/}
+@item @file{/usr/local/share/aclocal-1.11.2/}
@end enumerate
The paths for the @var{acdir} and @var{acdir-APIVERSION} directories can
@@ -3379,8 +3380,8 @@ Any extra directories specified using @option{-I} options
@enumerate
@item @file{/foo}
@item @file{/bar}
-@item @var{acdir}-@var{APIVERSION}
@item @var{acdir}
+@item @var{acdir}-@var{APIVERSION}
@end enumerate
@subsubheading Modifying the Macro Search Path: @file{dirlist}
@@ -3407,13 +3408,14 @@ and that @command{aclocal} was called with the @samp{-I /foo -I /bar} options.
Then, the search path would be
@c @code looks better than @file here
+@c See test aclocal-dirlist.sh
@enumerate
@item @code{/foo}
@item @code{/bar}
-@item @var{acdir}-@var{APIVERSION}
@item @var{acdir}
@item @code{/test1}
@item @code{/test2}
+@item @var{acdir}-@var{APIVERSION}
@end enumerate
@noindent
@@ -3430,19 +3432,22 @@ If the @option{--system-acdir=@var{dir}} option is used, then
directories are
@c @code looks better than @file here
+@c Keep in sync with aclocal-path-precedence.sh
@enumerate
-@item @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
+@item @code{/usr/share/aclocal-1.11/}
@end enumerate
-However, suppose further that many packages have been manually
-installed on the system, with $prefix=/usr/local, as is typical. In
+However, suppose further that many packages have been manually installed
+on the system, with @code{$@{prefix@}=/usr/local}, as is typical. In
that case, many of these ``extra'' @file{.m4} files are in
-@file{/usr/local/share/aclocal}. The only way to force
-@file{/usr/bin/aclocal} to find these ``extra'' @file{.m4} files is to
-always call @samp{aclocal -I /usr/local/share/aclocal}. This is
-inconvenient. With @file{dirlist}, one may create a file
-@file{/usr/share/aclocal/dirlist} containing only the single line
+@file{/usr/local/share/aclocal}. A way to force @file{/usr/bin/aclocal}
+to find these ``extra'' @file{.m4} files is to export @code{ACLOCAL_PATH}
+to @samp{/usr/local/share/aclocal}. This is a little inconvenient,
+since it requires either explicit user cooperation, or editing of the
+system global shell initialization file. With @file{dirlist}, one may
+create a file @file{/usr/share/aclocal/dirlist} containing only the
+single line
@example
/usr/local/share/aclocal
@@ -3451,20 +3456,18 @@ inconvenient. With @file{dirlist}, one may create a file
Now, the ``default'' search path on the affected system is
@c @code looks better than @file here
+@c See test aclocal-dirlist.sh
@enumerate
-@item @code{/usr/share/aclocal-1.11/}
@item @code{/usr/share/aclocal/}
@item @code{/usr/local/share/aclocal/}
+@item @code{/usr/share/aclocal-1.11/}
@end enumerate
-without the need for @option{-I} options; @option{-I} options can be reserved
-for project-specific needs (@file{my-source-dir/m4/}), rather than
-using it to work around local system-dependent tool installation
-directories.
+without the need of any explicit @code{ACLOCAL_PATH} setting.
Similarly, @file{dirlist} can be handy if you have installed a local
-copy of Automake in your account and want @command{aclocal} to look for
-macros installed at other places on the system.
+copy of Automake in your account and want @command{aclocal} to look
+for macros installed at other places on the system.
@anchor{ACLOCAL_PATH}
@subsubheading Modifying the Macro Search Path: @file{ACLOCAL_PATH}
@@ -3492,16 +3495,6 @@ Conversely to @file{dirlist}, @env{ACLOCAL_PATH} is useful if you are
using a global copy of Automake and want @command{aclocal} to look for
macros somewhere under your home directory.
-@subsubheading Planned future incompatibilities
-
-The order in which the directories in the macro search path are currently
-looked up is confusing and/or suboptimal in various aspects, and is
-probably going to be changed in the future Automake release. In
-particular, directories in @env{ACLOCAL_PATH} and @file{@var{acdir}}
-might end up taking precedence over @file{@var{acdir-APIVERSION}}, and
-directories in @file{@var{acdir}/dirlist} might end up taking precedence
-over @file{@var{acdir}}. @emph{This is a possible future incompatibility!}
-
@node Extending aclocal
@subsection Writing your own aclocal macros
@@ -3529,7 +3522,7 @@ aclocal_DATA = mymacro.m4 myothermacro.m4
@noindent
Please do use @file{$(datadir)/aclocal}, and not something based on
the result of @samp{aclocal --print-ac-dir} (@pxref{Hard-Coded Install
-Paths}, for arguments). It might also be helpful to suggest to
+Paths}, for rationale). It might also be helpful to suggest to
the user to add the @file{$(datadir)/aclocal} directory to his
@env{ACLOCAL_PATH} variable (@pxref{ACLOCAL_PATH}) so that
@command{aclocal} will find the @file{.m4} files installed by your
@@ -3896,7 +3889,7 @@ Automake ships with several Autoconf macros that you can use from your
@menu
* Public Macros:: Macros that you can use.
-* Obsolete Macros:: Macros that will soon be removed.
+* Obsolete Macros:: Obsolete macros you should no longer use
* Private Macros:: Macros that you should not use.
@end menu
@@ -4072,18 +4065,14 @@ define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
@node Obsolete Macros
-@subsection Obsolete Macros
+@subsection Obsolete macros you should no longer use
@cindex obsolete macros
-@cindex autoupdate
Although using some of the following macros was required in past
-releases, you should not use any of them in new code. @emph{All
-these macros will be removed in the next major Automake version};
-if you are still using them, running @command{autoupdate} should
-adjust your @file{configure.ac} automatically (@pxref{autoupdate
-Invocation, , Using @command{autoupdate} to Modernize
-@file{configure.ac}, autoconf, The Autoconf Manual}).
-@emph{Do it NOW!}
+releases, you should not use any of them in new code. Also, most
+of these macros will probably be @emph{removed in some future Automake
+version}, so you should consider updating your @file{configure.ac}
+to avoid problems in the future.
@table @code
@@ -4109,7 +4098,6 @@ in a future major Automake release.
@end table
-
@node Private Macros
@subsection Private Macros
@@ -5656,18 +5644,13 @@ nodist_maude_SOURCES = nodist.c
dist_maude_SOURCES = dist-me.c
@end example
-By default the output file (on Unix systems, the @file{.o} file) will
-be put into the current build directory. However, if the option
-@option{subdir-objects} is in effect in the current directory then the
-@file{.o} file will be put into the subdirectory named after the
-source file. For instance, with @option{subdir-objects} enabled,
-@file{sub/dir/file.c} will be compiled to @file{sub/dir/file.o}. Some
-people prefer this mode of operation. You can specify
-@option{subdir-objects} in @code{AUTOMAKE_OPTIONS} (@pxref{Options}).
+The output file (on Unix systems, the @file{.o} file) will be put into the
+subdirectory named after the source file. For instance @file{file.c} will
+compiled to @file{file.o}, while @file{sub/dir/file.c} will be compiled to
+@file{sub/dir/file.o}.
@cindex Subdirectory, objects in
@cindex Objects in subdirectory
-
@item EXTRA_maude_SOURCES
Automake needs to know the list of files you intend to compile
@emph{statically}. For one thing, this is the only way Automake has of
@@ -6061,19 +6044,15 @@ tool1_SOURCES = @dots{}
tool2_SOURCES = @dots{}
@end example
-When option @option{subdir-objects} is not used, as in the above
-example, the variables @samp{$(LIBOBJS)} or @samp{$(ALLOCA)} can only
-be used in the directory where their sources lie. E.g., here it would
-be wrong to use @samp{$(LIBOBJS)} or @samp{$(ALLOCA)} in
-@file{src/Makefile.am}. However if both @option{subdir-objects} and
-@code{AC_CONFIG_LIBOBJ_DIR} are used, it is OK to use these variables
+The variables @samp{$(LIBOBJS)} or @samp{$(ALLOCA)} are typically
+used in the directory where their sources lie. However, if
+@code{AC_CONFIG_LIBOBJ_DIR} is used, it is OK to use these variables
in other directories. For instance @file{src/Makefile.am} could be
changed as follows.
@example
# src/Makefile.am
-AUTOMAKE_OPTIONS = subdir-objects
LDADD = $(LIBOBJS) $(ALLOCA)
bin_PROGRAMS = tool1 tool2 @dots{}
@@ -8734,20 +8713,6 @@ default compression ratio, but with a progress indicator:
Generate a @samp{zip} archive of the distribution.
@trindex dist-zip
-@item @code{dist-tarZ}
-Generate a tar archive of the distribution, compressed with the
-historical (and obsolescent) program @command{compress}. This
-option is deprecated, and it and the corresponding functionality
-will be removed altogether in Automake 2.0.
-@trindex dist-tarZ
-
-@item @code{dist-shar}
-Generate a @samp{shar} archive of the distribution. This format
-archive is obsolescent, and use of this option is deprecated.
-It and the corresponding functionality will be removed altogether
-in Automake 2.0.
-@trindex dist-shar
-
@end table
The rule @code{dist} (and its historical synonym @code{dist-all})
@@ -10121,23 +10086,6 @@ Hook @code{dist-xz} to @code{dist}.
Hook @code{dist-zip} to @code{dist}.
@trindex dist-zip
-@item @option{dist-shar}
-@cindex Option, @option{dist-shar}
-@opindex dist-shar
-Hook @code{dist-shar} to @code{dist}. Use of this option
-is deprecated, as the @samp{shar} format is obsolescent and
-problematic. Support for it will be removed altogether in
-Automake 2.0.
-@trindex dist-shar
-
-@item @option{dist-tarZ}
-@cindex Option, @option{dist-tarZ}
-@opindex dist-tarZ
-Hook @code{dist-tarZ} to @code{dist}. Use of this option
-is deprecated, as the @samp{compress} program is obsolete.
-Support for it will be removed altogether in Automake 2.0.
-@trindex dist-tarZ
-
@item @option{filename-length-max=99}
@cindex Option, @option{filename-length-max=99}
@opindex filename-length-max=99
@@ -10290,11 +10238,8 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false$(EXEEXT) true.sh
@item @option{subdir-objects}
@cindex Options, @option{subdir-objects}
@opindex subdir-objects
-If this option is specified, then objects are placed into the
-subdirectory of the build directory corresponding to the subdirectory of
-the source file. For instance, if the source file is
-@file{subdir/file.cxx}, then the output file would be
-@file{subdir/file.o}.
+This option does nothing; it exists solely for compatibility with
+older Automake versions.
@anchor{tar-formats}
@item @option{tar-v7}
@@ -10314,8 +10259,7 @@ the source file. For instance, if the source file is
These three mutually exclusive options select the tar format to use
when generating tarballs with @samp{make dist}. (The tar file created
is then compressed according to the set of @option{no-dist-gzip},
-@option{dist-bzip2}, @option{dist-lzip}, @option{dist-xz} and
-@option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzip} and @option{dist-xz} in use).
These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
(@pxref{Macros}) because they can require additional configure checks.
@@ -13192,11 +13136,11 @@ suite failures, please attach the @file{test-suite.log} file.
@c LocalWords: installinfo vers MAKEINFO makeinfo MAKEINFOFLAGS noinstall rf
@c LocalWords: mandir thesame alsothesame installman myexecbin DESTDIR Pinard
@c LocalWords: uninstall installdirs uninstalls MOSTLYCLEANFILES mostlyclean
-@c LocalWords: DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip shar exp
+@c LocalWords: DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip exp
@c LocalWords: distdir distcheck distcleancheck listfiles distuninstallcheck
@c LocalWords: VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
@c LocalWords: RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis readme DVIPS
-@c LocalWords: installcheck gzipped tarZ std utils etags mkid cd
+@c LocalWords: installcheck gzipped std utils etags mkid cd
@c LocalWords: ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
@c LocalWords: foocc doit idlC multilibs ABIs cmindex defmac ARG enableval FC
@c LocalWords: MSG xtrue DBG pathchk CYGWIN afile proglink versioned CVS's TE
diff --git a/lib/Automake/Language.pm b/lib/Automake/Language.pm
index 0f90112df..58c7201ce 100644
--- a/lib/Automake/Language.pm
+++ b/lib/Automake/Language.pm
@@ -39,8 +39,6 @@ Class::Struct::struct (
'compiler' => "\$",
# Content of the compiling variable.
'compile' => "\$",
- # Flag to require compilation without linking (-c).
- 'compile_flag' => "\$",
'extensions' => '@',
# A subroutine to compute a list of possible extensions of
# the product given the input extensions.
@@ -70,8 +68,6 @@ Class::Struct::struct (
# Content of the linker variable ($(CC)).
'ld' => "\$",
- # Flag to specify the output file (-o).
- 'output_flag' => "\$",
'_finish' => "\$",
# This is a subroutine which is called whenever we finally
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index a6bc795fa..2b71b8c84 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -339,20 +339,20 @@ sub _process_option_list (\%@)
"archives has been removed");
$ret = 0;
}
- # TODO: Make this a fatal error in Automake 2.0.
+ # TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-shar')
{
- msg ('obsolete', $where,
- "support for shar distribution archives is deprecated.\n" .
- " It will be removed in Automake 2.0");
+ error ($where, "support for shar distribution archives has " .
+ "been removed.");
+ $ret = 0;
}
- # TODO: Make this a fatal error in Automake 2.0.
+ # TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-tarZ')
{
- msg ('obsolete', $where,
- "support for distribution archives compressed with " .
- "legacy program 'compress' is deprecated.\n" .
- " It will be removed in Automake 2.0");
+ error ($where, "support for distribution archives compressed " .
+ "with legacy program 'compress' has " .
+ "been removed.");
+ $ret = 0;
}
elsif (/^filename-length-max=(\d+)$/)
{
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index 99a829e85..53a111614 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -21,7 +21,6 @@ use Carp;
use Automake::Channels;
use Automake::ChannelDefs;
-use Automake::Configure_ac;
use Automake::Item;
use Automake::VarDef;
use Automake::Condition qw (TRUE FALSE);
@@ -193,8 +192,7 @@ my %_ac_macro_for_var =
YACC => 'AC_PROG_YACC',
);
-# The name of the configure.ac file.
-my $configure_ac;
+my $configure_ac = 'configure.ac';
# Variables that can be overridden without complaint from -Woverride
my %_silent_variable_override =
@@ -1133,9 +1131,6 @@ sub require_variables ($$$@)
my $res = 0;
$reason .= ' but ' unless $reason eq '';
- $configure_ac = find_configure_ac
- unless defined $configure_ac;
-
VARIABLE:
foreach my $var (@vars)
{
diff --git a/lib/Automake/local.mk b/lib/Automake/local.mk
index 1a5b35a60..e9c426c03 100644
--- a/lib/Automake/local.mk
+++ b/lib/Automake/local.mk
@@ -25,7 +25,6 @@ dist_perllib_DATA = \
%D%/ChannelDefs.pm \
%D%/Channels.pm \
%D%/Condition.pm \
- %D%/Configure_ac.pm \
%D%/DisjConditions.pm \
%D%/FileUtils.pm \
%D%/General.pm \
diff --git a/lib/COPYING b/lib/COPYING
index 94a9ed024..2c343867e 100644
--- a/lib/COPYING
+++ b/lib/COPYING
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 2007-2017 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/lib/am/depend2.am b/lib/am/depend2.am
index 45dd88c5e..90dcd2a68 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -32,59 +32,40 @@
## a package with gcc 3.x or later. In this case we can skip the use of
## depcomp and easily inline the dependency tracking.
+if %?FIRST%
+## TODO: rewrite this to avoid extra forks once we can assume a POSIX shell.
+am__set_depbase = depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.[^.]*$$||'`
+endif %?FIRST%
+
if %?NONLIBTOOL%
?GENERIC?%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
-?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+ %VERBOSE%$(am__set_depbase) && \
+ %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE%; \
+ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+ else rm -f $$depbase.Tpo; false; fi
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-if %?GENERIC%
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%%SOURCE%
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%%SOURCE%
-else !%?GENERIC%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-endif !%?GENERIC%
+ %VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
?GENERIC?%EXT%.obj:
?!GENERIC?%OBJOBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
-?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+ %VERBOSE%$(am__set_depbase) && \
+ %COMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%); \
+ if test $$? = 0; then $(am__mv) $$depbase.Tpo $$depbase.Po; \
+ else rm -f $$depbase.Tpo; false; fi
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-if %?GENERIC%
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% `$(CYGPATH_W) %SOURCEFLAG%'%SOURCE%'`
-else !%?GENERIC%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-endif !%?GENERIC%
+ %VERBOSE-NODEP%%COMPILE% -c -o $@ %SOURCEFLAG% $$($(CYGPATH_W) %XSOURCE%)
endif !%FASTDEP%
endif %?NONLIBTOOL%
@@ -92,23 +73,14 @@ if %?LIBTOOL%
?GENERIC?%EXT%.lo:
?!GENERIC?%LTOBJ%: %SOURCE%
if %FASTDEP%
-## In fast-dep mode, we can always use -o.
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??!SUBDIROBJ? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
-?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
-?GENERIC??SUBDIROBJ? %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
-?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+ %VERBOSE%$(am__set_depbase) && \
+ %LTCOMPILE% -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ %SOURCEFLAG% %XSOURCE% && \
+ $(am__mv) $$depbase.Tpo $$depbase.Plo
else !%FASTDEP%
if %AMDEP%
- %VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
+ %VERBOSE%source='%SOURCE%' object='$@' libtool=yes @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-## We can always use '-o' with Libtool.
-?GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
-## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+ %VERBOSE-NODEP%%LTCOMPILE% -c -o $@ %SOURCEFLAG% %XSOURCE%
endif !%FASTDEP%
endif %?LIBTOOL%
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 653966f0e..859c6d530 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -347,24 +347,6 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
-?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
-.PHONY: dist-tarZ
-dist-tarZ: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__post_remove_distdir)
-
-?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
-.PHONY: dist-shar
-dist-shar: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
- @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
- $(am__post_remove_distdir)
-
?ZIP?DIST_ARCHIVES += $(distdir).zip
.PHONY: dist-zip
dist-zip: distdir
@@ -374,11 +356,9 @@ dist-zip: distdir
?LZIP?DIST_TARGETS += dist-lzip
?XZ?DIST_TARGETS += dist-xz
-?SHAR?DIST_TARGETS += dist-shar
?BZIP2?DIST_TARGETS += dist-bzip2
?GZIP?DIST_TARGETS += dist-gzip
?ZIP?DIST_TARGETS += dist-zip
-?COMPRESS?DIST_TARGETS += dist-tarZ
endif %?TOPDIR_P%
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index e2d1b669f..0a6d7b527 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -22,40 +22,14 @@
## should never be dependent upon a non-distributed built file.
## Therefore we ensure that %DIRSTAMP% exists in the rule.
?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
-## Back up the info files before running makeinfo. This is the cheapest
-## way to ensure that
-## 1) If the texinfo file shrinks (or if you start using --no-split),
-## you'll not be left with some dead info files lying around -- dead
-## files which would end up in the distribution.
-## 2) If the texinfo file has some minor mistakes which cause makeinfo
-## to fail, the info files are not removed. (They are needed by the
-## developer while he writes documentation.)
-## *.iNN files are used on DJGPP. See the comments in install-info-am
- %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
- rm -rf $$backupdir && mkdir $$backupdir && \
-## If makeinfo is not installed we must not backup the files so
-## 'missing' can do its job and touch $@ if it exists.
- if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
- done; \
- else :; fi && \
-?INSRC? cd "$$am__cwd"; \
- if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
-?!INSRC? -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%; \
-?INSRC??!GENERIC_INFO? -o $@ $(srcdir)/%SOURCE_INFO%; \
-?INSRC??GENERIC_INFO? -o $@ $<; \
- then \
- rc=0; \
-?INSRC? $(am__cd) $(srcdir); \
- else \
- rc=$$?; \
-## Beware that backup info files might come from a subdirectory.
-?INSRC? $(am__cd) $(srcdir) && \
- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
- fi; \
- rm -rf $$backupdir; exit $$rc
+## If the texinfo file has some minor mistakes which cause makeinfo
+## to fail, the info files are not removed.
+ $(AM_V_MAKEINFO)$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
+ %MAKEINFOFLAGS% --no-split -o $@-t \
+?!INSRC? `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%
+?INSRC??!GENERIC_INFO? $(srcdir)/%SOURCE_INFO%
+?INSRC??GENERIC_INFO? $<
+ $(AM_V_at)mv -f $@-t $@
INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index a2a21e667..a72ec1596 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -191,23 +191,11 @@ install-info-am: $(INFO_DEPS)
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$file; then d=.; else d=$(srcdir); fi; \
-## 8+3 filesystems cannot deal with foo.info-N filenames: they all
-## conflict. DJGPP comes with a tool, DJTAR, that will rename these
-## files to foo.iNN while extracting the archive. DJGPP's makeinfo
-## is patched to grok these filenames. However we have to account
-## for the renaming when installing the info files.
-##
-## If $file == foo.info, then $file_i == foo.i. The reason we use two
-## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
-## 'foo' becomes 'foo.i' too.
- file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
- for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
- $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
- if test -f $$ifile; then \
- echo "$$ifile"; \
- else : ; fi; \
- done; \
+ if test -f $$file; then \
+ echo ./$$file; \
+ else \
+ echo $(srcdir)/$$file; \
+ fi; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
@@ -321,11 +309,9 @@ uninstall-info-am:
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
-## DJGPP-style info files. See comment in install-info-am.
- relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
- echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
- rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile"; \
+ rm -f $$relfile; \
else :; fi); \
done
@@ -358,16 +344,14 @@ dist-info: $(INFO_DEPS)
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
- if test -f $$base; then d=.; else d=$(srcdir); fi; \
- base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
- for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
- if test -f $$file; then \
-## Strip leading '$$d/'.
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f "$(distdir)/$$relfile" || \
- cp -p $$file "$(distdir)/$$relfile"; \
- else :; fi; \
- done; \
+ if test -f $$base; then \
+ file=./$$base; \
+ else \
+ file=$(srcdir)/$$base; \
+ fi; \
+ if test -f $$file && test ! -f "$(distdir)/$$base"; then \
+ cp -p $$file "$(distdir)/$$base"; \
+ fi; \
done
endif %?LOCAL-TEXIS%
@@ -397,12 +381,7 @@ clean-aminfo:
.PHONY maintainer-clean-am: maintainer-clean-aminfo
maintainer-clean-aminfo:
- @list='$(INFO_DEPS)'; for i in $$list; do \
-## .iNN files are DJGPP-style info files.
- i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
- echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
+ -test -z "$(INFO_DEPS)" || rm -f $(INFO_DEPS)
## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
## above for details.
?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
diff --git a/lib/depcomp b/lib/depcomp
index 5ff3c6feb..4527c6411 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -251,41 +251,6 @@ hp)
exit 1
;;
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -ne 0; then
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like '#:fec' to the end of the
- # dependency line.
- tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
- | tr "$nl" ' ' >> "$depfile"
- echo >> "$depfile"
- # The second pass generates a dummy entry for each header file.
- tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- make_dummy_depfile
- fi
- rm -f "$tmpdepfile"
- ;;
-
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
diff --git a/lib/ylwrap b/lib/ylwrap
index 5ca021feb..4cc3adfba 100755
--- a/lib/ylwrap
+++ b/lib/ylwrap
@@ -111,14 +111,6 @@ case $input in
esac
input_rx=`get_dirname "$input" | quote_for_sed`
-# Since DOS filename conventions don't allow two dots,
-# the DOS version of Bison writes out y_tab.c instead of y.tab.c
-# and y_tab.h instead of y.tab.h. Test to see if this is the case.
-y_tab_nodot=false
-if test -f y_tab.c || test -f y_tab.h; then
- y_tab_nodot=true
-fi
-
# The parser itself, the first file, is the destination of the .y.c
# rule in the Makefile.
parser=$1
@@ -138,13 +130,6 @@ while test $# -ne 0; do
break
fi
from=$1
- # Handle y_tab.c and y_tab.h output by DOS
- if $y_tab_nodot; then
- case $from in
- "y.tab.c") from=y_tab.c;;
- "y.tab.h") from=y_tab.h;;
- esac
- fi
shift
to=$1
shift
diff --git a/m4/amversion.m4 b/m4/amversion.m4
index a843427a4..1b14af5d2 100644
--- a/m4/amversion.m4
+++ b/m4/amversion.m4
@@ -12,10 +12,10 @@
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15a'
+[am__api_version='1.99a'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15a], [],
+m4_if([$1], [1.99a], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15a])dnl
+[AM_AUTOMAKE_VERSION([1.99a])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/m4/depend.m4 b/m4/depend.m4
index 3b1d4b889..f5dce4ec0 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -160,10 +160,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
+AC_DEFUN([AM_SET_DEPDIR], [AC_SUBST([DEPDIR], [.deps])])
# AM_DEP_TRACK
diff --git a/m4/init.m4 b/m4/init.m4
index f788134a1..4c6da3e18 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -28,6 +28,8 @@ m4_defn([AC_PROG_CC])
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.65])dnl
+dnl Without this, packages using Gettext 0.18.2 might break horribly.
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -85,16 +87,10 @@ AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-# For better backward compatibility. To be removed once Automake 1.9.x
-# dies out for good. For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
-AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
diff --git a/m4/local.mk b/m4/local.mk
index e56d6a211..b5d751a25 100644
--- a/m4/local.mk
+++ b/m4/local.mk
@@ -36,13 +36,11 @@ dist_automake_ac_DATA = \
%D%/gcj.m4 \
%D%/init.m4 \
%D%/install-sh.m4 \
- %D%/lead-dot.m4 \
%D%/lex.m4 \
%D%/lispdir.m4 \
%D%/maintainer.m4 \
%D%/make.m4 \
%D%/missing.m4 \
- %D%/mkdirp.m4 \
%D%/obsolete.m4 \
%D%/options.m4 \
%D%/python.m4 \
diff --git a/m4/obsolete.m4 b/m4/obsolete.m4
index 46e067d89..2f9d3a861 100644
--- a/m4/obsolete.m4
+++ b/m4/obsolete.m4
@@ -1,6 +1,5 @@
# -*- Autoconf -*-
-# Obsolete and "removed" macros, that must however still report explicit
-# error messages when used, to smooth transition.
+# Deprecated, obsolescent or and obsolete macros.
#
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
@@ -8,6 +7,14 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])dnl
+AC_DIAGNOSE([obsolete],
+[macro '$0' is deprecated.
+You should use the Autoconf-provided 'AC][_PROG_MKDIR_P' macro instead,
+and use '$(MKDIR_P)' instead of '$(mkdir_p)' in your Makefile.am files.])])
+
AC_DEFUN([AM_CONFIG_HEADER],
[AC_DIAGNOSE([obsolete],
['$0': this macro is obsolete.
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 411f995ec..7223eca6b 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -111,10 +111,10 @@ sc_perl_protos:
$(srcdir)/maintainer/check-perl-protos <$(srcdir)/bin/automake.in
# These check avoids accidental configure substitutions in the source.
-# There are exactly 8 lines that should be modified from automake.in to
+# There are exactly 7 lines that should be modified from automake.in to
# automake, and 9 lines that should be modified from aclocal.in to
# aclocal.
-automake_diff_no = 8
+automake_diff_no = 7
aclocal_diff_no = 9
sc_diff_automake sc_diff_aclocal: in=$($*_in)
sc_diff_automake sc_diff_aclocal: out=$($*_script)
@@ -451,16 +451,12 @@ sc_m4_am_plain_egrep_fgrep:
exit 1; \
fi
-# Prefer 'configure.ac' over the obsolescent 'configure.in' as the name
+# Use 'configure.ac', not the obsolete 'configure.in', as the name
# for configure input files in our testsuite. The latter has been
-# deprecated for several years (at least since autoconf 2.50).
+# deprecated for several years (at least since autoconf 2.50) and
+# support for it will be removed in Automake 2.0.
sc_tests_no_configure_in:
- @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs) \
- | grep -Ev '/backcompat.*\.(sh|tap):' \
- | grep -Ev '/autodist-configure-no-subdir\.sh:' \
- | grep -Ev '/(configure|help)\.sh:' \
- | grep .; \
- then \
+ @if grep -E '\bconfigure\\*\.in\b' $(xtests) $(xdefs); then \
echo "Use 'configure.ac', not 'configure.in', as the name" >&2; \
echo "for configure input files in the test cases above." >&2; \
exit 1; \
diff --git a/old/TODO b/old/TODO
index 5d78c6b34..50460a941 100644
--- a/old/TODO
+++ b/old/TODO
@@ -233,7 +233,7 @@ characters long.
* Make sure that all the files in the distribution are world-readable.
should be able to determine what is built by looking at rules (and
-configure.in). Then built man pages (eg) could automatically be
+configure.ac). Then built man pages (eg) could automatically be
omitted from the distribution.
Right now, targets generated internally (eg "install") are not
@@ -445,7 +445,7 @@ consider auto-including any file that matches "*.in".
must look at mkid to see how it works (for subdir usage)
[ right now, it doesn't. i don't see a simple fix right now ]
-if configure.in not found, move up a directory and try again? This
+if configure.ac not found, move up a directory and try again? This
could eliminate a common source of problems.
[ this is just a bad idea ]
diff --git a/t/aclocal-acdir.sh b/t/aclocal-acdir.sh
index 07c624430..6d5ac9c66 100644
--- a/t/aclocal-acdir.sh
+++ b/t/aclocal-acdir.sh
@@ -15,8 +15,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test aclocal's '--automake-acdir' and '--system-acdir' options. Also
-# check that stuff in the automake acdir takes precedence over stuff in
-# the system acdir.
+# check that stuff in the system acdir takes precedence over stuff in
+# the automake acdir.
. test-init.sh
@@ -65,14 +65,14 @@ $FGREP 'my--macro' configure
rm -rf autom4te*.cache
-# Stuff in automake acdir takes precedence over stuff in system acdir.
+# Stuff in system acdir takes precedence over stuff in automake acdir.
cat > am/bar.m4 <<'END'
AC_DEFUN([MY_MACRO], [am--macro])
END
$ACLOCAL --automake-acdir am --system-acdir sys
$AUTOCONF --force
$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-$FGREP 'my--macro' configure && exit 1 # Just to be sure.
+$FGREP 'my--macro' configure
+$FGREP 'am--macro' configure && exit 1
:
diff --git a/t/aclocal-amflags.sh b/t/aclocal-amflags.sh
index ca89b21a6..2979b2043 100644
--- a/t/aclocal-amflags.sh
+++ b/t/aclocal-amflags.sh
@@ -15,8 +15,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that the obsolescent idiom of setting $(ACLOCAL_AMFLAGS) in
-# Makefile.am still works. Remove this test once support for this
-# obsolescent idiom is removed.
+# Makefile.am is warned against, but still works. Remove this test
+# once support for this obsolescent idiom is removed.
. test-init.sh
@@ -45,7 +45,16 @@ $ACLOCAL -I m4_1 >output 2>&1 || { cat output; exit 1; }
cat output
grep 'found macro' output && exit 1 # Sanity check.
$AUTOCONF
-$AUTOMAKE
+
+for opts in '' '-Wnone -Wobsolete'; do
+ AUTOMAKE_fails $opts
+ grep "Makefile\.am:.*'ACLOCAL_AMFLAGS' is deprecated" stderr
+ grep "Makefile\.am:.*'AC_CONFIG_MACRO_DIRS'.*configure\.ac.*instead" stderr
+done
+
+echo AUTOMAKE_OPTIONS = -Wall -Wno-obsolete >> Makefile.am
+cat Makefile.am # For debugging.
+$AUTOMAKE -Werror
./configure
test -f foo
diff --git a/t/aclocal-deleted-header-aclocal-amflags.sh b/t/aclocal-deleted-header-aclocal-amflags.sh
index 098c9558b..c161b52ff 100644
--- a/t/aclocal-deleted-header-aclocal-amflags.sh
+++ b/t/aclocal-deleted-header-aclocal-amflags.sh
@@ -22,7 +22,10 @@
. test-init.sh
-cat >>configure.ac <<EOF
+cat > configure.ac <<EOF
+AC_INIT([$me], [1.3])
+AM_INIT_AUTOMAKE([-Wno-obsolete])
+AC_CONFIG_FILES([Makefile])
FOO
AC_OUTPUT
EOF
diff --git a/t/aclocal-dirlist.sh b/t/aclocal-dirlist.sh
index 7cea8f9fa..ec933da11 100644
--- a/t/aclocal-dirlist.sh
+++ b/t/aclocal-dirlist.sh
@@ -35,9 +35,9 @@ module=[$1]
AC_SUBST(module)])
END
-cat >dirlist-test/init.m4 <<EOF
-AC_DEFUN([AM_INIT_AUTOMAKE], [I should not be included])
-EOF
+cat >dirlist-test/init.m4 <<'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [Hey, I should be included, really!])
+END
$ACLOCAL --system-acdir acdir
$AUTOCONF
@@ -49,8 +49,6 @@ grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
-# This bug can occur only when we do a VPATH build of Automake
-# but it's OK because VPATH builds are done by 'make distcheck'.
-grep 'I should not be included' configure && exit 1
+$FGREP 'Hey, I should be included, really!' configure
:
diff --git a/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh b/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
index 333d5d1ce..5d21090fe 100644
--- a/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
+++ b/t/aclocal-m4-include-are-scanned-aclocal-amflags.sh
@@ -46,6 +46,7 @@ echo 'AC_DEFUN([ANOTHER_MACRO])' >defs/f.m4
cat >>Makefile.am<<\EOF
ACLOCAL_AMFLAGS = -I defs
+AUTOMAKE_OPTIONS = -Wno-obsolete
testdist1: distdir
test -f $(distdir)/acinclude.m4
test -f $(distdir)/a.m4
diff --git a/t/aclocal-path-precedence.sh b/t/aclocal-path-precedence.sh
index cefdad87c..a96cd86f0 100644
--- a/t/aclocal-path-precedence.sh
+++ b/t/aclocal-path-precedence.sh
@@ -46,10 +46,16 @@ cat > mdir3/bar.m4 << 'END'
AC_DEFUN([BAR_MACRO], [::pass-bar::])
END
-cat > mdir2/quux.m4 << 'END'
-AC_DEFUN([AM_INIT_AUTOMAKE], [::fail-init::])
-AC_DEFUN([AC_PROG_LIBTOOL], [::pass-libtool::])
-AC_DEFUN([AM_GNU_GETTEXT], [::pass-gettext::])
+cat > mdir2/quux-a.m4 << 'END'
+AC_DEFUN([AM_INIT_AUTOMAKE], [::pass-am-init::])
+END
+
+cat > mdir2/quux-b.m4 << 'END'
+AC_DEFUN([AC_PROG_LIBTOOL], [::pass-libtool::])
+END
+
+cat > mdir2/quux-c.m4 << 'END'
+AC_DEFUN([AM_GNU_GETTEXT], [::pass-gettext::])
END
cat > sysdir/libtool.m4 << 'END'
@@ -81,9 +87,9 @@ $FGREP '::pass-bar::' configure
$FGREP '::pass-gettext::' configure
$FGREP '::pass-libtool::' configure
-# Directories in ACLOCAL_PATH shouldn't take precedence over the internal
+# Directories in ACLOCAL_PATH shoul take precedence over the internal
# automake acdir (typically '${prefix}/share/aclocal-${APIVERSION}').
-$FGREP 'am__api_version' configure
+$FGREP '::pass-am-init::' configure
# A final sanity check.
$FGREP '::fail' configure && exit 1
diff --git a/t/autodist-configure-no-subdir.sh b/t/autodist-configure-no-subdir.sh
index f26ad9a33..9a3860c8f 100644
--- a/t/autodist-configure-no-subdir.sh
+++ b/t/autodist-configure-no-subdir.sh
@@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check that 'configure', 'configure.ac' and 'configure.in' are *not*
-# automatically distributed when placed in a subdirectory.
+# Check that 'configure' and 'configure.ac' are *not* automatically
+# distributed when placed in a subdirectory.
# Related to automake bug#7819.
. test-init.sh
@@ -32,12 +32,9 @@ sub/configure:
$(dontbuild)
sub/configure.ac:
$(dontbuild)
-sub/configure.in:
- $(dontbuild)
check-local: distdir
ls -l $(distdir)/sub
test ! -f $(distdir)/sub/configure
- test ! -f $(distdir)/sub/configure.in
test ! -f $(distdir)/sub/configure.ac
END
@@ -49,15 +46,12 @@ configure:
$(dontbuild)
configure.ac:
$(dontbuild)
-configure.in:
- $(dontbuild)
check-local:
echo $(DISTFILES) | grep 'configure' && exit 1; :
echo $(DIST_COMMON) | grep 'configure' && exit 1; :
END
: > sub/configure.ac
-: > sub/configure.in
: > sub/configure
$ACLOCAL
diff --git a/t/ax/distcheck-hook-m4.am b/t/ax/distcheck-hook-m4.am
index 9442a9896..321d3923c 100644
--- a/t/ax/distcheck-hook-m4.am
+++ b/t/ax/distcheck-hook-m4.am
@@ -15,6 +15,8 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
+AUTOMAKE_OPTIONS = -Wno-obsolete
+
distcheck-hook:
@fatal () { echo "$@: $$*" >&2; exit 1; }; \
$(am__cd) $(distdir) && chmod u+w . && mkdir _m4 \
diff --git a/t/backcompat6.sh b/t/backcompat6.sh
index 3c81a55f8..7defb4382 100644
--- a/t/backcompat6.sh
+++ b/t/backcompat6.sh
@@ -15,8 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Backward-compatibility test: try to build and distribute a package
-# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT,
-# and 'configure.in' as autconf input file.
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
# This script can also serve as mild stress-testing for Automake.
# See also the similar test 'backcompat5.test'.
diff --git a/t/compile_f_c_cxx.sh b/t/compile_f_c_cxx.sh
index 8fa80a4b5..c0e4717b5 100644
--- a/t/compile_f_c_cxx.sh
+++ b/t/compile_f_c_cxx.sh
@@ -38,9 +38,18 @@ END
$ACLOCAL
$AUTOMAKE
+$FGREP COMPILE Makefile.in # For debugging.
+
# Look for the macros at the beginning of rules.
-$FGREP "$tab\$(AM_V_CC)\$(COMPILE)" Makefile.in
-$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
+
+sed -e "s|$tab *&& *|$tab|" \
+ -e 's|$(AM_V_CC)||g' \
+ -e 's|$(AM_V_CXX)||g' \
+ -e 's|$(AM_V_F77)||g' \
+ Makefile.in >mk
+diff -u Makefile.in mk || : # For debugging.
+$FGREP "$tab\$(COMPILE)" mk
+$FGREP "$tab\$(CXXCOMPILE)" mk
+$FGREP "$tab\$(F77COMPILE)" mk
:
diff --git a/t/cscope.tap b/t/cscope.tap
index b7fbb210d..2461bcc67 100644
--- a/t/cscope.tap
+++ b/t/cscope.tap
@@ -22,10 +22,8 @@ plan_ 18
ocwd=$(pwd) || fatal_ "getting top-level directory"
-cat > configure.ac << 'END'
-AC_INIT([cscope-test], [1.0])
-AM_INIT_AUTOMAKE([subdir-objects])
-AC_CONFIG_FILES([Makefile sub/Makefile])
+cat >> configure.ac << 'END'
+AC_CONFIG_FILES([sub/Makefile])
AC_SUBST([CC], [who-cares])
AC_SUBST([CXX], [who-cares])
AC_SUBST([FC], [who-cares])
diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh
index e18318061..3b2a7c545 100644
--- a/t/depcomp8a.sh
+++ b/t/depcomp8a.sh
@@ -48,26 +48,7 @@ int bar (void)
END
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-grep '\.P' Makefile.in # For debugging.
-grep '\./\$(DEPDIR)/foo\.Po' Makefile.in
-grep '\./\$(DEPDIR)/bar\.Po' Makefile.in
-grep '/\./\$(DEPDIR)' Makefile.in && exit 1
-
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-cross_compiling || ./zardoz
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
-
-$AUTOMAKE
+$AUTOMAKE -a
grep '\.P' Makefile.in # For debugging.
grep '\./\$(DEPDIR)/foo\.Po' Makefile.in
grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Po' Makefile.in
diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh
index a4d5a77d6..185ae9bf6 100644
--- a/t/depcomp8b.sh
+++ b/t/depcomp8b.sh
@@ -24,16 +24,12 @@ required='cc libtoolize'
cat >> configure.ac << 'END'
AC_PROG_CC
-#x AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
AC_OUTPUT
END
cat > Makefile.am << 'END'
-## FIXME: stop disabling the warnings in the 'unsupported' category
-## FIXME: once the 'subdir-objects' option has been mandatory.
-AUTOMAKE_OPTIONS = -Wno-unsupported
lib_LTLIBRARIES = libzardoz.la
libzardoz_la_SOURCES = foo.c sub/bar.c
END
@@ -45,25 +41,8 @@ echo 'int bar (void) { return 0; }' > sub/bar.c
libtoolize
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-grep '\.P' Makefile.in # For debugging.
-grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in
-grep '\./\$(DEPDIR)/bar\.Plo' Makefile.in
-grep '/\./\$(DEPDIR)' Makefile.in && exit 1
-
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS += subdir-objects >> Makefile.am
+$AUTOMAKE -a
-$AUTOMAKE
grep '\.P' Makefile.in # For debugging.
grep '\./\$(DEPDIR)/foo\.Plo' Makefile.in
grep '[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.Plo' Makefile.in
diff --git a/t/dist-missing-m4.sh b/t/dist-missing-m4.sh
index a721e2789..f6ee5bde6 100644
--- a/t/dist-missing-m4.sh
+++ b/t/dist-missing-m4.sh
@@ -23,6 +23,7 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
m4_pattern_forbid([^MY_])
MY_FOOBAR || exit 1
MY_ZARDOZ || exit 1
@@ -33,9 +34,9 @@ mkdir m4
echo 'AC_DEFUN([MY_FOOBAR], [:])' > m4/foobar.m4
echo 'AC_DEFUN([MY_ZARDOZ], [:])' > m4/zardoz.m4
-echo 'ACLOCAL_AMFLAGS = -I m4' > Makefile.am
+: > Makefile.am
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/dist-shar.sh b/t/dist-shar.sh
index 611480c2c..b12caa2e5 100644
--- a/t/dist-shar.sh
+++ b/t/dist-shar.sh
@@ -14,16 +14,17 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-shar.
+# Trying to use removed option 'dist-shar' should trigger a clear
+# error message.
required='shar unshar'
. test-init.sh
-errmsg='support for shar .*deprecated'
+errmsg='support for shar .*removed'
echo AUTOMAKE_OPTIONS = dist-shar > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
@@ -36,12 +37,7 @@ END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f $distdir.shar.gz
-
:
diff --git a/t/dist-tarZ.sh b/t/dist-tarZ.sh
index c4888facc..0723c9297 100644
--- a/t/dist-tarZ.sh
+++ b/t/dist-tarZ.sh
@@ -14,28 +14,16 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Check support for no-dist-gzip with dist-tarZ.
+# Trying to use removed option 'dist-tarZ' should trigger a clear
+# error message.
. test-init.sh
-# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
-# and is just a dummy script that is not able to actually compress
-# (it can only decompress). So, check that the 'compress' program
-# is actually able to compress input.
-# Note that, at least on GNU/Linux, 'compress' does (and is
-# documented to) exit with status 2 if the output is larger than
-# the input after (attempted) compression; so we need to pass it
-# an input that it can actually reduce in size when compressing.
-for x in 1 2 3 4 5 6 7 8; do
- echo aaaaaaaaaaaaaaaaaaaaa
-done | compress -c >/dev/null \
- || skip_ "cannot find a working 'compress' program"
-
-errmsg=".*legacy .*'compress' .*deprecated"
+errmsg=".*legacy .*'compress'.* removed"
echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
$ACLOCAL
-AUTOMAKE_fails -Wnone -Wobsolete
+AUTOMAKE_fails -Wnone -Wno-error
grep "^Makefile\\.am:1:.*$errmsg" stderr
cat > configure.ac <<END
@@ -48,12 +36,7 @@ END
rm -rf autom4te*.cache
$ACLOCAL
-AUTOMAKE_run -Wno-error
+AUTOMAKE_fails -Wnone -Wno-error
grep "^configure\\.ac:2:.*$errmsg" stderr
-$AUTOCONF
-./configure
-$MAKE distcheck
-test -f dist-tarz-1.0.tar.Z
-
:
diff --git a/t/mkdir_p.sh b/t/distcheck-Tpo.sh
index 36d91fc24..867df7809 100644
--- a/t/mkdir_p.sh
+++ b/t/distcheck-Tpo.sh
@@ -14,42 +14,45 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# AM_INIT_AUTOMAKE should still define $(mkdir_p), for backward
-# compatibility.
+# Ensure that the 'make distcheck'-run distcleancheck does not fail
+# due to a leftover .deps/base.Tpo file when part of a successful build
+# involves a failed attempt to create a .deps/base.Po file.
. test-init.sh
-cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
+cat >> configure.ac <<END
+AC_PROG_CC
AC_OUTPUT
END
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-all-local:
- $(mkdir_p) . dir1/a
- @mkdir_p@ . dir2/b
-check-local: all
- test -d dir1/a
- test -d dir2/b
- test -d dir3/c
- test -d dir3/d
+cat > foo.c <<\END
+#ifndef FAIL
+int main() { return 0; }
+#else
+int x[no_such];
+#endif
END
-mkdir sub
-cat > sub/Makefile.am << 'END'
-# '$(mkdir_p)' should continue to work even in subdir makefiles.
-all-local:
- $(mkdir_p) .. ../dir3/c
- @mkdir_p@ .. ../dir3/d
+cat > Makefile.am <<\END
+TESTS = foo bar.test
+check_PROGRAMS = foo
+EXTRA_DIST= bar.test foo.c
END
-$ACLOCAL
-$AUTOCONF -Werror -Wall
-$AUTOMAKE
+cat > bar.test <<END
+#!/bin/sh
+rm -f foo.o
+$MAKE AM_CFLAGS=-DFAIL foo.o && exit 1
+exit 0
+END
+chmod a+x bar.test
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
./configure
-$MAKE check-local
-$MAKE distcheck
+
+# We can build the distribution.
+run_make -M distcheck
:
diff --git a/t/fort2.sh b/t/fort2.sh
index cba91f9a8..00728d360 100644
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -67,9 +67,18 @@ touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
sub/bonjour.f08 bye.f95 sub/baz.f90
run_make -O -- -n \
- FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08
-# To make it easier to have stricter grepping below.
-sed -e 's/[ ][ ]*/ /g' -e 's/^/ /' -e 's/$/ /' stdout > out
+ FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
+# To make it easier to have stricter grepping below.
+$PERL -e '
+ undef $/;
+ $_ = <>;
+ s/[^\\]\\\n/ /g;
+ s/^/ /;
+ s/\n/ \n /g;
+ s/[ \t]+/ /g;
+ s/\n\s*\z/\n/;
+ print;
+' <stdout >out
cat out
grep ' fake-fc .* --@90 .* hello\.f90 ' out
diff --git a/t/fort4.sh b/t/fort4.sh
index c9459dfff..6f54b6466 100644
--- a/t/fort4.sh
+++ b/t/fort4.sh
@@ -34,6 +34,7 @@ END
cat >bye.f90 <<'END'
program goodbye
call baz
+ call zar
stop
end
END
@@ -46,6 +47,7 @@ END
sed s,foo,bar, foo.f90 > sub/bar.f90
sed s,foo,baz, foo.f90 > sub/baz.f
+sed s,foo,zar, foo.f90 > sub/zardoz.f90
cat >>configure.ac <<'END'
AC_PROG_F77
@@ -59,9 +61,29 @@ END
cat >Makefile.am <<'END'
bin_PROGRAMS = hello goodbye
hello_SOURCES = hello.f foo.f90 sub/bar.f90
-goodbye_SOURCES = bye.f90 sub/baz.f
+goodbye_SOURCES = bye.f90 sub/baz.f sub/zardoz.f90
goodbye_FCFLAGS =
LDADD = $(FCLIBS)
+
+.PHONY: test-obj
+test-obj:
+ ls -l . sub # For debugging.
+ test -f hello.$(OBJEXT)
+ test -f foo.$(OBJEXT)
+ test -f sub/bar.$(OBJEXT)
+ test ! -f bar.$(OBJEXT)
+ test -f goodbye-bye.$(OBJEXT)
+ test ! -f bye.$(OBJEXT)
+ test -f sub/goodbye-zardoz.$(OBJEXT)
+ test ! -f sub/zardoz.$(OBJEXT)
+ test ! -f goodbye-zardoz.$(OBJEXT)
+ test ! -f zardoz.$(OBJEXT)
+## The setting of FCFLAGS should only cause objects deriving from
+## Fortran 90, not Fortran 77, to be renamed.
+ test -f sub/baz.$(OBJEXT)
+ test ! -f sub/goodbye-baz.$(OBJEXT)
+ test ! -f goodbye-baz.$(OBJEXT)
+ test ! -f baz.$(OBJEXT)
END
$ACLOCAL
@@ -73,22 +95,9 @@ $AUTOCONF
# ./configure may exit with status 77 if no compiler is found,
# or if the compiler cannot compile Fortran 90 files).
./configure
-$MAKE
-subobjs=$(echo sub/*.o sub/*.obj)
-test "$subobjs" = 'sub/*.o sub/*.obj'
-$MAKE distcheck
-$MAKE distclean
-echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
-$AUTOMAKE
-./configure
$MAKE
-test ! -e bar.o
-test ! -e bar.obj
-test ! -e baz.o
-test ! -e baz.obj
-test ! -e goodbye-baz.o
-test ! -e goodbye-baz.obj
+$MAKE test-obj
$MAKE distcheck
:
diff --git a/t/fort5.sh b/t/fort5.sh
index 706339dfd..5f9ab8a61 100644
--- a/t/fort5.sh
+++ b/t/fort5.sh
@@ -90,20 +90,17 @@ grep " --tag=FC" Makefile.in
# ./configure may exit with status 77 if no compiler is found,
# or if the compiler cannot compile Fortran 90 files).
./configure
-$MAKE
-subobjs=$(echo sub/*.lo)
-test "$subobjs" = 'sub/*.lo'
-$MAKE distcheck
-# The following will be fixed in a later patch:
-$MAKE distclean
-echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am
-$AUTOMAKE -a
-./configure
$MAKE
+test -f sub/bar.lo
test ! -e bar.lo
+## The setting of FCFLAGS should only cause objects deriving from
+## Fortran 90, not Fortran 77, to be renamed.
+test -f sub/baz.lo
test ! -e baz.lo
+test ! -e sub/libgoodbye_la-baz.lo
test ! -e libgoodbye_la-baz.lo
+
$MAKE distcheck
:
diff --git a/t/gcj.sh b/t/gcj.sh
index 06816f3d1..bbb287dbd 100644
--- a/t/gcj.sh
+++ b/t/gcj.sh
@@ -16,21 +16,50 @@
# Test of compiled java.
+required='gcc gcj'
. test-init.sh
cat >> configure.ac << 'END'
-_AM_DEPENDENCIES([GCJ])
-AC_SUBST([GCJ])
+# FIXME: AM_PROG_GCJ should cause OBJEXT and EXEEXT to be set, but
+# FIXME: it currently does not. See also xfailing test 'gcj6.sh'.
+AC_PROG_CC
+AM_PROG_GCJ
+AC_OUTPUT
END
cat > Makefile.am << 'END'
bin_PROGRAMS = convert
-convert_SOURCES = x/y/convert.java
+convert_SOURCES = $(my_java_source)
+convert_LDFLAGS = --main=convert
+my_java_source = x/y/convert.java
+$(my_java_source):
+ rm -f $@-t $@
+ test -d $(@D) || $(MKDIR_P) $(@D)
+ echo 'public class convert {' >> $@-t
+ echo ' public static void main (String[] args) {' >> $@-t
+ echo ' System.out.println("Hello, World!");' >> $@-t
+ echo ' }' >> $@-t
+ echo '}' >> $@-t
+ chmod a-w $@-t && mv -f $@-t $@
+.PHONY: test-obj
+check-local: test-obj
+test-obj:
+ test -f x/y/convert.$(OBJEXT)
END
$ACLOCAL
$AUTOMAKE
+$FGREP 'x/y/convert.$(OBJEXT)' Makefile.in
-grep '^x/y/convert' Makefile.in
+$AUTOCONF
+./configure
+
+$MAKE
+$MAKE test-obj
+if ! cross_compiling; then
+ ./convert
+ test "$(./convert)" = 'Hello, World!'
+fi
+$MAKE distcheck
:
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index edb131146..3f46945fa 100644
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -29,7 +29,8 @@ echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
# The 'autopoint' script will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo AUTOMAKE_OPTIONS = -Wno-obsolete > Makefile.am
+echo ACLOCAL_AMFLAGS = -I m4 >> Makefile.am
# Prefer autopoint to gettextize, since the latter unconditionally
# requires user interaction to complete; yes, this means confirmation
diff --git a/t/help.sh b/t/help.sh
index 7df39d2ad..f048cd96f 100644
--- a/t/help.sh
+++ b/t/help.sh
@@ -14,8 +14,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Make sure --help and --version work, even when no configure.ac nor
-# configure.in is in the current directory.
+# Make sure --help and --version work, even when no configure.ac is in
+# the current directory.
. test-init.sh
@@ -33,8 +33,7 @@ $ACLOCAL --help
$AUTOMAKE --version
$AUTOMAKE --help
-# Sanity checks: aclocal and automake cannot work without configure.ac
-# nor configure.in.
+# Sanity checks: aclocal and automake cannot work without configure.ac.
$ACLOCAL 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
$FGREP configure.ac stderr
diff --git a/t/subobj4.sh b/t/includes-deprecation.sh
index dd464d934..c46439710 100644
--- a/t/subobj4.sh
+++ b/t/includes-deprecation.sh
@@ -14,37 +14,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Make sure '../foo/foo.cpp' generates a rule.
-# Report from Dave Brolley.
+# Support for $(INCLUDES) is deprecated.
. test-init.sh
-cat >> configure.ac << 'END'
-AC_PROG_CC
-AC_PROG_CXX
-AC_CONFIG_FILES([d1/Makefile d2/Makefile])
-AC_OUTPUT
-END
+echo AC_PROG_CC >> configure.ac
-mkdir d1 d2
+$ACLOCAL
cat > Makefile.am << 'END'
-SUBDIRS = d1 d2
-END
-
-cat > d1/Makefile.am << 'END'
-bin_PROGRAMS = z
-z_SOURCES = ../d2/z.c
+bin_PROGRAMS = foo
+INCLUDES = -DFOO
END
-cat > d2/Makefile.am << 'END'
-END
+AUTOMAKE_fails -Wnone -Wobsolete
+grep "^Makefile\\.am:2:.* 'INCLUDES'.* deprecated.* 'AM_CPPFLAGS'" stderr
+AUTOMAKE_run -Wall -Wno-obsolete
+test ! -s stderr
-: > d2/z.c
+$sleep
-$ACLOCAL
-$AUTOMAKE -Wno-unsupported
+echo 'AC_SUBST([INCLUDES])' >> configure.ac
+sed '/^INCLUDES/d' Makefile.am > t && mv -f t Makefile.am
-grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
+AUTOMAKE_run -Wno-error
+grep "^configure\\.ac:5:.* 'INCLUDES'.* deprecated.* 'AM_CPPFLAGS'" stderr
:
diff --git a/t/lex-line.sh b/t/lex-line.sh
index d93d0deb0..93997de4a 100644
--- a/t/lex-line.sh
+++ b/t/lex-line.sh
@@ -15,15 +15,13 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that automake lex support ensures that lex-generated C
-# files use correct "#line" directives. Try also with the
-# 'subdir-object' option enabled.
+# files use correct "#line" directives.
# See also sister test 'yacc-line.sh'.
required='cc lex'
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AC_PROG_LEX
AC_OUTPUT
@@ -32,7 +30,6 @@ END
mkdir dir sub sub/dir
cat > Makefile.am << 'END'
-SUBDIRS = sub
bin_PROGRAMS = foo bar
LDADD = $(LEXLIB)
bar_LFLAGS = -v
@@ -43,19 +40,6 @@ zardoz.@OBJEXT@: zardoz.c
bar-quux.@OBJEXT@: bar-quux.c
END
-cat > sub/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_PROGRAMS = foo bar
-## We already used $(LEXLIB) above, so try @LEXLIB@ now.
-LDADD = @LEXLIB@
-foo_LFLAGS = -v
-foo_SOURCES = zardoz.l
-bar_SOURCES = dir/quux.l
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
-END
-
cat > zardoz.l << 'END'
%{
#define YY_NO_UNISTD_H 1
@@ -79,10 +63,8 @@ int yywrap (void)
END
cp zardoz.l dir/quux.l
-cp zardoz.l sub/zardoz.l
-cp zardoz.l sub/dir/quux.l
-c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+c_outputs='zardoz.c dir/bar-quux.c'
$ACLOCAL
$AUTOCONF
@@ -104,7 +86,7 @@ for vpath in : false; do
$MAKE
# For debugging,
- ls -l . sub sub/dir
+ ls -l . dir
$EGREP 'line|\.l' $c_outputs
grep '#.*line.*build.*\.l' $c_outputs && exit 1
@@ -118,14 +100,10 @@ for vpath in : false; do
grep "#.*\.l.*\.l" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
- grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c
- grep '#.*line.*"\.\./\.\./sub/zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"\.\./\.\./sub/dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"\.\./dir/quux\.l"' dir/bar-quux.c
else
grep '#.*line.*"zardoz\.l"' zardoz.c
- grep '#.*line.*"dir/quux\.l"' bar-quux.c
- grep '#.*line.*"zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"dir/quux\.l"' dir/bar-quux.c
fi
cd $srcdir
diff --git a/t/libobj20b.sh b/t/libobj20b.sh
index 3a466bf07..c70dfb8bf 100644
--- a/t/libobj20b.sh
+++ b/t/libobj20b.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
-# See also sister tests 'libobj20a.sh' and 'libobj20c.sh'.
+# See also sister test 'libobj20c.sh'.
. test-init.sh
diff --git a/t/libobj20c.sh b/t/libobj20c.sh
index b12eea618..c8200d8b9 100644
--- a/t/libobj20c.sh
+++ b/t/libobj20c.sh
@@ -15,7 +15,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test error reporting for AC_CONFIG_LIBOBJ_DIR.
-# See also sister tests 'libobj20a.sh' and 'libobj20b.sh'.
+# See also sister test 'libobj20b.sh'.
. test-init.sh
diff --git a/t/libtool-macros.sh b/t/libtool-macros.sh
index 903a25d3f..637adb402 100644
--- a/t/libtool-macros.sh
+++ b/t/libtool-macros.sh
@@ -23,8 +23,7 @@
echo "# Automatically generated by $me." > get.sh
echo : >> get.sh
-# The 'libtoolize' script will look into Makefile.am.
-echo ACLOCAL_AMFLAGS = -I m4 > Makefile.am
+echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
if libtoolize --copy --install && test -f m4/libtool.m4; then
echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
@@ -37,7 +36,7 @@ else
mkdir m4
echo AC_PROG_LIBTOOL >> configure.ac
# See below for an explanation about the use the of '-Wno-syntax'.
- if $ACLOCAL -Wno-syntax -I m4 --install && test -f m4/libtool.m4; then
+ if $ACLOCAL -Wno-syntax --install && test -f m4/libtool.m4; then
: # Libtool macros already accessible by default.
else
echo "skip_all_ \"couldn't find or get libtool macros\"" >> get.sh
diff --git a/t/libtool3.sh b/t/libtool3.sh
index 5e5fd0df3..bb783e294 100644
--- a/t/libtool3.sh
+++ b/t/libtool3.sh
@@ -28,10 +28,6 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-AUTOMAKE_OPTIONS = -Wno-unsupported
-
lib_LTLIBRARIES = lib0.la liba/liba.la
lib0_la_SOURCES = 0.c
liba_liba_la_SOURCES = liba/a.c
@@ -79,12 +75,10 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing --copy
-# We need explicit rules to build 1.o and a.lo. Make sure
-# Automake did not output additional rules for 1.lo and and a.lo.
-$FGREP '1.o:' Makefile.in
-$FGREP '1.lo:' Makefile.in && exit 1
-$FGREP 'a.o:' Makefile.in && exit 1
-$FGREP 'a.lo:' Makefile.in
+# We shouldn't need explicit rules.
+grep -v '^\.c' Makefile.in \
+ | $FGREP -v '$(am__dirstamp)' \
+ | $EGREP '\.(o|obj|lo).*:' && exit 1
./configure
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index b49a3ad0f..d234aef48 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -138,6 +138,7 @@ t/amassign.sh \
t/am-config-header.sh \
t/am-prog-cc-stdc.sh \
t/am-prog-cc-c-o.sh \
+t/am-prog-mkdir-p.sh \
t/am-macro-not-found.sh \
t/amopt.sh \
t/amopts-location.sh \
@@ -326,7 +327,6 @@ t/condinc2.sh \
t/condlib.sh \
t/condman2.sh \
t/condman3.sh \
-t/configure.sh \
t/confdeps.sh \
t/conff.sh \
t/conff2.sh \
@@ -433,6 +433,7 @@ t/distcheck-override-infodir.sh \
t/distcheck-pr9579.sh \
t/distcheck-pr10470.sh \
t/distcheck-pr18286.sh \
+t/distcheck-Tpo.sh \
t/dmalloc.sh \
t/doc-parsing-buglets-colneq-subst.sh \
t/doc-parsing-buglets-tabs.sh \
@@ -519,6 +520,7 @@ t/help-silent.sh \
t/help-upc.sh \
t/hfs.sh \
t/implicit.sh \
+t/includes-deprecation.sh \
t/init.sh \
t/init2.sh \
t/dist-install-sh.sh \
@@ -620,7 +622,6 @@ t/libobj16b.sh \
t/libobj17.sh \
t/libobj18.sh \
t/libobj19.sh \
-t/libobj20a.sh \
t/libobj20b.sh \
t/libobj20c.sh \
t/library.sh \
@@ -706,8 +707,6 @@ t/missing-version-mismatch.sh \
t/missing3.sh \
t/am-missing-prog.sh \
t/missing-auxfile-stops-makefiles-creation.sh \
-t/mkdir_p.sh \
-t/mkdirp-deprecation.sh \
t/mkinstall.sh \
t/mkinst2.sh \
t/mkinst3.sh \
@@ -1012,7 +1011,6 @@ t/silent-configsite.sh \
t/silent-nested-vars.sh \
t/silent-custom.sh \
t/src-acsubst.sh \
-t/sourcefile-in-subdir.sh \
t/space.sh \
t/specflg6.sh \
t/specflg7.sh \
@@ -1049,7 +1047,6 @@ t/subdir-distclean.sh \
t/subdir-keep-going-pr12554.sh \
t/subobj.sh \
t/subobj2.sh \
-t/subobj4.sh \
t/subobj5.sh \
t/subobj6.sh \
t/subobj7.sh \
@@ -1211,6 +1208,7 @@ t/txinfo-no-clutter.sh \
t/txinfo-no-extra-dist.sh \
t/txinfo-no-installinfo.sh \
t/txinfo-no-repeated-targets.sh \
+t/txinfo-no-split.sh \
t/txinfo-other-suffixes.sh \
t/txinfo-override-infodeps.sh \
t/txinfo-override-texinfo-tex.sh \
@@ -1225,11 +1223,6 @@ t/txinfo-vtexi2.sh \
t/txinfo-vtexi3.sh \
t/txinfo-vtexi4.sh \
t/txinfo-without-info-suffix.sh \
-t/txinfo19.sh \
-t/txinfo23.sh \
-t/txinfo24.sh \
-t/txinfo25.sh \
-t/txinfo28.sh \
t/transform.sh \
t/transform2.sh \
t/transform3.sh \
diff --git a/t/ltlibsrc.sh b/t/ltlibsrc.sh
index 1ca9b71a9..225330944 100644
--- a/t/ltlibsrc.sh
+++ b/t/ltlibsrc.sh
@@ -33,12 +33,19 @@ AM_LDFLAGS = -module
pkglib_LTLIBRARIES = zoo.d/bar.la old.la
noinst_LTLIBRARIES = foo.la zoo.d/old2.la
-$(srcdir)/zoo_d_old2_la.c: $(srcdir)/old_la.c
+zoo_d_old2_la.c: $(srcdir)/old_la.c
cp $(srcdir)/old_la.c $@
AUTOMAKE_OPTIONS = -Wno-unsupported
END
+if useless_vpath_rebuild; then
+ unindent >> Makefile.am <<'END'
+ # Work around a known FreeBSD make issues in VPATH builds.
+ DISTCLEANFILES = zoo_d_old2_la.c
+END
+fi
+
cat > foo.c << 'END'
int foo (void)
{
diff --git a/t/mdate5.sh b/t/mdate5.sh
index 9426e53eb..cabcee339 100644
--- a/t/mdate5.sh
+++ b/t/mdate5.sh
@@ -21,25 +21,36 @@ am_create_testdir=empty
get_shell_script mdate-sh
-set x $(./mdate-sh mdate-sh)
-shift
-echo "$*" # For debugging.
-
-# Check that mdate output looks like a date:
-test $# = 3
-case $1$3 in *[!0-9]*) exit 1;; esac
-test $1 -lt 32
-# Hopefully automake will be obsolete in 80 years ;-)
-case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
-case $2 in
- January|February|March|April|May|June|July|August) ;;
- September|October|November|December) ;;
- *) exit 1
-esac
-
-# Stricter checks on the year required a POSIX date(1) command.
-if year=$(date +%Y) && test $year -gt 2010; then
- test $year = $3 || exit 1
-fi
+year=$(date +%Y) && test $year -gt 2010 || year=NONE
+
+do_checks ()
+{
+ set x $(./mdate-sh mdate-sh)
+ shift
+ echo "$*" # For debugging.
+
+ # Check that mdate output looks like a date.
+ test $# = 3 || exit 1
+ case $1$3 in *[!0-9]*) exit 1;; esac
+ test $1 -lt 32 || exit 1
+ # Hopefully automake will be obsolete in 80 years ;-)
+ case $3 in 20[0-9][0-9]) :;; *) exit 1;; esac
+ case $2 in
+ January|February|March|April|May|June|July|August) ;;
+ September|October|November|December) ;;
+ *) exit 1
+ esac
+
+ # Stricter checks on the year require a POSIX date(1) command.
+ test $year = NONE || test $year = $3 || exit 1
+}
+
+TIME_STYLE=; unset TIME_STYLE
+do_checks
+
+# This setting, when honored by GNU ls, used to cause an infinite
+# loop in mdate-sh.
+TIME_STYLE="+%Y-%m-%d %H:%M:%S"; export TIME_STYLE
+do_checks
:
diff --git a/t/pluseq5.sh b/t/pluseq5.sh
index 8c4d7ceac..145287540 100644
--- a/t/pluseq5.sh
+++ b/t/pluseq5.sh
@@ -24,9 +24,9 @@ END
cat > Makefile.am << 'END'
if CHECK
-INCLUDES = abc
+AM_CPPFLAGS = abc
endif
-INCLUDES += def
+AM_CPPFLAGS += def
END
$ACLOCAL
@@ -34,10 +34,10 @@ AUTOMAKE_fails
# We expect the following diagnostic:
#
-# Makefile.am:4: cannot apply '+=' because 'INCLUDES' is not defined in
+# Makefile.am:4: cannot apply '+=' because 'AM_CPPFLAGS' is not defined in
# Makefile.am:4: the following conditions:
# Makefile.am:4: !CHECK
-# Makefile.am:4: either define 'INCLUDES' in these conditions, or use
+# Makefile.am:4: either define 'AM_CPPFLAGS' in these conditions, or use
# Makefile.am:4: '+=' in the same conditions as the definitions.
# Is !CHECK mentioned?
@@ -45,16 +45,4 @@ grep ':.*!CHECK$' stderr
# Is there only one missing condition?
test $(grep -c ': ' stderr) -eq 1
-# By the way, Automake should suggest using AM_CPPFLAGS,
-# because INCLUDES is an obsolete name.
-grep AM_CPPFLAGS stderr
-
-# A way to suppress the obsolete warning is to use
-# -Wno-obsolete:
-echo 'AUTOMAKE_OPTIONS = -Wno-obsolete' >> Makefile.am
-AUTOMAKE_fails
-grep AM_CPPFLAGS stderr && exit 1
-# !CHECK should still be mentioned.
-grep ':.*!CHECK$' stderr
-
:
diff --git a/t/pr401.sh b/t/pr401.sh
index b0c45cad8..77c240120 100644
--- a/t/pr401.sh
+++ b/t/pr401.sh
@@ -103,17 +103,6 @@ test ! -e lib/lib
$MAKE distcheck
## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @LIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
-
-
-## -------------------------------------------- ##
## Test using LIBOBJS from a sibling directory. ##
## -------------------------------------------- ##
diff --git a/t/pr401b.sh b/t/pr401b.sh
index f6a7fa2b2..4dc3df650 100644
--- a/t/pr401b.sh
+++ b/t/pr401b.sh
@@ -103,15 +103,6 @@ $AUTOMAKE -a
test ! -e lib/lib
$MAKE distcheck
-## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @LTLIBOBJS@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
## ---------------------------------------------- ##
## Test using LTLIBOBJS from a sibling directory. ##
diff --git a/t/pr401c.sh b/t/pr401c.sh
index e1cea4ee6..e6369a4b5 100644
--- a/t/pr401c.sh
+++ b/t/pr401c.sh
@@ -104,16 +104,6 @@ $AUTOMAKE
test ! -e lib/lib
$MAKE distcheck
-## -------------------------------------------- ##
-## Error message with usage in wrong directory. ##
-## -------------------------------------------- ##
-
-mv -f src/Makefile.am src/t
-sed 's/LDADD = .*/LDADD = @ALLOCA@/' src/t > src/Makefile.am
-AUTOMAKE_fails
-grep 'cannot be used outside.*lib' stderr
-mv -f src/t src/Makefile.am
-
## ------------------------------------------- ##
## Test using ALLOCA from a sibling directory. ##
diff --git a/t/remake-deleted-m4-file.sh b/t/remake-deleted-m4-file.sh
index ad9750f9b..b7d3bc256 100644
--- a/t/remake-deleted-m4-file.sh
+++ b/t/remake-deleted-m4-file.sh
@@ -25,10 +25,11 @@
cat >> configure.ac <<'END'
FOO_MACRO
AC_OUTPUT
+dnl Deliberately put this late, for better coverage.
+AC_CONFIG_MACRO_DIR([m4])
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -46,7 +47,7 @@ cat > m4/bar.m4 <<END
AC_DEFUN([BAR_MACRO], [$macro_value])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-gnulib-add-acsubst.sh b/t/remake-gnulib-add-acsubst.sh
index 3f37f06f8..f23fd719d 100644
--- a/t/remake-gnulib-add-acsubst.sh
+++ b/t/remake-gnulib-add-acsubst.sh
@@ -26,12 +26,12 @@ required=cc
cat >> configure.ac <<'END'
AC_PROG_CC
+AC_CONFIG_MACRO_DIRS([m4])
MY_MACROS
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = foo.h
@@ -70,7 +70,7 @@ int main (void) { return 0; }
typedef int checkfoo[1 - 2 * (foo != 42)];
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-gnulib-add-header.sh b/t/remake-gnulib-add-header.sh
index 8f00063fb..b1c2cd30e 100644
--- a/t/remake-gnulib-add-header.sh
+++ b/t/remake-gnulib-add-header.sh
@@ -25,6 +25,7 @@ required=cc
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
@@ -32,7 +33,6 @@ AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
@@ -80,7 +80,7 @@ FILE *f;
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
diff --git a/t/remake-gnulib-remove-header.sh b/t/remake-gnulib-remove-header.sh
index ba1ade78f..3eae42954 100644
--- a/t/remake-gnulib-remove-header.sh
+++ b/t/remake-gnulib-remove-header.sh
@@ -26,6 +26,7 @@ required=cc
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([.])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC
MY_MACROS
@@ -33,7 +34,6 @@ AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I .
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
BUILT_SOURCES = $(STDIO_H)
@@ -79,7 +79,7 @@ FILE *f;
int main () { return 0; }
END
-$ACLOCAL -I .
+$ACLOCAL
$AUTOHEADER
$AUTOMAKE
$AUTOCONF
diff --git a/t/remake-moved-m4-file.sh b/t/remake-moved-m4-file.sh
index 98e17d5eb..2f3bce4e7 100644
--- a/t/remake-moved-m4-file.sh
+++ b/t/remake-moved-m4-file.sh
@@ -21,11 +21,12 @@
cat >> configure.ac <<'END'
MY_MACRO
+AC_CONFIG_MACRO_DIRS([d1])
+AC_CONFIG_MACRO_DIRS([d2 d3])
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I d1 -I d2 -I d3
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -41,7 +42,7 @@ cat > d1/foo.m4 <<'END'
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I d1
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-file.sh b/t/remake-renamed-m4-file.sh
index 57e199488..616de2fba 100644
--- a/t/remake-renamed-m4-file.sh
+++ b/t/remake-renamed-m4-file.sh
@@ -19,12 +19,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -40,7 +40,7 @@ cat > m4/foo.m4 <<'END'
AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-macro-and-file.sh b/t/remake-renamed-m4-macro-and-file.sh
index 72adcc640..c839e4c4c 100644
--- a/t/remake-renamed-m4-macro-and-file.sh
+++ b/t/remake-renamed-m4-macro-and-file.sh
@@ -21,12 +21,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -42,7 +42,7 @@ cat > m4/foo.m4 <<'END'
AC_DEFUN([FOO_MACRO], [the_answer=42; AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/remake-renamed-m4-macro.sh b/t/remake-renamed-m4-macro.sh
index 4bd9edb5d..cb8462f7b 100644
--- a/t/remake-renamed-m4-macro.sh
+++ b/t/remake-renamed-m4-macro.sh
@@ -20,12 +20,12 @@
. test-init.sh
cat >> configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
MY_MACRO
AC_OUTPUT
END
cat > Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
.PHONY: test
test:
test '$(the_answer)' -eq 42
@@ -42,7 +42,7 @@ AC_DEFUN([FOO_1], [the_answer=42
AC_SUBST([the_answer])])
END
-$ACLOCAL -I m4
+$ACLOCAL
$AUTOCONF
$AUTOMAKE
diff --git a/t/silent-nested-vars.sh b/t/silent-nested-vars.sh
index c62a15c41..966ea9ab0 100644
--- a/t/silent-nested-vars.sh
+++ b/t/silent-nested-vars.sh
@@ -67,7 +67,7 @@ case $1 in
done ;;
esac
-nested_var_pat='^[^#].*\$([^)]*\$'
+nested_var_pat='^[^#].*[^$]\$([^)]*\$'
if
case $makefile in
-) printf '%s\n' "$makerules" | grep "$nested_var_pat";;
diff --git a/t/subobj-pr13928-more-langs.sh b/t/subobj-pr13928-more-langs.sh
index 15bdd4ebe..0095f761e 100644
--- a/t/subobj-pr13928-more-langs.sh
+++ b/t/subobj-pr13928-more-langs.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2017 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/t/subobj.sh b/t/subobj.sh
index c5bc546ee..91349d72b 100644
--- a/t/subobj.sh
+++ b/t/subobj.sh
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-# Test of subdir objects with C and C++.
+# Grepping checks on subdir objects with C and C++.
. test-init.sh
@@ -42,36 +42,6 @@ dream_SOURCES = generic/b.c more/r.y
bin_PROGRAMS = dream
END
-AUTOMAKE_fails
-grep "^Makefile\.am:3:.*'generic/a\.c'.* in a subdirectory" stderr
-grep "^Makefile\.am:[34]:.*'another/z\.cxx'.* in a subdirectory" stderr
-grep "^sub/Makefile\.am:1:.*'generic/b\.c'.* in a subdirectory" stderr
-grep "option 'subdir-objects' is disabled" stderr
-# Verbose tips should be given, but not too many times.
-for msg in \
- "possible forward-incompatibility" \
- "advi[sc]e.* 'subdir-objects' option throughout" \
- "unconditionally.* object file.* same subdirectory" \
-; do
- test $(grep -c "$msg" stderr) -eq 1
-done
-
-# Guard against stupid typos.
-grep 'subdir-object([^s]|$)' stderr && exit 1
-
-$AUTOMAKE -Wno-unsupported
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
-AUTOMAKE_fails
-grep "^Makefile\.am" stderr && exit 1
-grep "^sub/Makefile\.am:.*'generic/b\.c'.* in a subdirectory" stderr
-grep "option 'subdir-objects' is disabled" stderr
-
-sed 's/^AM_INIT_AUTOMAKE/&([subdir-objects])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
-$ACLOCAL --force
-$AUTOMAKE
-
rm -f compile
$AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
diff --git a/t/subobj11a.sh b/t/subobj11a.sh
index 6b8f2d983..06a0c14e9 100644
--- a/t/subobj11a.sh
+++ b/t/subobj11a.sh
@@ -56,14 +56,8 @@ $AUTOMAKE -a
./configure --enable-dependency-tracking
-depdir=$(sed -n 's/^ *DEPDIR *= *//p' Makefile)
-if test x"$depdir" != x; then
- depdir=src/$depdir
-else
- echo "$me: cannot extract value of DEPDIR from Makefile" >&2
- exit 1
-fi
-
+$MAKE
+depdir=src/.deps
ls -l "$depdir"
test -f "$depdir"/foo.Po
diff --git a/t/subpkg-yacc.sh b/t/subpkg-yacc.sh
index 485337264..3997175ab 100644
--- a/t/subpkg-yacc.sh
+++ b/t/subpkg-yacc.sh
@@ -20,13 +20,17 @@
required='cc yacc'
. test-init.sh
-cat >>configure.ac <<'END'
+cat > configure.ac <<'END'
+AC_INIT([suya], [0.5a], [automake-bug@gnu.org])
+AM_INIT_AUTOMAKE([foreign -Wall])
AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
AC_CONFIG_SUBDIRS([lib])
AC_OUTPUT
END
cat >Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-override
SUBDIRS = lib
bin_PROGRAMS = MU
MU_LDADD = lib/liblib.a
@@ -106,14 +110,18 @@ EOF
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -Wno-override
+$AUTOMAKE
+test ! -e ylwrap
+test ! -e ar-lib
cd lib
$ACLOCAL
$AUTOCONF
$AUTOHEADER
-$AUTOMAKE -Wno-override --add-missing
+$AUTOMAKE --add-missing
cd ..
+test -f ylwrap
+test -f ar-lib
./configure
diff --git a/t/subpkg.sh b/t/subpkg.sh
index d6351b100..6ffee36c4 100644
--- a/t/subpkg.sh
+++ b/t/subpkg.sh
@@ -23,7 +23,7 @@ mkdir m4
cat >m4/foo.m4 <<'EOF'
AC_DEFUN([FOO],[
- AC_PROG_CC
+ AC_REQUIRE([AC_PROG_CC])
AC_OUTPUT
])
EOF
@@ -102,7 +102,10 @@ $AUTOHEADER
$AUTOMAKE -Wno-override --add-missing
cd ..
-./configure
+./configure >stdout || { cat stdout; exit 1; }
+cat stdout
+$FGREP "checking whether $CC understands -c and -o together" stdout
+
$MAKE
$MAKE distcheck
test ! -e subpack-1 # Make sure distcheck cleans up after itself.
diff --git a/t/txinfo-clean.sh b/t/txinfo-clean.sh
index 9c1a23098..fe645224b 100644
--- a/t/txinfo-clean.sh
+++ b/t/txinfo-clean.sh
@@ -15,7 +15,6 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
-# Similar to txinfo25.sh.
required='makeinfo tex texi2dvi dvips'
. test-init.sh
diff --git a/t/txinfo-makeinfo-error-no-clobber.sh b/t/txinfo-makeinfo-error-no-clobber.sh
index b8d966dab..8b225e904 100644
--- a/t/txinfo-makeinfo-error-no-clobber.sh
+++ b/t/txinfo-makeinfo-error-no-clobber.sh
@@ -45,10 +45,6 @@ $AUTOCONF
./configure
$MAKE
-# Feign more info files.
-: > main.info-1
-: > sub/main.info-1
-
# Break main.texi.
$sleep
cp main.texi main.old
@@ -64,15 +60,12 @@ END
# makeinfo will bail out, but we should conserve the old info files.
$MAKE && exit 1
test -f main.info
-test -f main.info-1
# Restore main.texi, and break sub/main.texi.
cp main.texi sub/main.texi
mv main.old main.texi
$MAKE && exit 1
test -f main.info
-test ! -e main.info-1
test -f sub/main.info
-test -f sub/main.info-1
:
diff --git a/t/txinfo-no-extra-dist.sh b/t/txinfo-no-extra-dist.sh
index 2e89cfb4a..3844d7d86 100644
--- a/t/txinfo-no-extra-dist.sh
+++ b/t/txinfo-no-extra-dist.sh
@@ -15,7 +15,10 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Test to ensure that a ".info~" or ".info.bak" file doesn't end up
-# in the distribution. Bug report from Greg McGary.
+# in the distribution or the installation. Bug report from Greg McGary.
+# Also make sure that "split" info files (today no longer supported,
+# see automake bug#13351) are not distributed nor installed. See
+# automake bug#12320.
. test-init.sh
@@ -25,14 +28,33 @@ END
cat > Makefile.am << 'END'
info_TEXINFOS = textutils.texi subdir/main.texi
-test: distdir
+
+test-dist: distdir
+ test -f $(distdir)/textutils.info
+ test -f $(distdir)/subdir/main.info
@echo DISTFILES = $(DISTFILES)
- @case '$(DISTFILES)' in *'~'*|*'.bak'*) exit 1;; *) exit 0;; esac
- st=0; \
+ @case '$(DISTFILES)' in \
+ *'~'*|*'.bak'*|*'.info-'*|*.i[0-9]*) exit 1;; \
+ *) exit 0;; \
+ esac
+ @st=0; \
find $(distdir) | grep '~' && st=1; \
find $(distdir) | grep '\.bak' && st=1; \
+ find $(distdir) | grep '\.info-' && st=1; \
+ find $(distdir) | grep '\.i[0-9]' && st=1; \
+ exit $$st
+
+test-inst: install
+ test -f '$(infodir)/textutils.info'
+ test -f '$(infodir)/main.info'
+ @st=0; \
+ find '$(prefix)' | grep '~' && st=1; \
+ find '$(prefix)' | grep '\.bak' && st=1; \
+ find '$(prefix)' | grep '\.info-' && st=1; \
+ find '$(prefix)' | grep '\.i[0-9]' && st=1; \
exit $$st
-PHONY: test
+
+PHONY: test-dist test-inst
END
: > texinfo.tex
@@ -44,16 +66,26 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE
-./configure
-: > textutils.info
-: > subdir/main.info
-: > textutils.info~
-: > textutils.info.bak
-: > subdir/main.info~
-: > subdir/main.info.bak
-$MAKE test
+./configure --prefix="$(pwd)/_inst"
+info_suffixes='info info-0 info-1 info-2 i00 i01 i23 info.bak info~'
+for suf in $info_suffixes; do
+ for base in textutils subdir/main; do
+ : > $base.$suf
+ done
+done
+ls -l . subdir # For debugging.
+$MAKE test-dist
+$MAKE test-inst
$MAKE maintainer-clean
-test -f subdir/main.info~
-test -f subdir/main.info.bak
+
+for suf in $info_suffixes; do
+ for base in textutils subdir/main; do
+ if test "$suf" = info; then
+ test ! -e $base.$suf
+ else
+ test -f $base.$suf
+ fi
+ done
+done
:
diff --git a/t/warnings-obsolete-default.sh b/t/warnings-obsolete-default.sh
index e95dd6b6e..82bdb166d 100644
--- a/t/warnings-obsolete-default.sh
+++ b/t/warnings-obsolete-default.sh
@@ -22,16 +22,11 @@
# We want (almost) complete control over automake options.
AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror"
-echo AC_PROG_CC >> configure.ac
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = foo
-INCLUDES = -Ibar
-END
+echo ACLOCAL_AMFLAGS = > Makefile.am
$ACLOCAL
AUTOMAKE_fails
-grep '^Makefile\.am:2:.*INCLUDES.*AM_CPPFLAGS' stderr
+grep '^Makefile\.am:1:.*ACLOCAL_AMFLAGS.*deprecated' stderr
# Check that we can override warnings about obsolete stuff.
$AUTOMAKE -Wno-obsolete
diff --git a/t/warnopts.sh b/t/warnopts.sh
index 003e44ef6..d964d50a8 100644
--- a/t/warnopts.sh
+++ b/t/warnopts.sh
@@ -20,6 +20,7 @@
cat >>configure.ac <<END
AC_CONFIG_FILES([sub/Makefile])
+AM_CONDITIONAL([COND_FALSE], [false])
AC_OUTPUT
END
@@ -28,47 +29,42 @@ mkdir sub
# These two Makefile contain the same errors, but have different
# warnings disabled.
-cat >Makefile.am <<END
-AUTOMAKE_OPTIONS = -Wno-obsolete
-INCLUDES = -Ifoo
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = -Wno-unsupported
+if COND_FALSE
+AUTOMAKE_OPTIONS += no-dependencies
+endif
foo_SOURCES = unused
SUBDIRS = sub
END
-cat >sub/Makefile.am <<END
+cat > sub/Makefile.am << 'END'
AUTOMAKE_OPTIONS = -Wno-syntax
-INCLUDES = -Ifoo
+if COND_FALSE
+AUTOMAKE_OPTIONS += no-dependencies
+endif
foo_SOURCES = unused
END
$ACLOCAL
AUTOMAKE_fails
# The expected diagnostic is
-# Makefile.am:3: warning: variable 'foo_SOURCES' is defined but no program or
-# library has 'foo' as canonical name (possible typo)
-# sub/Makefile.am:2: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS'
+# automake: warnings are treated as errors
+# Makefile.am:5: warning: variable 'foo_SOURCES' is defined but no program or
+# Makefile.am:5: library has 'foo' as canonical name (possible typo)
+# sub/Makefile.am:1: warning: 'AUTOMAKE_OPTIONS' cannot have conditional contents
grep '^Makefile.am:.*foo_SOURCES' stderr
-grep '^sub/Makefile.am:.*INCLUDES' stderr
+grep '^sub/Makefile.am:.*AUTOMAKE_OPTIONS' stderr
grep '^sub/Makefile.am:.*foo_SOURCES' stderr && exit 1
-grep '^Makefile.am:.*INCLUDES' stderr && exit 1
+grep '^Makefile.am:.*AUTOMAKE_OPTIONS' stderr && exit 1
# Only three lines of warnings.
-test $(grep -v 'warnings are treated as errors' stderr | wc -l) -eq 3
+test $(grep -v 'warnings are treated as errors' stderr | wc -l) = 3
-# On fast machines the autom4te.cache created during the above run of
-# $AUTOMAKE is likely to have the same time stamp as the configure.ac
-# created below; thus causing traces for the old configure.ac to be
-# used. We could do '$sleep', but it's faster to erase the
-# directory. (Erase autom4te*.cache, not autom4te.cache, because some
-# bogus installations of Autoconf use a versioned cache).
rm -rf autom4te*.cache
# If we add a global -Wnone, all warnings should disappear.
-cat >configure.ac <<END
-AC_INIT([warnopts], [1.0])
-AM_INIT_AUTOMAKE([-Wnone])
-AC_CONFIG_FILES([Makefile sub/Makefile])
-AC_OUTPUT
-END
+sed 's/^AM_INIT_AUTOMAKE/AM_INIT_AUTOMAKE([-Wnone])/' configure.ac > t
+mv -f t configure.ac
$ACLOCAL
$AUTOMAKE
diff --git a/t/werror2.sh b/t/werror2.sh
index 2605f3c4e..ea638d771 100644
--- a/t/werror2.sh
+++ b/t/werror2.sh
@@ -37,7 +37,6 @@ $MAKE
cat >Makefile.am <<END
AUTOMAKE_OPTIONS = -Werror
-INCLUDES = -Ifoo
foo_SOURCES = unused
END
diff --git a/t/xsource.sh b/t/xsource.sh
index b0b503440..69af901d6 100644
--- a/t/xsource.sh
+++ b/t/xsource.sh
@@ -21,18 +21,22 @@
cat > Makefile.am << 'END'
bin_PROGRAMS = zardoz
-zardoz_SOURCES = z.c x/z.c
+lib_LTLIBRARIES = libfoo.la
+zardoz_SOURCES = z.c
+libfoo_la_SOURCES = z.c
END
+: > ltmain.sh
+: > config.guess
+: > config.sub
+
cat >> configure.ac << 'END'
AC_PROG_CC
+AC_SUBST([LIBTOOL], [unused])
END
-mkdir x
-
-: > z.c
-: > x/z.c
-
$ACLOCAL
AUTOMAKE_fails
-$FGREP 'z.$(OBJEXT)' stderr
+$FGREP "object 'z.\$(OBJEXT)' created both with libtool and without" stderr
+
+:
diff --git a/t/yacc-grepping2.sh b/t/yacc-grepping2.sh
index 71be64dbe..f86c49916 100644
--- a/t/yacc-grepping2.sh
+++ b/t/yacc-grepping2.sh
@@ -24,57 +24,33 @@ AC_PROG_CC
AC_PROG_YACC
END
-cat > Makefile.am << 'END'
-bin_PROGRAMS = maude
-maude_SOURCES = sub/maude.y
-END
-
-mkdir sub
-
-: > sub/maude.y
-
$ACLOCAL
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-
-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
$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.
+## A particularly tricky case.
maude_YFLAGS = -d
END
-# FIXME: stop disabling the warnings in the 'unsupported' category
-# FIXME: once the 'subdir-objects' option has been mandatory.
-$AUTOMAKE -a -Wno-unsupported
-
+$AUTOMAKE -a
+grep '^sub/maude-maude\.c:.*sub/maude\.y' Makefile.in
# 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
diff --git a/t/yacc-line.sh b/t/yacc-line.sh
index 6bf349f17..326ff8a96 100644
--- a/t/yacc-line.sh
+++ b/t/yacc-line.sh
@@ -15,43 +15,26 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Check that automake yacc support ensures that yacc-generated C
-# files use correct "#line" directives. Try also with the
-# 'subdir-object' option enabled.
-# See also sister test 'lex-line.sh'.
+# files use correct "#line" directives.
+# See also sister test 'lex-line.test'.
required='cc yacc'
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AC_PROG_YACC
AC_OUTPUT
END
-mkdir dir sub sub/dir
+mkdir dir
cat > Makefile.am << 'END'
-SUBDIRS = sub
-bin_PROGRAMS = foo bar
-AM_YFLAGS = -d
-bar_YFLAGS =
+noinst_PROGRAMS = foo bar baz
+baz_YFLAGS = -d
foo_SOURCES = zardoz.y
bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-zardoz.@OBJEXT@: zardoz.c
-bar-quux.@OBJEXT@: bar-quux.c
-END
-
-cat > sub/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_PROGRAMS = foo bar
-foo_YFLAGS = -d
-foo_SOURCES = zardoz.y
-bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
+baz_SOURCES = zardoz.y
END
cat > zardoz.y << 'END'
@@ -69,10 +52,8 @@ int main(void)
END
cp zardoz.y dir/quux.y
-cp zardoz.y sub/zardoz.y
-cp zardoz.y sub/dir/quux.y
-c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+c_outputs='zardoz.c dir/quux.c baz-zardoz.c'
$ACLOCAL
$AUTOCONF
@@ -94,7 +75,7 @@ for vpath in : false; do
$MAKE
# For debugging,
- ls -l . sub sub/dir
+ ls -l . dir
$EGREP 'line|\.y' $c_outputs
# Adjusted "#line" should not contain reference to the builddir.
@@ -109,14 +90,12 @@ for vpath in : false; do
grep "#.*\.y.*\.y" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.y"' zardoz.c
- grep '#.*line.*"\.\./dir/quux\.y"' bar-quux.c
- grep '#.*line.*"\.\./\.\./sub/zardoz\.y"' sub/foo-zardoz.c
- grep '#.*line.*"\.\./\.\./sub/dir/quux\.y"' sub/dir/quux.c
+ grep '#.*line.*"\.\./zardoz\.y"' baz-zardoz.c
+ grep '#.*line.*"\.\./dir/quux\.y"' dir/quux.c
else
grep '#.*line.*"zardoz\.y"' zardoz.c
- grep '#.*line.*"dir/quux\.y"' bar-quux.c
- grep '#.*line.*"zardoz\.y"' sub/foo-zardoz.c
- grep '#.*line.*"dir/quux\.y"' sub/dir/quux.c
+ grep '#.*line.*"zardoz\.y"' baz-zardoz.c
+ grep '#.*line.*"dir/quux\.y"' dir/quux.c
fi
cd $srcdir