summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2017-08-31 19:23:42 +0200
committerMathieu Lirzin <mthl@gnu.org>2017-08-31 19:23:42 +0200
commitf389ecb89acb7f51b6a9e8f41ebad3e45ac905a2 (patch)
tree9380abfd73fe36221b5378562629ef2da539e862
parentcc7231cc3668a387ae36905efca11f9d236c8df6 (diff)
parente94c0186d98d70df2f18c17622ee75f80f95e17b (diff)
downloadautomake-f389ecb89acb7f51b6a9e8f41ebad3e45ac905a2.tar.gz
Merge branch 'minor'
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am21
-rw-r--r--NEWS27
-rw-r--r--THANKS5
-rw-r--r--bin/aclocal.in40
-rw-r--r--bin/automake.in168
-rwxr-xr-xbin/gen-perl-protos36
-rw-r--r--bin/local.mk (renamed from bin/Makefile.inc)23
-rwxr-xr-xbootstrap14
-rw-r--r--configure.ac20
-rw-r--r--contrib/t/local.mk (renamed from contrib/t/Makefile.inc)0
-rw-r--r--doc/automake.texi16
-rwxr-xr-xdoc/help2man251
-rw-r--r--doc/local.mk (renamed from doc/Makefile.inc)9
-rw-r--r--lib/Automake/Config.in2
-rw-r--r--lib/Automake/local.mk (renamed from lib/Automake/Makefile.inc)0
-rw-r--r--lib/am/check.am2
-rw-r--r--lib/am/dejagnu.am2
-rw-r--r--lib/am/local.mk (renamed from lib/am/Makefile.inc)0
-rwxr-xr-xlib/config.guess26
-rwxr-xr-xlib/config.sub11
-rw-r--r--lib/local.mk (renamed from lib/Makefile.inc)0
-rw-r--r--lib/texinfo.tex91
-rw-r--r--m4/local.mk (renamed from m4/Makefile.inc)0
-rw-r--r--m4/python.m45
-rwxr-xr-xmaintainer/check-perl-protos50
-rw-r--r--maintainer/maint.mk3
-rw-r--r--maintainer/syntax-checks.mk8
-rw-r--r--pre-inst-env.in (renamed from t/wrap/aclocal.in)48
-rw-r--r--t/ansi2knr-no-more.sh2
-rw-r--r--t/ax/test-defs.in6
-rw-r--r--t/get-sysconf.sh4
-rw-r--r--t/libobj-no-dependency-tracking.sh56
-rw-r--r--t/list-of-tests.mk3
-rw-r--r--t/local.mk (renamed from t/Makefile.inc)12
-rw-r--r--t/subobj-objname-clash.sh104
-rw-r--r--t/wrap/automake.in27
37 files changed, 779 insertions, 317 deletions
diff --git a/.gitignore b/.gitignore
index 19da02f71..56bdce2c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,9 @@
/config.status.lineno
/configure.lineno
/bin/aclocal
+/bin/aclocal-1.*
/bin/automake
+/bin/automake-1.*
/runtest
/doc/.dirstamp
/doc/automake*.info
@@ -41,8 +43,6 @@
/doc/web-manual
/lib/Automake/Config.pm
/test-suite.log
-/t/wrap/aclocal-1.*
-/t/wrap/automake-1.*
/t/ax/test-defs.sh
/t/ax/shell-no-trail-bslash
/t/ax/cc-no-c-o
diff --git a/Makefile.am b/Makefile.am
index cfe4dd40d..89de362de 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,10 +69,9 @@ generated_file_finalize = $(AM_V_at) \
fi; \
chmod a-w $@-t && mv -f $@-t $@
-# For some tests or targets, we need to have the just-build automake and
-# aclocal scripts avaiable on PATH.
-extend_PATH = \
- { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; }
+# Wrapper for the build environment.
+nodist_noinst_SCRIPTS += pre-inst-env
+CLEANFILES += $(noinst_SCRIPTS)
# The master location for INSTALL is lib/INSTALL.
# This is where "make fetch" will install new versions.
@@ -124,12 +123,12 @@ EXTRA_DIST += \
maintainer/syntax-checks.mk
# Most work delegated to sub-dir makefile fragments.
-include $(srcdir)/bin/Makefile.inc
-include $(srcdir)/doc/Makefile.inc
-include $(srcdir)/lib/Makefile.inc
-include $(srcdir)/lib/Automake/Makefile.inc
-include $(srcdir)/lib/am/Makefile.inc
-include $(srcdir)/m4/Makefile.inc
-include $(srcdir)/t/Makefile.inc
+include $(srcdir)/bin/local.mk
+include $(srcdir)/doc/local.mk
+include $(srcdir)/lib/local.mk
+include $(srcdir)/lib/Automake/local.mk
+include $(srcdir)/lib/am/local.mk
+include $(srcdir)/m4/local.mk
+include $(srcdir)/t/local.mk
# vim: ft=automake noet
diff --git a/NEWS b/NEWS
index f1d214311..a87f8b6ec 100644
--- a/NEWS
+++ b/NEWS
@@ -140,7 +140,14 @@ New in 2.0:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-New in 1.16:
+New in ?.?.?:
+
+* Miscellaneous changes
+
+ - When subdir-objects is in effect, Automake will now construct
+ shorter object file names when no programs and libraries name
+ clashes are encountered. This should make the discouraged use of
+ 'foo_SHORTNAME' unnecessary in many cases.
* Bugs fixed:
@@ -181,15 +188,29 @@ New in 1.16:
This was the second part of automake bug#13928.
+ - Installed 'aclocal' m4 macros can now accept installation directories
+ containing '@' characters (automake bug#20903)
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.15.1:
+* Bugs fixed:
+
+ - The code has been adapted to remove a warning present since Perl
+ 5.22 stating that "Unescaped left brace in regex is deprecated".
+ This warning has become an hard error in Perl 5.26 (bug#22372).
+
+ - The generated Makefiles do not rely on the obsolescent GZIP
+ environment variable which was used for passing arguments to
+ 'gzip'. Compatibility with old versions has been
+ preserved. (bug#20132)
+
* Miscellaneous changes:
- Support the Windows version of the Intel C Compiler (icl) in the
- 'compile' script in the same way the (compatible) Microsoft C Compiler
- is supported.
+ 'compile' script in the same way the (compatible) Microsoft C
+ Compiler is supported.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/THANKS b/THANKS
index 04ddb1357..a2b8c29ec 100644
--- a/THANKS
+++ b/THANKS
@@ -60,6 +60,7 @@ Brian Gough bjg@network-theory.co.uk
Brian Jones cbj@nortel.net
Bruce Korb bkorb@gnu.org
Bruno Haible haible@ilog.fr
+Carnë Draug carandraug+dev@gmail.com
Carsten Lohrke carlo@gentoo.org
Charles Wilson cwilson@ece.gatech.edu
Chris Hoogendyk hoogendyk@bio.umass.edu
@@ -89,6 +90,7 @@ David Byron dbyron@dbyron.com
David Fang fang@csl.cornell.edu
Davyd Madeley davyd@fugro-fsi.com.au
David Pashley david@davidpashley.com
+David Wohlferd dw@limegreensocks.com
David Zaroski cz253@cleveland.Freenet.Edu
Dean Povey dpovey@wedgetail.com
Dennis J. Linse Dennis.J.Linse@SAIC.com
@@ -104,6 +106,7 @@ Dmitry Mikhin dmitrym@acres.com.au
Dmitry V. Levin ldv@altlinux.org
Doug Evans devans@cygnus.com
Duncan Gibson duncan@thermal.esa.int
+Dilyan Palauzov dilyan.palauzov@aegee.org
Ed Hartnett ed@unidata.ucar.edu
Eleftherios Gkioulekas lf@amath.washington.edu
Elena A. Vengerova helen@oktetlabs.ru
@@ -111,6 +114,7 @@ Elmar Hoffmann elho@elho.net
Elrond Elrond@Wunder-Nett.org
Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de
Erez Zadok ezk@cs.columbia.edu
+Eric Bavier bavier@cray.com
Eric Blake eblake@redhat.com
Eric Dorland eric@debian.org
Eric Magnien emagnien@club-internet.fr
@@ -287,6 +291,7 @@ Nathanael Nerode neroden@twcny.rr.com
Nelson H. F. Beebe beebe@math.utah.edu
Nicholas Wourms nwourms@netscape.net
Nick Bowler nbowler@elliptictech.com
+Nick Brown brownn@brocade.com
Nicola Fontana ntd@entidi.it
Nicolas Joly njoly@pasteur.fr
Nicolas Thiery nthiery@Icare.mines.edu
diff --git a/bin/aclocal.in b/bin/aclocal.in
index e90bef9fb..87dc9d6ec 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -27,9 +27,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
BEGIN
{
- @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
- unless @Aclocal::perl_libdirs;
- unshift @INC, @Aclocal::perl_libdirs;
+ unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
+ unless $ENV{AUTOMAKE_UNINSTALLED};
}
use strict;
@@ -68,7 +67,7 @@ $perl_threads = 0;
# ACLOCAL_PATH environment variable, and reset with the '--system-acdir'
# option.
my @user_includes = ();
-my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
+my @automake_includes = ('@datadir@/aclocal-' . $APIVERSION);
my @system_includes = ('@datadir@/aclocal');
# Whether we should copy M4 file in $user_includes[0].
@@ -174,7 +173,26 @@ use constant SCAN_M4_DIRS_ERROR => 2;
# Prototypes for all subroutines.
-#! Prototypes here will automatically be generated by the build system.
+sub add_file ($);
+sub add_macro ($);
+sub check_acinclude ();
+sub install_file ($$);
+sub list_compare (\@\@);
+sub parse_ACLOCAL_PATH ();
+sub parse_arguments ();
+sub reset_maps ();
+sub scan_configure ();
+sub scan_configure_dep ($);
+sub scan_file ($$$);
+sub scan_m4_dirs ($$@);
+sub scan_m4_files ();
+sub strip_redundant_includes (%);
+sub trace_used_macros ();
+sub unlink_tmp (;$);
+sub usage ($);
+sub version ();
+sub write_aclocal ($@);
+sub xmkdir_p ($);
################################################################
@@ -1112,7 +1130,7 @@ sub parse_arguments ()
}
# Finally, adds any directory listed in the 'dirlist' file.
- if (open (DIRLIST, "$system_includes[0]/dirlist"))
+ if (@system_includes && open (DIRLIST, "$system_includes[0]/dirlist"))
{
while (<DIRLIST>)
{
@@ -1147,6 +1165,16 @@ sub parse_ACLOCAL_PATH ()
################################################################
+# Don't refer to installation directories from the build environment
+if (exists $ENV{"AUTOMAKE_UNINSTALLED"})
+ {
+ @automake_includes = ();
+ @system_includes = ();
+ }
+
+@automake_includes = ($ENV{"ACLOCAL_AUTOMAKE_DIR"})
+ if (exists $ENV{"ACLOCAL_AUTOMAKE_DIR"});
+
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
parse_ACLOCAL_PATH;
diff --git a/bin/automake.in b/bin/automake.in
index 9c4cb8694..62eb13fe5 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -31,9 +31,8 @@ use strict;
BEGIN
{
- @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
- unless @Automake::perl_libdirs;
- unshift @INC, @Automake::perl_libdirs;
+ unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
+ unless $ENV{AUTOMAKE_UNINSTALLED};
}
use Automake::Config;
@@ -64,14 +63,68 @@ use Automake::Wrap 'makefile_wrap';
use Automake::Language;
use File::Basename;
use File::Spec;
+use List::Util 'none';
use Carp;
## ----------------------- ##
## Subroutine prototypes. ##
## ----------------------- ##
-#! Prototypes here will automatically be generated by the build system.
-
+sub append_exeext (&$);
+sub check_gnits_standards ();
+sub check_gnu_standards ();
+sub check_trailing_slash ($\$);
+sub check_typos ();
+sub define_files_variable ($\@$$);
+sub define_standard_variables ();
+sub define_verbose_libtool ();
+sub define_verbose_texinfo ();
+sub do_check_merge_target ();
+sub get_number_of_threads ();
+sub handle_compile ();
+sub handle_data ();
+sub handle_dist ();
+sub handle_emacs_lisp ();
+sub handle_factored_dependencies ();
+sub handle_footer ();
+sub handle_gettext ();
+sub handle_headers ();
+sub handle_install ();
+sub handle_java ();
+sub handle_languages ();
+sub handle_libraries ();
+sub handle_libtool ();
+sub handle_ltlibraries ();
+sub handle_makefiles_serial ();
+sub handle_man_pages ();
+sub handle_minor_options ();
+sub handle_options ();
+sub handle_programs ();
+sub handle_python ();
+sub handle_scripts ();
+sub handle_silent ();
+sub handle_subdirs ();
+sub handle_tags ();
+sub handle_targets ();
+sub handle_tests ();
+sub handle_tests_dejagnu ();
+sub handle_texinfo ();
+sub handle_user_recursion ();
+sub initialize_per_input ();
+sub lang_lex_finish ();
+sub lang_sub_obj ();
+sub lang_vala_finish ();
+sub lang_yacc_finish ();
+sub locate_aux_dir ();
+sub parse_arguments ();
+sub scan_aclocal_m4 ();
+sub scan_autoconf_files ();
+sub silent_flag ();
+sub transform ($\%);
+sub transform_token ($\%$);
+sub usage ();
+sub version ();
+sub yacc_lex_finish_helper ();
## ----------- ##
## Constants. ##
@@ -455,6 +508,15 @@ my %dep_files;
# This is a list of all targets to run during "make dist".
my @dist_targets;
+# List of all programs, libraries and ltlibraries as returned
+# by am_install_var
+my @proglist;
+my @liblist;
+my @ltliblist;
+# Blacklist of targets (as canonical base name) for which object file names
+# may not be automatically shortened
+my @dup_shortnames;
+
# Keep track of all programs declared in this Makefile, without
# $(EXEEXT). @substitutions@ are not listed.
my %known_programs;
@@ -575,6 +637,11 @@ sub initialize_per_input ()
@dist_common = ();
$handle_dist_run = 0;
+ @proglist = ();
+ @liblist = ();
+ @ltliblist = ();
+ @dup_shortnames = ();
+
%known_programs = ();
%known_libraries = ();
@@ -1637,14 +1704,47 @@ sub handle_single_transform
# object. In this case we rewrite the object's
# name to ensure it is unique.
- # 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 provide _SHORTNAME to
- # override.
-
- my $dname = $derived;
+ # 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, 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 ''
+ && none { $dname =~ /$_$/ } @dup_shortnames)
+ {
+ # At this point, we don't clear information about what
+ # parts of $derived are truly file name components. We can
+ # determine that by comparing against the canonicalization
+ # of $directory.
+ my $dir = $directory . "/";
+ my $cdir = canonicalize ($dir);
+ my $dir_len = length ($dir);
+ # Make sure we only strip full file name components. This
+ # is done by repeatedly trying to find cdir at the
+ # beginning. Each iteration removes one file name
+ # component from the end of cdir.
+ while ($dir_len > 0 && index ($derived, $cdir) != 0)
+ {
+ # Eventually $dir_len becomes 0.
+ $dir_len = rindex ($dir, "/", $dir_len - 2) + 1;
+ $cdir = substr ($cdir, 0, $dir_len);
+ }
+ $dname = substr ($derived, $dir_len);
+ }
my $var = var ($derived . '_SHORTNAME');
if ($var)
{
@@ -2154,9 +2254,8 @@ sub handle_LIBOBJS_or_ALLOCA
if $relative_dir ne '.';
define_variable ('LIBOBJDIR', "$dir", INTERNAL);
$clean_files{"\$($var)"} = MOSTLY_CLEAN;
- # If LTLIBOBJS is used, we must also clear LIBOBJS (which might
- # be created by libtool as a side-effect of creating LTLIBOBJS).
- $clean_files{"\$($var)"} = MOSTLY_CLEAN if $var =~ s/^LT//;
+ # libtool might create LIBOBJS as a side-effect of using LTLIBOBJS.
+ $clean_files{"\$(LIBOBJS)"} = MOSTLY_CLEAN if $var eq "LTLIBOBJS";
}
return $dir;
@@ -2323,12 +2422,33 @@ sub handle_libtool ()
LTRMS => join ("\n", @libtool_rms));
}
+# Check for duplicate targets
+sub handle_targets ()
+{
+ my %seen = ();
+ my @dups = ();
+ @proglist = am_install_var ('progs', 'PROGRAMS',
+ 'bin', 'sbin', 'libexec', 'pkglibexec',
+ 'noinst', 'check');
+ @liblist = am_install_var ('libs', 'LIBRARIES',
+ 'lib', 'pkglib', 'noinst', 'check');
+ @ltliblist = am_install_var ('ltlib', 'LTLIBRARIES',
+ 'noinst', 'lib', 'pkglib', 'check');
+
+ # Record duplications that may arise after canonicalization of the
+ # base names, in order to prevent object file clashes in the presence
+ # of target-specific *FLAGS
+ my @targetlist = (@proglist, @liblist, @ltliblist);
+ foreach my $pair (@targetlist)
+ {
+ my $base = canonicalize (basename (@$pair[1]));
+ push (@dup_shortnames, $base) if ($seen{$base});
+ $seen{$base} = $base;
+ }
+}
sub handle_programs ()
{
- my @proglist = am_install_var ('progs', 'PROGRAMS',
- 'bin', 'sbin', 'libexec', 'pkglibexec',
- 'noinst', 'check');
return if ! @proglist;
$must_handle_compiled_objects = 1;
@@ -2415,8 +2535,6 @@ sub handle_programs ()
sub handle_libraries ()
{
- my @liblist = am_install_var ('libs', 'LIBRARIES',
- 'lib', 'pkglib', 'noinst', 'check');
return if ! @liblist;
$must_handle_compiled_objects = 1;
@@ -2525,9 +2643,7 @@ sub handle_libraries ()
sub handle_ltlibraries ()
{
- my @liblist = am_install_var ('ltlib', 'LTLIBRARIES',
- 'noinst', 'lib', 'pkglib', 'check');
- return if ! @liblist;
+ return if ! @ltliblist;
$must_handle_compiled_objects = 1;
my @prefix = am_primary_prefixes ('LTLIBRARIES', 0, 'lib', 'pkglib',
@@ -2620,7 +2736,7 @@ sub handle_ltlibraries ()
skip_ac_subst => 1);
}
- foreach my $pair (@liblist)
+ foreach my $pair (@ltliblist)
{
my ($where, $onelib) = @$pair;
@@ -7610,6 +7726,8 @@ sub generate_makefile
handle_configure ($makefile_am, $makefile_in, $makefile, @inputs);
handle_gettext;
+
+ handle_targets;
handle_libraries;
handle_ltlibraries;
handle_programs;
diff --git a/bin/gen-perl-protos b/bin/gen-perl-protos
deleted file mode 100755
index 215d275b8..000000000
--- a/bin/gen-perl-protos
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env perl
-#
-# Copyright (C) 2013-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
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-use warnings;
-use strict;
-
-my @lines = <>;
-my @protos = map { /^(sub \w+\s*\(.*\))/ ? ("$1;") : () } @lines;
-
-while (defined ($_ = shift @lines))
- {
- if (/^#!.* prototypes/i)
- {
- print "# BEGIN AUTOMATICALLY GENERATED PROTOTYPES\n";
- print join ("\n", sort @protos) . "\n";
- print "# END AUTOMATICALLY GENERATED PROTOTYPES\n";
- }
- else
- {
- print;
- }
- }
diff --git a/bin/Makefile.inc b/bin/local.mk
index 102dec9fc..c63f670b8 100644
--- a/bin/Makefile.inc
+++ b/bin/local.mk
@@ -18,7 +18,14 @@
## ----------------------------------- ##
bin_SCRIPTS = %D%/automake %D%/aclocal
-CLEANFILES += $(bin_SCRIPTS)
+nodist_noinst_SCRIPTS += \
+ %D%/aclocal-$(APIVERSION) \
+ %D%/automake-$(APIVERSION)
+
+CLEANFILES += \
+ $(bin_SCRIPTS) \
+ %D%/aclocal-$(APIVERSION) \
+ %D%/automake-$(APIVERSION)
# Used by maintainer checks and such.
automake_in = $(srcdir)/%D%/automake.in
@@ -54,18 +61,22 @@ uninstall-hook:
# $(datadir) or other do_subst'ituted variables change.
%D%/automake: %D%/automake.in
%D%/aclocal: %D%/aclocal.in
-%D%/automake %D%/aclocal: Makefile %D%/gen-perl-protos
+%D%/automake %D%/aclocal: Makefile
$(AM_V_GEN)rm -f $@ $@-t $@-t2 \
&& $(MKDIR_P) $(@D) \
## Common substitutions.
&& in=$@.in && $(do_subst) <$(srcdir)/$$in >$@-t \
-## Auto-compute prototypes of perl subroutines.
- && $(PERL) -w $(srcdir)/%D%/gen-perl-protos $@-t > $@-t2 \
- && mv -f $@-t2 $@-t \
## We can't use '$(generated_file_finalize)' here, because currently
## Automake contains occurrences of unexpanded @substitutions@ in
## comments, and that is perfectly legit.
&& chmod a+x,a-w $@-t && mv -f $@-t $@
-EXTRA_DIST += %D%/gen-perl-protos
+
+%D%/aclocal-$(APIVERSION): %D%/aclocal
+ $(AM_V_GEN) rm -f $@; \
+ $(LN) %D%/aclocal $@
+
+%D%/automake-$(APIVERSION): %D%/automake
+ $(AM_V_GEN) rm -f $@; \
+ $(LN) %D%/automake $@
# vim: ft=automake noet
diff --git a/bootstrap b/bootstrap
index 82ed9937b..953577b05 100755
--- a/bootstrap
+++ b/bootstrap
@@ -35,20 +35,15 @@ export AUTOCONF # might be used by aclocal and/or automake
export AUTOM4TE # ditto
: ${PERL=perl}
-BOOTSTRAP_SHELL=${BOOTSTRAP_SHELL-/bin/sh}
-
# Variables to substitute.
VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
+APIVERSION=`sed -n 's/^APIVERSION=//p' configure.ac`
PACKAGE=automake
datadir=.
# This should be automatically updated by the 'update-copyright'
# rule of our Makefile.
RELEASE_YEAR=2017
-# Read the rule for calculating APIVERSION and execute it.
-apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
-eval "$apiver_cmd"
-
# Sanity checks.
if test -z "$VERSION"; then
echo "$me: cannot find VERSION" >&2
@@ -96,11 +91,8 @@ dosubst automake-$APIVERSION/Automake/Config.in \
dosubst m4/amversion.in m4/amversion.m4
# Create temporary replacement for aclocal and automake.
-for p in bin/aclocal bin/automake; do
- dosubst $p.in $p.tmp
- $PERL -w bin/gen-perl-protos $p.tmp > $p.tmp2
- mv -f $p.tmp2 $p.tmp
-done
+dosubst bin/aclocal.in bin/aclocal.tmp
+dosubst bin/automake.in bin/automake.tmp
# Create required makefile snippets.
$PERL ./gen-testsuite-part > t/testsuite-part.tmp
diff --git a/configure.ac b/configure.ac
index 5055780d1..b10faa0b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,12 +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.
-# Our current rule is that:
-# * All releases, including the prereleases, in an X.Y series
-# are compatible. So 1.5.1c is compatible with 1.5.
-# * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
-# aren't the same.
-APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
+APIVERSION=1.99a
AC_SUBST([APIVERSION])
AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
@@ -67,8 +62,8 @@ AC_SUBST([system_acdir], ["\${datadir}/aclocal"])
# aclocal and automake, hence the remake rules must use those versions
# as well. The extra quoting is to cater to cases when the build
# directory contains whitespace or shell metacharacters.
-ACLOCAL="\"`pwd`/t/wrap/aclocal-$APIVERSION\""
-AUTOMAKE="\"`pwd`/t/wrap/automake-$APIVERSION\""
+ACLOCAL="\"`pwd`/pre-inst-env\" aclocal-$APIVERSION"
+AUTOMAKE="\"`pwd`/pre-inst-env\" automake-$APIVERSION"
AC_PROG_LN_S
@@ -574,14 +569,7 @@ AC_SUBST([EXEEXT])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
-
-AC_CONFIG_FILES([t/wrap/aclocal-${APIVERSION}:t/wrap/aclocal.in],
- [chmod +x t/wrap/aclocal-${APIVERSION}],
- [APIVERSION=$APIVERSION])
-AC_CONFIG_FILES([t/wrap/automake-${APIVERSION}:t/wrap/automake.in],
- [chmod +x t/wrap/automake-${APIVERSION}],
- [APIVERSION=$APIVERSION])
-
+AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
AC_OUTPUT
# Inform the user if this version of automake is a beta release or
diff --git a/contrib/t/Makefile.inc b/contrib/t/local.mk
index d55fb9583..d55fb9583 100644
--- a/contrib/t/Makefile.inc
+++ b/contrib/t/local.mk
diff --git a/doc/automake.texi b/doc/automake.texi
index 626e41ac9..ec95e8dac 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2580,6 +2580,11 @@ for more information.
Look for Automake data files in directory @var{dir} instead of in the
installation directory. This is typically used for debugging.
+@vindex AUTOMAKE_LIBDIR
+The environment variable @env{AUTOMAKE_LIBDIR} provides another way to
+set the directory containing Automake data files. However
+@option{--libdir} takes precedence over it.
+
@item --print-libdir
@opindex --print-libdir
Print the path of the installation directory containing Automake-provided
@@ -3217,6 +3222,11 @@ overridden using the @env{AUTOM4TE} environment variable.
Look for the automake-provided macro files in @var{dir} instead of
in the installation directory. This is typically used for debugging.
+@vindex ACLOCAL_AUTOMAKE_DIR
+The environment variable @env{ACLOCAL_AUTOMAKE_DIR} provides another
+way to set the directory containing automake-provided macro files.
+However @option{--automake-acdir} takes precedence over it.
+
@item --system-acdir=@var{dir}
@opindex --system-acdir
Look for the system-wide third-party macro files (and the special
@@ -8555,7 +8565,7 @@ to supply additional flags to @command{configure}, define them in the
provided there by defining the @code{DISTCHECK_CONFIGURE_FLAGS} variable,
on the command line when invoking @command{make}.
@c See automake bug#14991 for more details about how the following holds.
-It's worth nothing that @command{make distcheck} needs complete control
+It's worth noting that @command{make distcheck} needs complete control
over the @command{configure} options @option{--srcdir} and
@option{--prefix}, so those options cannot be overridden by
@code{AM_DISTCHECK_CONFIGURE_FLAGS} nor by
@@ -8861,7 +8871,7 @@ Note however that, for tests based on more complex test protocols,
the exact effects of @code{XFAIL_TESTS} and @code{DISABLE_HARD_ERRORS}
might change, or they might even have no effect at all (for example,
@c Keep this in sync with tap-no-disable-hard-errors.sh
-in tests using TAP, there is not way to disable hard errors, and the
+in tests using TAP, there is no way to disable hard errors, and the
@code{DISABLE_HARD_ERRORS} variable has no effect on them).
@anchor{Testsuite progress on console}
@@ -9129,7 +9139,7 @@ as a side-effect.
It's important to note that, differently from what we've seen for the
serial test harness (@pxref{Serial Test Harness}), the
@code{AM_TESTS_ENVIRONMENT} and @code{TESTS_ENVIRONMENT} variables
-@emph{cannot} be use to define a custom test runner; the
+@emph{cannot} be used to define a custom test runner; the
@code{LOG_COMPILER} and @code{LOG_FLAGS} (or their extension-specific
counterparts) should be used instead:
diff --git a/doc/help2man b/doc/help2man
index e651b8d2d..829a8713b 100755
--- a/doc/help2man
+++ b/doc/help2man
@@ -1,7 +1,8 @@
#!/usr/bin/perl -w
# Generate a short man page from --help and --version output.
-# Copyright (C) 1997-2017 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009,
+# 2010, 2011, 2012, 2013, 2014, 2015 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
@@ -19,14 +20,15 @@
# Written by Brendan O'Dea <bod@debian.org>
# Available from ftp://ftp.gnu.org/gnu/help2man/
-use 5.006;
+use 5.008;
use strict;
use Getopt::Long;
+use Text::ParseWords qw(shellwords);
use Text::Tabs qw(expand);
use POSIX qw(strftime setlocale LC_ALL);
my $this_program = 'help2man';
-my $this_version = '1.40.8';
+my $this_version = '1.47.4';
sub _ { $_[0] }
sub configure_locale
@@ -42,11 +44,16 @@ sub enc_user { $_[0] }
sub kark { die +(sprintf shift, @_), "\n" }
sub N_ { $_[0] }
+sub program_basename;
+sub get_option_value;
+sub convert_option;
+sub fix_italic_spacing;
+
my $version_info = enc_user sprintf _(<<'EOT'), $this_program, $this_version;
GNU %s %s
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
-2011, 2012 Free Software Foundation, Inc.
+2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -117,18 +124,32 @@ Getopt::Long::config('bundling');
die $help_info unless GetOptions %opt_def and @ARGV == 1;
my %include = ();
+my %replace = ();
my %append = ();
-my @include = (); # retain order given in include file
+my %append_match = ();
+my @sections = (); # retain order of include file or in-line *section*s
# Process include file (if given). Format is:
#
-# [section name]
-# verbatim text
+# Optional initial text, ignored. May include lines starting with `-'
+# which are processed as options.
+#
+# [section]
+# Verbatim text to be included in the named section. By default at
+# the start, but in the case of `name' and `synopsis' the content
+# will replace the autogenerated contents.
#
-# or
+# [<section]
+# Verbatim text to be inserted at the start of the named section.
+#
+# [=section]
+# Verbatim text to replace the named section.
+#
+# [>section]
+# Verbatim text to be appended to the end of the named section.
#
# /pattern/
-# verbatim text
+# Verbatim text for inclusion below a paragraph matching `pattern'.
#
while (@opt_include)
@@ -140,7 +161,7 @@ while (@opt_include)
unless open INC, $inc;
my $key;
- my $hash = \%include;
+ my $hash;
while (<INC>)
{
@@ -155,7 +176,23 @@ while (@opt_include)
$key =~ s/^\s+//;
$key =~ s/\s+$//;
$hash = \%include;
- push @include, $key unless $include{$key};
+ # Handle explicit [<section], [=section] and [>section]
+ if ($key =~ s/^([<>=])\s*//)
+ {
+ if ($1 eq '>') { $hash = \%append; }
+ elsif ($1 eq '=') { $hash = \%replace; }
+ }
+ # NAME/SYNOPSIS replace by default
+ elsif ($key eq _('NAME') or $key eq _('SYNOPSIS'))
+ {
+ $hash = \%replace;
+ }
+ else
+ {
+ $hash = \%include;
+ }
+
+ push @sections, $key;
next;
}
@@ -172,7 +209,7 @@ while (@opt_include)
die "$inc:$.:$@";
}
- $hash = \%append;
+ $hash = \%append_match;
next;
}
@@ -184,48 +221,57 @@ while (@opt_include)
# handle options
if (/^-/)
{
- local @ARGV = split;
+ local @ARGV = shellwords $_;
GetOptions %opt_def;
}
next;
}
- $hash->{$key} ||= '';
$hash->{$key} .= $_;
}
close INC;
kark N_("%s: no valid information found in `%s'"), $this_program, $inc
- unless $key;
+ unless $key;
}
# Compress trailing blank lines.
-for my $hash (\(%include, %append))
+for my $hash (\(%include, %replace, %append, %append_match))
{
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
}
-sub get_option_value;
-
# Grab help and version info from executable.
my $help_text = get_option_value $ARGV[0], $help_option;
$version_text ||= get_option_value $ARGV[0], $version_option;
+# By default the generated manual pages will include the current date. This may
+# however be overriden by setting the environment variable $SOURCE_DATE_EPOCH
+# to an integer value of the seconds since the UNIX epoch. This is primarily
+# intended to support reproducible builds (wiki.debian.org/ReproducibleBuilds)
+# and will additionally ensure that the output date string is UTC.
+my $epoch_secs = time;
+if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
+{
+ $epoch_secs = $1;
+ $ENV{TZ} = 'UTC';
+}
+
# Translators: the following message is a strftime(3) format string, which in
# the English version expands to the month as a word and the full year. It
# is used on the footer of the generated manual pages. If in doubt, you may
# just use %x as the value (which should be the full locale-specific date).
-my $date = enc strftime _("%B %Y"), localtime;
-(my $program = $ARGV[0]) =~ s!.*/!!;
+my $date = enc strftime _("%B %Y"), localtime $epoch_secs;
+my $program = program_basename $ARGV[0];
my $package = $program;
my $version;
if ($opt_output)
{
unlink $opt_output or kark N_("%s: can't unlink %s (%s)"),
- $this_program, $opt_output, $! if -e $opt_output;
+ $this_program, $opt_output, $! if -e $opt_output;
open STDOUT, ">$opt_output"
or kark N_("%s: can't create %s (%s)"), $this_program, $opt_output, $!;
@@ -247,14 +293,14 @@ if ($opt_output)
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
{
- $program = $1;
+ $program = program_basename $1;
$package = $2;
$version = $3;
}
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
{
- $program = $2;
- $package = $1 ? "$1$2" : $2;
+ $program = program_basename $2;
+ $package = $1 ? "$1$program" : $program;
$version = $3;
}
else
@@ -262,21 +308,21 @@ else
$version = $_;
}
-$program =~ s!.*/!!;
-
# No info for `info' itself.
$opt_no_info = 1 if $program eq 'info';
+if ($opt_name)
+{
+ # --name overrides --include contents.
+ $replace{_('NAME')} = "$program \\- $opt_name\n";
+}
+
# Translators: "NAME", "SYNOPSIS" and other one or two word strings in all
# upper case are manual page section headings. The man(1) manual page in your
# language, if available should provide the conventional translations.
-for ($include{_('NAME')})
+for ($replace{_('NAME')} || ($include{_('NAME')} ||= ''))
{
- if ($opt_name) # --name overrides --include contents.
- {
- $_ = "$program \\- $opt_name\n";
- }
- elsif ($_) # Use first name given as $program
+ if ($_) # Use first name given as $program
{
$program = $1 if /^([^\s,]+)(?:,?\s*[^\s,\\-]+)*\s+\\?-/;
}
@@ -339,10 +385,11 @@ if ($help_text =~ s/^($PAT_USAGE):( +(\S+))(.*)((?:\n(?: {6}\1| *($PAT_USAGE_CON
s/\\fI$//;
s/^\./\\&./;
+ $_ = fix_italic_spacing $_;
$synopsis .= "$_\n";
}
- $include{_('SYNOPSIS')} ||= $synopsis;
+ $include{_('SYNOPSIS')} .= $synopsis;
}
# Process text, initial section is DESCRIPTION.
@@ -371,13 +418,13 @@ s/\\/\x82/g;
# "(?:[\\w-]+ +)?" in the bug reporting pattern is used to indicate an
# optional word, so that either "Report bugs" or "Report _program_ bugs" will
# be matched.
-my $PAT_BUGS = _('Report +(?:[\w-]+ +)?bugs|Email +bug +reports +to');
-my $PAT_AUTHOR = _('Written +by');
-my $PAT_OPTIONS = _('Options');
-my $PAT_ENVIRONMENT = _('Environment');
-my $PAT_FILES = _('Files');
-my $PAT_EXAMPLES = _('Examples');
-my $PAT_FREE_SOFTWARE = _('This +is +free +software');
+my $PAT_BUGS = _('Report +(?:[\w-]+ +)?bugs|Email +bug +reports +to');
+my $PAT_AUTHOR = _('Written +by');
+my $PAT_OPTIONS = _('Options');
+my $PAT_ENVIRONMENT = _('Environment');
+my $PAT_FILES = _('Files');
+my $PAT_EXAMPLES = _('Examples');
+my $PAT_FREE_SOFTWARE = _('This +is +free +software');
# Start a new paragraph (if required) for these.
s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR) /$1\n\n$2 /og;
@@ -386,33 +433,40 @@ s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR) /$1\n\n$2 /og;
# character.
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
-sub convert_option;
-
while (length)
{
# Convert some standard paragraph names.
- if (s/^($PAT_OPTIONS): *\n//o)
+ if (s/^($PAT_OPTIONS): *\n+//o)
{
$sect = _('OPTIONS');
next;
}
- if (s/^($PAT_ENVIRONMENT): *\n//o)
+ if (s/^($PAT_ENVIRONMENT): *\n+//o)
{
$sect = _('ENVIRONMENT');
next;
}
- if (s/^($PAT_FILES): *\n//o)
+ if (s/^($PAT_FILES): *\n+//o)
{
$sect = _('FILES');
next;
}
- elsif (s/^($PAT_EXAMPLES): *\n//o)
+ elsif (s/^($PAT_EXAMPLES): *\n+//o)
{
$sect = _('EXAMPLES');
next;
}
- # Copyright section
+ # Custom section indicated by a line containing "*Section Name*".
+ if (s/^\*(\w(.*\w)?)\* *\n+//)
+ {
+ $sect = uc $1;
+ $sect =~ tr/*/ /; # also accept *Section*Name*
+ push @sections, $sect;
+ next;
+ }
+
+ # Copyright section.
if (/^Copyright /)
{
$sect = _('COPYRIGHT');
@@ -437,7 +491,6 @@ while (length)
my $indent = $1;
my $prefix = $2;
my $break = '.IP';
- $include{$sect} ||= '';
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
{
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
@@ -448,12 +501,11 @@ while (length)
}
my $matched = '';
- $include{$sect} ||= '';
# Sub-sections have a trailing colon and the second line indented.
if (s/^(\S.*:) *\n / /)
{
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$include{$sect} .= qq(.SS "$1"\n);
}
@@ -463,7 +515,7 @@ while (length)
# Option with description.
if (s/^( {1,10}([+-]\S.*?))(?:( +(?!-))|\n( {20,}))(\S.*)\n//)
{
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$indent = length ($4 || "$1$3");
$content = ".TP\n\x84$2\n\x84$5\n";
unless ($4)
@@ -476,23 +528,23 @@ while (length)
# Option without description.
elsif (s/^ {1,10}([+-]\S.*)\n//)
{
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$content = ".HP\n\x84$1\n";
$indent = 80; # not continued
}
# Indented paragraph with tag.
- elsif (s/^( +(\S.*?) +)(\S.*)\n//)
+ elsif (s/^( +(\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
{
- $matched .= $& if %append;
- $indent = length $1;
- $content = ".TP\n\x84$2\n\x84$3\n";
+ $matched .= $& if %append_match;
+ $indent = length ($4 || "$1$3");
+ $content = ".TP\n\x84$2\n\x84$5\n";
}
# Indented paragraph.
elsif (s/^( +)(\S.*)\n//)
{
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$indent = length $1;
$content = ".IP\n\x84$2\n";
}
@@ -501,7 +553,7 @@ while (length)
else
{
s/(.*)\n//;
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$content = ".PP\n" if $include{$sect};
$content .= "$1\n";
}
@@ -509,7 +561,7 @@ while (length)
# Append continuations.
while ($indent ? s/^ {$indent}(\S.*)\n// : s/^(\S.*)\n//)
{
- $matched .= $& if %append;
+ $matched .= $& if %append_match;
$content .= "\x84$1\n";
}
@@ -523,19 +575,35 @@ while (length)
s/\x84'/\x81/g;
s/\x84//g;
- # Convert options.
- s/(^| |\()(-[][\w=-]+)/$1 . convert_option $2/mge;
+ # Examples should be verbatim.
+ unless ($sect eq _('EXAMPLES'))
+ {
+ # Convert options.
+ s/(^|[ (])(-[][\w=-]+)/$1 . convert_option $2/mge;
+
+ # Italicise filenames: /a/b, $VAR/c/d, ~/e/f
+ s!
+ (^|[ (]) # space/punctuation before
+ (
+ (?:\$\w+|~)? # leading variable, or tilde
+ (?:/\w(?:[\w.-]*\w)?)+ # path components
+ )
+ ($|[ ,;.)]) # space/punctuation after
+ !$1\\fI$2\\fP$3!xmg;
+
+ $_ = fix_italic_spacing $_;
+ }
- # Escape remaining hyphens
+ # Escape remaining hyphens.
s/-/\x83/g;
- if ($sect eq 'COPYRIGHT')
+ if ($sect eq _('COPYRIGHT'))
{
# Insert line breaks before additional copyright messages
# and the disclaimer.
s/\n(Copyright |$PAT_FREE_SOFTWARE)/\n.br\n$1/og;
}
- elsif ($sect eq 'REPORTING BUGS')
+ elsif ($sect eq _('REPORTING BUGS'))
{
# Handle multi-line bug reporting sections of the form:
#
@@ -547,14 +615,14 @@ while (length)
}
# Check if matched paragraph contains /pat/.
- if (%append)
+ if (%append_match)
{
- for my $pat (keys %append)
+ for my $pat (keys %append_match)
{
if ($matched =~ $pat)
{
- $content .= ".PP\n" unless $append{$pat} =~ /^\./;
- $content .= $append{$pat};
+ $content .= ".PP\n" unless $append_match{$pat} =~ /^\./;
+ $content .= $append_match{$pat};
}
}
}
@@ -568,7 +636,6 @@ unless ($opt_no_info)
my $info_page = $opt_info || $program;
$sect = _('SEE ALSO');
- $include{$sect} ||= '';
$include{$sect} .= ".PP\n" if $include{$sect};
$include{$sect} .= sprintf _(<<'EOT'), $program, $program, $info_page;
The full documentation for
@@ -585,6 +652,18 @@ should give you access to the complete manual.
EOT
}
+# Append additional text.
+while (my ($sect, $text) = each %append)
+{
+ $include{$sect} .= $append{$sect};
+}
+
+# Replace sections.
+while (my ($sect, $text) = each %replace)
+{
+ $include{$sect} = $replace{$sect};
+}
+
# Output header.
print <<EOT;
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
@@ -592,15 +671,17 @@ print <<EOT;
EOT
# Section ordering.
-my @pre = (_('NAME'), _('SYNOPSIS'), _('DESCRIPTION'), _('OPTIONS'),
- _('ENVIRONMENT'), _('FILES'), _('EXAMPLES'));
-
-my @post = (_('AUTHOR'), _('REPORTING BUGS'), _('COPYRIGHT'), _('SEE ALSO'));
-my $filter = join '|', @pre, @post;
+my @pre = (_('NAME'), _('SYNOPSIS'), _('DESCRIPTION'), _('OPTIONS'));
+my @post = (_('ENVIRONMENT'), _('FILES'), _('EXAMPLES'), _('AUTHOR'),
+ _('REPORTING BUGS'), _('COPYRIGHT'), _('SEE ALSO'));
+my %filter = map { $_ => 1 } @pre, @post;
# Output content.
-for my $sect (@pre, (grep ! /^($filter)$/o, @include), @post)
+my %done;
+for my $sect (@pre, (grep !$filter{$_}, @sections), @post)
{
+ next if $done{$sect}++; # ignore duplicates
+ next unless $include{$sect};
if ($include{$sect})
{
my $quote = $sect =~ /\W/ ? '"' : '';
@@ -628,6 +709,15 @@ close STDOUT or kark N_("%s: error writing to %s (%s)"), $this_program,
exit;
+# Get program basename, and strip libtool "lt-" prefix if required.
+sub program_basename
+{
+ local $_ = shift;
+ s!.*/!!;
+ s/^lt-// if $opt_libtool;
+ $_;
+}
+
# Call program with given option and return results.
sub get_option_value
{
@@ -648,7 +738,7 @@ sub get_option_value
kark $err, $this_program, $opt, $prog, $extra;
}
- return $value;
+ $value;
}
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
@@ -667,3 +757,12 @@ sub convert_option
$_;
}
+
+# Insert spacing escape characters \, and \/ before and after italic text. See
+# http://www.gnu.org/software/groff/manual/html_node/Ligatures-and-Kerning.html
+sub fix_italic_spacing
+{
+ local $_ = shift;
+ s!\\fI(.*?)\\f([BRP])!\\fI\\,$1\\/\\f$2!g;
+ return $_;
+}
diff --git a/doc/Makefile.inc b/doc/local.mk
index b39ce89c7..807c29308 100644
--- a/doc/Makefile.inc
+++ b/doc/local.mk
@@ -32,13 +32,13 @@ man1_MANS = \
$(man1_MANS): $(top_srcdir)/configure.ac
CLEANFILES += $(man1_MANS)
+# XXX: This script should be updated with 'fetch' target.
EXTRA_DIST += %D%/help2man
update_mans = \
$(AM_V_GEN): \
&& $(MKDIR_P) %D% \
- && $(extend_PATH) \
- && $(PERL) $(srcdir)/%D%/help2man --output=$@
+ && ./pre-inst-env $(PERL) $(srcdir)/%D%/help2man --output=$@
%D%/aclocal.1 %D%/automake.1:
$(AM_V_GEN): \
@@ -77,8 +77,7 @@ dist_noinst_DATA += $(amhello_sources)
dist_doc_DATA = $(srcdir)/%D%/amhello-1.0.tar.gz
setup_autotools_paths = { \
- $(extend_PATH) \
- && ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
+ ACLOCAL=aclocal-$(APIVERSION) && export ACLOCAL \
&& AUTOMAKE=automake-$(APIVERSION) && export AUTOMAKE \
&& AUTOCONF='$(am_AUTOCONF)' && export AUTOCONF \
&& AUTOM4TE='$(am_AUTOM4TE)' && export AUTOM4TE \
@@ -97,7 +96,7 @@ $(srcdir)/%D%/amhello-1.0.tar.gz: $(amhello_sources) $(srcdir)/configure.ac
&& $(setup_autotools_paths) \
&& ( \
{ $(AM_V_P) || exec 5>&2 >$$tmp 2>&1; } \
- && $(am_AUTORECONF) -vfi \
+ && $(abs_builddir)/pre-inst-env $(am_AUTORECONF) -vfi \
&& ./configure \
&& $(MAKE) $(AM_MAKEFLAGS) distcheck \
&& $(MAKE) $(AM_MAKEFLAGS) distclean \
diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
index 9437eca9d..a22fdc0f7 100644
--- a/lib/Automake/Config.in
+++ b/lib/Automake/Config.in
@@ -32,7 +32,7 @@ our $PACKAGE = '@PACKAGE@';
our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
our $VERSION = '@VERSION@';
our $RELEASE_YEAR = '@RELEASE_YEAR@';
-our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
+our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@';
our $perl_threads = 0;
# We need at least this version for CLONE support.
diff --git a/lib/Automake/Makefile.inc b/lib/Automake/local.mk
index 6763f403f..6763f403f 100644
--- a/lib/Automake/Makefile.inc
+++ b/lib/Automake/local.mk
diff --git a/lib/am/check.am b/lib/am/check.am
index 741a5c0f0..ff174191d 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -401,7 +401,7 @@ RECHECK_LOGS = $(TEST_LOGS)
## Running all tests, or rechecking failures. ##
## ------------------------------------------ ##
-check-TESTS:
+check-TESTS: %CHECK_DEPS%
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
index 75ec97dca..04e97e2b1 100644
--- a/lib/am/dejagnu.am
+++ b/lib/am/dejagnu.am
@@ -33,7 +33,7 @@ check-DEJAGNU: site.exp
## pointless to cause a failure if the tests cannot be run at all.
if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
- if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
+ if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
diff --git a/lib/am/Makefile.inc b/lib/am/local.mk
index 270bb7347..270bb7347 100644
--- a/lib/am/Makefile.inc
+++ b/lib/am/local.mk
diff --git a/lib/config.guess b/lib/config.guess
index 1000e2bd9..2193702b1 100755
--- a/lib/config.guess
+++ b/lib/config.guess
@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2017-02-07'
+timestamp='2017-05-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -837,10 +837,11 @@ EOF
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -1303,14 +1304,21 @@ EOF
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1334,16 +1342,16 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
+ NEO-*:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
+ NSR-*:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSX-?:NONSTOP_KERNEL:*:*)
+ NSX-*:NONSTOP_KERNEL:*:*)
echo nsx-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
diff --git a/lib/config.sub b/lib/config.sub
index 87abeab6c..40ea5dfe1 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -2,7 +2,7 @@
# Configuration validation subroutine script.
# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2017-02-07'
+timestamp='2017-04-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -263,7 +263,7 @@ case $basic_machine in
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
@@ -315,6 +315,7 @@ case $basic_machine in
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
+ | wasm32 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@@ -388,7 +389,7 @@ case $basic_machine in
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
@@ -446,6 +447,7 @@ case $basic_machine in
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -1246,6 +1248,9 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
+ wasm32)
+ basic_machine=wasm32-unknown
+ ;;
w65*)
basic_machine=w65-wdc
os=-none
diff --git a/lib/Makefile.inc b/lib/local.mk
index 50035de60..50035de60 100644
--- a/lib/Makefile.inc
+++ b/lib/local.mk
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index 371f60e45..513e09b57 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,11 +3,11 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2017-06-16.23}
+\def\texinfoversion{2017-08-31.18}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
+% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
% Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
@@ -5493,17 +5493,15 @@ end
\let\indexlbrace\{ % Likewise, set these sequences for braces
\let\indexrbrace\} % used in the sort key.
\begindoublecolumns
- \let\entrywidowpenalty=\indexwidowpenalty
+ \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
%
% Read input from the index file line by line.
\loopdo
- \ifeof1
- \let\firsttoken\relax
- \else
+ \ifeof1 \else
\read 1 to \nextline
- \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
- \act
\fi
+ %
+ \indexinputprocessing
\thisline
%
\ifeof1\else
@@ -5515,12 +5513,20 @@ end
\fi
\closein 1
\endgroup}
+\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
+\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
+\def\indexinputprocessing{%
+ \ifeof1
+ \let\firsttoken\relax
+ \else
+ \edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
+ \act
+ \fi
+}
\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
-\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
-\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
@@ -5597,7 +5603,7 @@ end
% For pdfTeX and XeTeX.
% The redefinition of \domark stops marks being added in \pdflink to
% preserve coloured links across page boundaries. Otherwise the marks
- % would get in the way of \lastbox in \insertindexentrybox.
+ % would get in the way of \lastbox in \insertentrybox.
\let\domark\relax
%
% Start a new paragraph if necessary, so our assignments below can't
@@ -5658,9 +5664,9 @@ end
\fi
\egroup % end \boxA
\ifdim\wd\boxB = 0pt
- \global\setbox\entryindexbox=\vbox{\unhbox\boxA}%
+ \global\setbox\entrybox=\vbox{\unhbox\boxA}%
\else
- \global\setbox\entryindexbox=\vbox\bgroup
+ \global\setbox\entrybox=\vbox\bgroup
% We want the text of the entries to be aligned to the left, and the
% page numbers to be aligned to the right.
%
@@ -5722,19 +5728,20 @@ end
\egroup % The \vbox
\fi
\endgroup
- % delay text of entry until after penalty
- \bgroup\aftergroup\insertindexentrybox
- \entrywidowpenalty
+ \dotheinsertentrybox
}}
\newskip\thinshrinkable
\skip\thinshrinkable=.15em minus .15em
-\newbox\entryindexbox
-\def\insertindexentrybox{%
- \ourunvbox\entryindexbox
+\newbox\entrybox
+\def\insertentrybox{%
+ \ourunvbox\entrybox
}
+% default definition
+\let\dotheinsertentrybox\insertentrybox
+
% Use \lastbox to take apart vbox box by box, and add each sub-box
% to the current vertical list.
\def\ourunvbox#1{%
@@ -5757,21 +5764,18 @@ end
\newbox\delayedbox
\newbox\interbox
-% Default is no penalty
-\let\entrywidowpenalty\egroup
-
% Used from \printindex. \firsttoken should be the first token
% after the \entry. If it's not another \entry, we are at the last
% line of a group of index entries, so insert a penalty to discourage
% widowed index entries.
-\long\def\indexwidowpenalty{%
- \def\isentry{\entry}%
+\def\dotheinsertentryboxwithpenalty{%
\ifx\firsttoken\isentry
\else
\penalty 9000
\fi
- \egroup % now comes the box added with \aftergroup
+ \insertentrybox
}
+\def\isentry{\entry}%
% Like plain.tex's \dotfill, except uses up at least 1 em.
% The filll stretch here overpowers both the fil and fill stretch to push
@@ -5888,8 +5892,8 @@ end
\divide\doublecolumnhsize by 2
\hsize = \doublecolumnhsize
%
- % Double the \vsize as well. (We don't need a separate register here,
- % since nobody clobbers \vsize.)
+ % Double the \vsize as well.
+ \advance\vsize by -\ht\partialpage
\vsize = 2\vsize
%
% For the benefit of balancing columns
@@ -5907,12 +5911,12 @@ end
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
- \advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
- \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
+ \global\advance\vsize by 2\ht\partialpage
\onepageout\pagesofar
- \unvbox255
+ \unvbox\PAGE
\penalty\outputpenalty
}
%
@@ -5976,9 +5980,9 @@ end
%
% \pagegoal was set to the doubled \vsize above, since we restarted
% the current page. We're now back to normal single-column
- % typesetting, so reset \pagegoal to the normal \vsize (after the
- % \endgroup where \vsize got restored).
- \pagegoal = \vsize
+ % typesetting, so reset \pagegoal to the normal \vsize.
+ \global\vsize = \txipageheight %
+ \pagegoal = \txipageheight %
}
\newbox\balancedcolumns
\setbox\balancedcolumns=\vbox{shouldnt see this}%
@@ -5986,7 +5990,7 @@ end
% Only called for the last of the double column material. \doublecolumnout
% does the others.
\def\balancecolumns{%
- \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
@@ -9118,7 +9122,13 @@ end
\xdef\safexrefname{#1}%
}%
%
- \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+ \bgroup
+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}%
+ \egroup
+ % We put the \gdef inside a group to avoid the definitions building up on
+ % TeX's save stack, which can cause it to run out of space for aux files with
+ % thousands of lines. \gdef doesn't use the save stack, but \csname does
+ % when it defines an unknown control sequence as \relax.
%
% Was that xref control sequence that we just defined for a float?
\expandafter\iffloat\csname XR\safexrefname\endcsname
@@ -11312,7 +11322,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.3in
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .5cm
}}
@@ -11330,7 +11339,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.25in
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .4cm
}}
@@ -11356,7 +11364,6 @@ directory should work if nowhere else does.}
{297mm}{210mm}%
%
\tolerance = 700
- \hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = 5mm
}}
@@ -11375,7 +11382,6 @@ directory should work if nowhere else does.}
%
\lispnarrowing = 0.2in
\tolerance = 800
- \hfuzz = 1.2pt
\contentsrightmargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
@@ -11431,6 +11437,9 @@ directory should work if nowhere else does.}
%
\letterpaper
+% Default value of \hfuzz, for suppressing warnings about overfull hboxes.
+\hfuzz = 1pt
+
\message{and turning on texinfo input format.}
@@ -11596,6 +11605,9 @@ directory should work if nowhere else does.}
@def ^^M{@let^^M@secondlinenl}%
% Definition for a newline in the main Texinfo file.
@gdef @secondlinenl{@fixbackslash}%
+ % In case the first line has a whole-line command on it
+ @let@originalparsearg@parsearg
+ @def@parsearg{@fixbackslash@originalparsearg}
}}
{@catcode`@^=7 @catcode`@^^M=13%
@@ -11616,6 +11628,7 @@ directory should work if nowhere else does.}
@catcode13=5 % regular end of line
@enableemergencynewline
@let@c=@texinfoc
+ @let@parsearg@originalparsearg
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
@catcode`+=@active
diff --git a/m4/Makefile.inc b/m4/local.mk
index 287db844c..287db844c 100644
--- a/m4/Makefile.inc
+++ b/m4/local.mk
diff --git a/m4/python.m4 b/m4/python.m4
index 6d9e93401..bd66aae46 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -38,8 +38,9 @@ AC_DEFUN([AM_PATH_PYTHON],
dnl supported. (2.0 was released on October 16, 2000).
dnl FIXME: Remove the need to hard-code Python versions here.
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
- python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
+[python python2 python3 python3.6 python3.5 python3.4 python3.3 python3.2 dnl
+ python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 dnl
+ python2.2 python2.1 python2.0])
AC_ARG_VAR([PYTHON], [the Python interpreter])
diff --git a/maintainer/check-perl-protos b/maintainer/check-perl-protos
new file mode 100755
index 000000000..b1d6a72b5
--- /dev/null
+++ b/maintainer/check-perl-protos
@@ -0,0 +1,50 @@
+#!/usr/bin/env perl
+#
+# Copyright (C) 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
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+use warnings;
+use strict;
+
+my @lines = <>;
+my %forwards = map { /^sub (\w+)\s*\((.*)\);$/ ? ("$1" => "$2") : () } @lines;
+my %subs = map { /^sub (\w+)\s*\((.*)\)$/ ? ("$1" => "$2") : () } @lines;
+my $error_count = 0;
+
+# $subs{"foo"} = "$$";
+# $subs{"bar"} = "@";
+# $forwards{"bar"} = "\$";
+
+# Check that every subroutine has a matching forward declaration with
+# the same prototype.
+foreach my $sub (keys (%subs))
+ {
+ # XXX: The location of the subroutine is not reported.
+ if (grep { $sub eq $_ } keys (%forwards))
+ {
+ if ($forwards{$sub} ne $subs{$sub})
+ {
+ $error_count += 1;
+ warn ("prototype mismatch for \"$sub\" subroutine\n");
+ }
+ }
+ else
+ {
+ $error_count += 1;
+ warn ("missing prototype for \"$sub\" subroutine\n");
+ }
+ }
+
+exit (($error_count == 0) ? 0 : 1);
diff --git a/maintainer/maint.mk b/maintainer/maint.mk
index 582cfdd58..1cfd2e870 100644
--- a/maintainer/maint.mk
+++ b/maintainer/maint.mk
@@ -174,9 +174,8 @@ git-tag-release: maintainer-check
""|[nN]|[nN]o|NO) run="";; \
*) run="echo Running:";; \
esac; \
- $(determine_release_type); \
$(git_must_have_clean_workdir); \
- $$run $(GIT) tag -s "v$(VERSION)" -m "$$release_type $(VERSION)"
+ $$run $(GIT) tag -s "v$(VERSION)" -m "$(PACKAGE) $(VERSION)"
git-upload-release:
@# Check this is a version we can cut a release (either test
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 35311a117..699203ad8 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -51,6 +51,7 @@ sc_mkinstalldirs \
sc_pre_normal_post_install_uninstall \
sc_perl_no_undef \
sc_perl_no_split_regex_space \
+sc_perl_protos \
sc_cd_in_backquotes \
sc_cd_relative_dir \
sc_perl_at_uscore_in_scalar_context \
@@ -102,6 +103,13 @@ sc_sanity_gnu_grep:
.PHONY: sc_sanity_gnu_grep
$(syntax_check_rules): sc_sanity_gnu_grep
+# Check that every subroutine in perl scripts has a corresponding
+# prototype
+sc_perl_protos:
+ $(AM_V_GEN)$(srcdir)/maintainer/check-perl-protos \
+ <$(srcdir)/bin/aclocal.in && \
+ $(srcdir)/maintainer/check-perl-protos <$(srcdir)/bin/automake.in
+
# These check avoids accidental configure substitutions in the source.
# 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
diff --git a/t/wrap/aclocal.in b/pre-inst-env.in
index a624bcb16..f285ca62c 100644
--- a/t/wrap/aclocal.in
+++ b/pre-inst-env.in
@@ -1,29 +1,41 @@
-#!@PERL@ -w
-# @configure_input@
-
-# Copyright (C) 2012-2017 Free Software Foundation, Inc.
-
+#! /bin/sh
+# Copyright © 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
-
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-BEGIN
-{
- use strict;
- @Aclocal::perl_libdirs = ('@abs_top_srcdir@/lib');
- unshift @Aclocal::perl_libdirs, '@abs_top_builddir@/lib'
- if '@srcdir@' ne '.';
- unshift @ARGV,
- '--automake-acdir=@abs_top_srcdir@/m4',
- '--system-acdir=@abs_top_srcdir@/m4/acdir';
-}
-require '@abs_top_builddir@/bin/aclocal';
+abs_top_srcdir="@abs_top_srcdir@"
+abs_top_builddir="@abs_top_builddir@"
+
+sep='@PATH_SEPARATOR@';
+
+PERL5LIB="$abs_top_builddir/lib/${sep}$abs_top_srcdir/lib/${PERL5LIB:+${sep}}$PERL5LIB"
+export PERL5LIB
+
+PATH="$abs_top_builddir/bin${sep}$PATH"
+export PATH
+
+# Trigger the use of local modules.
+AUTOMAKE_UNINSTALLED=1
+export AUTOMAKE_UNINSTALLED
+
+AUTOMAKE_LIBDIR="$abs_top_srcdir/lib"
+export AUTOMAKE_LIBDIR
+
+ACLOCAL_AUTOMAKE_DIR="$abs_top_srcdir/m4"
+export ACLOCAL_AUTOMAKE_DIR
+
+ACLOCAL_PATH="$abs_top_srcdir/m4/acdir"
+export ACLOCAL_PATH
+
+exec "$@"
diff --git a/t/ansi2knr-no-more.sh b/t/ansi2knr-no-more.sh
index f9128022b..8c13cd0a3 100644
--- a/t/ansi2knr-no-more.sh
+++ b/t/ansi2knr-no-more.sh
@@ -32,7 +32,7 @@ $ACLOCAL -Wnone 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
-cat aclocal.sav "$am_automake_acdir"/obsolete.m4 > aclocal.m4
+cat aclocal.sav "$am_top_srcdir"/m4/obsolete.m4 > aclocal.m4
$AUTOCONF -Wnone 2>stderr && { cat stderr >&2; exit 1; }
cat stderr >&2
grep "^configure\\.ac:5:.*$warn_rx" stderr
diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in
index 2465c61c1..8cace053b 100644
--- a/t/ax/test-defs.in
+++ b/t/ax/test-defs.in
@@ -55,13 +55,13 @@ case ${am_running_installcheck:=no} in
;;
no)
am_amdir=$am_top_srcdir/lib/am
- am_automake_acdir=$am_top_srcdir/m4
- am_bindir=$am_top_builddir/t/wrap
+ am_automake_acdir=""
+ am_bindir=$am_top_builddir/bin
am_datadir=$am_top_srcdir
am_docdir=$am_top_srcdir/doc
am_pkgvdatadir=$am_top_srcdir/lib
am_scriptdir=$am_top_srcdir/lib
- am_system_acdir=$am_top_srcdir/m4/acdir
+ am_system_acdir=""
;;
*)
echo "$me: variable 'am_running_installcheck' has invalid"
diff --git a/t/get-sysconf.sh b/t/get-sysconf.sh
index 986c1dd36..a768b4769 100644
--- a/t/get-sysconf.sh
+++ b/t/get-sysconf.sh
@@ -55,8 +55,8 @@ $YACC --version || :
$YACC --help || :
cat "$am_top_builddir/config.log" || st=1
-cat "$am_top_builddir/t/wrap/aclocal-$APIVERSION" || st=1
-cat "$am_top_builddir/t/wrap/automake-$APIVERSION" || st=1
+cat "$am_top_builddir/bin/aclocal-$APIVERSION" || st=1
+cat "$am_top_builddir/bin/automake-$APIVERSION" || st=1
if test $st -eq 0; then
# This test SKIPs, so that all the information it has gathered and
diff --git a/t/libobj-no-dependency-tracking.sh b/t/libobj-no-dependency-tracking.sh
new file mode 100644
index 000000000..1f024057e
--- /dev/null
+++ b/t/libobj-no-dependency-tracking.sh
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that LIBOBJS source files are properly built without dependency
+# tracking when using out of tree builds.
+#
+# This is a non regression test which is following an issue in flex-2.6.4 when
+# "malloc.o" was required, see <https://github.com/westes/flex/issues/244>.
+
+. test-init.sh
+
+# The LIBOBJS are in a separate LIBOBJ_DIR directory without anything else in
+# it to not trigger the creation of the build directory accidentally.
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_CONFIG_LIBOBJ_DIR([foo])
+AC_LIBOBJ([foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = helldl
+LDADD = $(LIBOBJS)
+.PHONY: dummy
+dummy: $(LIBOBJS)
+END
+
+mkdir foo
+cat > foo/foo.c << 'END'
+int foo() { return 0; }
+END
+
+mkdir build
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cd build
+../configure --disable-dependency-tracking
+run_make dummy
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 051ac0c70..5e31ca2b6 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -38,6 +38,7 @@ t/override-conditional-pr13940.sh \
t/dist-pr109765.sh \
t/instdir-cond2.sh \
t/java-nobase.sh \
+t/libobj-no-dependency-tracking.sh \
t/objext-pr10128.sh \
t/remake-timing-bug-pr8365.sh \
t/lex-subobj-nodep.sh \
@@ -604,6 +605,7 @@ t/lflags.sh \
t/lflags-cxx.sh \
t/libexec.sh \
t/libobj-basic.sh \
+t/libobj-no-dependency-tracking.sh \
t/libobj2.sh \
t/libobj3.sh \
t/libobj4.sh \
@@ -1059,6 +1061,7 @@ t/subobjname.sh \
t/subobj-clean-pr10697.sh \
t/subobj-clean-lt-pr10697.sh \
t/subobj-indir-pr13928.sh \
+t/subobj-objname-clash.sh \
t/subobj-vpath-pr13928.sh \
t/subobj-pr13928-more-langs.sh \
t/subpkg.sh \
diff --git a/t/Makefile.inc b/t/local.mk
index 708e93397..d5fd00cb1 100644
--- a/t/Makefile.inc
+++ b/t/local.mk
@@ -20,13 +20,13 @@
## ------------ ##
# Run the tests with a proper shell detected at configure time.
-LOG_COMPILER = $(AM_TEST_RUNNER_SHELL)
+LOG_COMPILER = ./pre-inst-env $(AM_TEST_RUNNER_SHELL)
TEST_EXTENSIONS = .pl .sh .tap
SH_LOG_COMPILER = $(LOG_COMPILER)
TAP_LOG_COMPILER = $(LOG_COMPILER)
-PL_LOG_COMPILER = $(PERL)
-AM_PL_LOG_FLAGS = -Mstrict -I $(builddir)/lib -I $(srcdir)/lib -w
+PL_LOG_COMPILER = ./pre-inst-env $(PERL)
+AM_PL_LOG_FLAGS = -Mstrict -w
TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(srcdir)/lib/tap-driver.sh
@@ -100,7 +100,7 @@ $(srcdir)/%D%/testsuite-part.am: $(srcdir)/gen-testsuite-part
$(srcdir)/%D%/testsuite-part.am: Makefile.am
# Hand-written tests for stuff in 'contrib/'.
-include $(srcdir)/contrib/%D%/Makefile.inc
+include $(srcdir)/contrib/%D%/local.mk
TESTS += $(contrib_TESTS)
EXTRA_DIST += $(contrib_TESTS)
@@ -110,10 +110,6 @@ EXTRA_DIST += $(contrib_TESTS)
# "make all". This makes it easier to run the test cases by
# hand after having simply configured and built the package.
-nodist_noinst_SCRIPTS += \
- %D%/wrap/aclocal-$(APIVERSION) \
- %D%/wrap/automake-$(APIVERSION)
-
dist_noinst_DATA += \
%D%/ax/test-init.sh \
%D%/ax/test-lib.sh \
diff --git a/t/subobj-objname-clash.sh b/t/subobj-objname-clash.sh
new file mode 100644
index 000000000..a33d36bc5
--- /dev/null
+++ b/t/subobj-objname-clash.sh
@@ -0,0 +1,104 @@
+#! /bin/sh
+# Copyright (C) 1996-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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure that object names don't clash when using subdir-objects.
+# The check is done for clashing programs, clashing libraries and
+# a program that clashes with a library
+
+. test-init.sh
+
+mkdir src
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects foreign
+noinst_PROGRAMS =
+noinst_LIBRARIES =
+
+# CLASHING PROGRAMS
+noinst_PROGRAMS += foo src/foo
+foo_SOURCES = src/foo.c src/main.c
+foo_CPPFLAGS = -DVAL=0
+src_foo_CPPFLAGS = -DVAL=1
+src_foo_SOURCES = src/foo.c src/main.c
+
+# CLASHING LIBS
+noinst_PROGRAMS += bar src/bar
+noinst_LIBRARIES += libbar.a src/libbar.a
+bar_SOURCES = src/main.c
+bar_LDADD = libbar.a
+src_bar_SOURCES = src/main.c
+src_bar_LDADD = src/libbar.a
+libbar_a_SOURCES = src/foo.c
+libbar_a_CPPFLAGS = -DVAL=0
+src_libbar_a_SOURCES = src/foo.c
+src_libbar_a_CPPFLAGS = -DVAL=1
+
+# CLASHING PROGRAM + LIB
+noinst_PROGRAMS += libzap_a src/zap
+noinst_LIBRARIES += src/libzap.a
+libzap_a_SOURCES = src/main.c src/foo.c
+libzap_a_CPPFLAGS = -DVAL=2
+src_zap_SOURCES = src/main.c
+src_zap_LDADD = src/libzap.a
+src_libzap_a_SOURCES = src/foo.c
+src_libzap_a_CPPFLAGS = -DVAL=3
+
+# NON-CLASHING
+noinst_PROGRAMS += src/foo-uniq
+src_foo_uniq_SOURCES = src/main.c src/foo.c
+src_foo_uniq_CPPFLAGS = -DVAL=4
+END
+
+cat > src/foo.c << 'END'
+int
+foo ()
+{
+ return VAL;
+}
+END
+
+cat > src/main.c << 'END'
+int foo (void);
+
+int
+main ()
+{
+ return foo ();
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+set +e
+./foo || fail_ "./foo should return 0"
+./src/foo; test $? = 1 || fail_ "./src/foo should return 1"
+./bar || fail_ "./bar should return 0"
+./src/bar; test $? = 1 || fail_ "./src/bar should return 1"
+./libzap_a; test $? = 2 || fail_ "./libfoo_a should return 2"
+./src/zap; test $? = 3 || fail_ "./src/prog_libfoo should return 3"
+./src/foo-uniq; test $? = 4 || fail_ "./foo_uniq should return 4"
+set -e
+$MAKE clean
diff --git a/t/wrap/automake.in b/t/wrap/automake.in
deleted file mode 100644
index 1075346a1..000000000
--- a/t/wrap/automake.in
+++ /dev/null
@@ -1,27 +0,0 @@
-#!@PERL@ -w
-# @configure_input@
-
-# Copyright (C) 2012-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
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN
-{
- use strict;
- @Automake::perl_libdirs = ('@abs_top_srcdir@/lib');
- unshift @Automake::perl_libdirs, '@abs_top_builddir@/lib'
- if '@srcdir@' ne '.';
- unshift @ARGV, '--libdir=@abs_top_srcdir@/lib';
-}
-require '@abs_top_builddir@/bin/automake';