[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, minor, updated. v1.14.1-59-
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, minor, updated. v1.14.1-59-g88ac92b |
Date: |
Mon, 22 Dec 2014 19:12:15 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=88ac92b2d5beaf4aee7d7bb4f3dc9a86da823550
The branch, minor has been updated
via 88ac92b2d5beaf4aee7d7bb4f3dc9a86da823550 (commit)
via 912383451a4a394383a8e95240e3e98ee68faf72 (commit)
via 2c0ffb86f2c7df3476cb9bc5a6e6ff724d95aa01 (commit)
via 986a82e394ee7d8284e67e4d6bc3585daf485ac3 (commit)
via cfc6916ef499014b71e874924f1077e8c0604f89 (commit)
via 3c72ada8d048c6d92a6fd323f6647c8e090dd7a6 (commit)
via 5401c31d27b6bdafe0246cf780830717af44188e (commit)
via e7c14d967b5bfa587c4a9fc847126b39198b7463 (commit)
from 4179284a3de093f3578a67c9b258a0d91eb4b6be (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 2 +-
NEWS | 11 ++++++++-
bin/automake.in | 56 ++++++++++++++++++++++----------------------
doc/automake.texi | 2 +-
gen-testsuite-part | 8 ++++--
lib/am/distdir.am | 1 +
lib/am/header-vars.am | 33 +++++++++++++++++++++++--
m4/lispdir.m4 | 2 +-
t/Makefile.inc | 4 +-
t/distcom-subdir.sh | 51 ++++++++++++++++++++-------------------
t/distcom2.sh | 12 +++------
t/distcom3.sh | 22 ++++++++---------
t/distcom4.sh | 28 ++++++---------------
t/distcom5.sh | 42 +++++++++++---------------------
t/hdr-vars-defined-once.sh | 23 ++++++++----------
15 files changed, 152 insertions(+), 145 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7e1c748..ba4179c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,7 +72,7 @@ generated_file_finalize = $(AM_V_at) \
# 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; }
+ { PATH='$(abs_builddir)/t/wrap$(PATH_SEPARATOR)'$$PATH && export PATH; }
# The master location for INSTALL is lib/INSTALL.
# This is where "make fetch" will install new versions.
diff --git a/NEWS b/NEWS
index 2e7f31f..4d451fc 100644
--- a/NEWS
+++ b/NEWS
@@ -111,6 +111,15 @@ New in 1.15:
- We no longer risk to use '$ac_aux_dir' before it's defined (see
automake bug#15981). Bug introduced in Automake 1.14.
+ - The code used to detect whether the currently used make is GNU make
+ or not (relying on the private macro 'am__is_gnu_make') no longer
+ risks causing "Arg list too long" for projects using automatic
+ dependency tracking and having a ton of source files (bug#18744).
+
+ - Automake tries to offer a more deterministic output for generated
+ Makefiles, in the face of the newly-introduced randomization for
+ hash keys order in Perl 5.18.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.14.1:
@@ -126,7 +135,7 @@ New in 1.14.1:
was only relevant when the number of python files was high (which is
unusual in practice).
- - Automake try to offer a more reproducible output for warning messages,
+ - Automake try to offer a more deterministic output for warning messages,
in the face of the newly-introduced randomization for hash keys order
in Perl 5.18.
diff --git a/bin/automake.in b/bin/automake.in
index f9cc611..eedc8bc 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -342,7 +342,7 @@ my %extension_map = ();
# List of the DIST_COMMON files we discovered while reading
# configure.ac.
-my $configure_dist_common = '';
+my @configure_dist_common = ();
# This maps languages names onto objects.
my %languages = ();
@@ -489,6 +489,9 @@ my %language_scratch;
# handling on a per-language basis.
my %lang_specific_files;
+# List of distributed files to be put in DIST_COMMON.
+my @dist_common;
+
# This is set when 'handle_dist' has finished. Once this happens,
# we should no longer push on dist_common.
my $handle_dist_run;
@@ -586,8 +589,11 @@ sub initialize_per_input ()
@dist_targets = ();
+ @dist_common = ();
+ $handle_dist_run = 0;
+
%known_programs = ();
- %known_libraries= ();
+ %known_libraries = ();
%extension_seen = ();
@@ -595,8 +601,6 @@ sub initialize_per_input ()
%lang_specific_files = ();
- $handle_dist_run = 0;
-
$need_link = 0;
$must_handle_compiled_objects = 0;
@@ -3693,8 +3697,8 @@ sub handle_dist ()
}
}
- # We might copy elements from $configure_dist_common to
- # %dist_common if we think we need to. If the file appears in our
+ # We might copy elements from @configure_dist_common to
+ # @dist_common if we think we need to. If the file appears in our
# directory, we would have discovered it already, so we don't
# check that. But if the file is in a subdir without a Makefile,
# we want to distribute it here if we are doing '.'. Ugly!
@@ -3706,23 +3710,25 @@ sub handle_dist ()
# See also automake bug#9651.
if ($relative_dir eq '.')
{
- foreach my $file (split (' ' , $configure_dist_common))
+ foreach my $file (@configure_dist_common)
{
my $dir = dirname ($file);
push_dist_common ($file)
if ($dir eq '.' || ! is_make_dir ($dir));
}
+ @configure_dist_common = ();
}
- # Files to distributed. Don't use ->value_as_list_recursive
- # as it recursively expands '$(dist_pkgdata_DATA)' etc.
- my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
- @dist_common = uniq (@dist_common);
- variable_delete 'DIST_COMMON';
- define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
+ # $(am__DIST_COMMON): files to be distributed automatically. Will be
+ # appended to $(DIST_COMMON) in the generated Makefile.
+ # Use 'sort' so that the expansion of $(DIST_COMMON) in the generated
+ # Makefile is deterministic, in face of m4 and/or perl randomizations
+ # (see automake bug#17908).
+ define_pretty_variable ('am__DIST_COMMON', TRUE, INTERNAL,
+ uniq (sort @dist_common));
- # Now that we've processed DIST_COMMON, disallow further attempts
- # to set it.
+ # Now that we've processed @dist_common, disallow further attempts
+ # to modify it.
$handle_dist_run = 1;
$transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook';
@@ -5432,8 +5438,7 @@ sub scan_autoconf_files ()
if -f $config_aux_dir . '/install.sh';
# Preserve dist_common for later.
- $configure_dist_common = variable_value ('DIST_COMMON') || '';
-
+ @configure_dist_common = @dist_common;
}
################################################################
@@ -7399,11 +7404,10 @@ sub required_file_check_or_copy
return
if $found_it && (! $add_missing || ! $force_missing);
- # If we've already looked for it, we're done. You might
- # wonder why we don't do this before searching for the
- # file. If we do that, then something like
- # AC_OUTPUT(subdir/foo foo) will fail to put foo.in into
- # DIST_COMMON.
+ # If we've already looked for it, we're done. You might wonder why we
+ # don't do this before searching for the file. If we do that, then
+ # something like AC_OUTPUT([subdir/foo foo]) will fail to put 'foo.in'
+ # into $(DIST_COMMON).
if (! $found_it)
{
return if defined $required_file_not_found{$fullfile};
@@ -7690,8 +7694,7 @@ sub push_dist_common
{
prog_error "push_dist_common run after handle_dist"
if $handle_dist_run;
- Automake::Variable::define ('DIST_COMMON', VAR_AUTOMAKE, '+', TRUE, "@_",
- '', INTERNAL, VAR_PRETTY);
+ push @dist_common, @_;
}
@@ -7883,10 +7886,7 @@ sub generate_makefile
# Helper function for usage().
sub print_autodist_files
{
- # NOTE: we need to call our 'uniq' function with the leading '&'
- # here, because otherwise perl complains that "Unquoted string
- # 'uniq' may clash with future reserved word".
- my @lcomm = sort (&uniq (@_));
+ my @lcomm = uniq (sort @_);
my @four;
format USAGE_FORMAT =
diff --git a/doc/automake.texi b/doc/automake.texi
index 54f3bb3..fb6c05f 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -12971,7 +12971,7 @@ instance, here is how @code{AM_PATH_LISPDIR}
(@pxref{Emacs Lisp})
computes @samp{$(lispdir)}:
@example
-$EMACS -batch -q -eval '(while load-path
+$EMACS -batch -Q -eval '(while load-path
(princ (concat (car load-path) "\n"))
(setq load-path (cdr load-path)))' >conftest.out
lispdir=`sed -n
diff --git a/gen-testsuite-part b/gen-testsuite-part
index 98f8c24..46ae56d 100755
--- a/gen-testsuite-part
+++ b/gen-testsuite-part
@@ -283,8 +283,9 @@ foreach my $test (@all_tests)
$wrapper_setups{$test} = address@hidden if @setups;
}
# And now create all the wrapper tests.
-while (my ($wrapped_test, $setup_list) = each %wrapper_setups)
+for my $wrapped_test (sort keys %wrapper_setups)
{
+ my $setup_list = $wrapper_setups{$wrapped_test};
(my $base = $wrapped_test) =~ s/\.([^.]*)$//;
my $suf = $1 or die "$me: test '$wrapped_test' lacks a suffix\n";
my $count = 0;
@@ -345,7 +346,7 @@ my %depmodes =
foreach my $lt (TRUE, FALSE)
{
- foreach my $m (keys %depmodes)
+ foreach my $m (sort keys %depmodes)
{
my $planned = ($lt && $m eq "auto") ? 84 : 28;
my @required =
@@ -400,8 +401,9 @@ print <<EOF;
EOF
-while (my ($k, $x) = each %deps_extractor)
+for my $k (sort keys %deps_extractor)
{
+ my $x = $deps_extractor{$k};
my $dist_prereqs = $x->{dist_prereqs} || "";
my $nodist_prereqs = $x->{nodist_prereqs} || "";
my @tests = grep { line_match $x->{line_matcher}, $_ } @all_tests;
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 7834f3d..3441a7c 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -14,6 +14,7 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
+DIST_COMMON += $(am__DIST_COMMON)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
if %?TOPDIR_P%
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 463531a..9283903 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -27,9 +27,36 @@ VPATH = @srcdir@
## DESTDIR =
## Shell code that determines whether we are running under GNU make.
-## This is somewhat of an hack, and might be improved, but is good
-## enough for now.
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+##
+## Why the this needs to be so convoluted?
+##
+## (1) We can't unconditionally use make functions or special variables
+## starting with a dot, as those cause non-GNU implmentations to
+## crash hard.
+##
+## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some
+## non-GNU make implementations (e.g., FreeBSD make). But at least
+## BSD make does *not* define the $(CURDIR) variable -- it uses
+## $(.CURDIR) instead.
+##
+## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it
+## might cause the shell to die with "Arg list too long" (see
+## automake bug#18744).
+##
+## (4) We can't use $(MAKE_HOST) unconditionally, as it is only
+## defined in GNU make 4.0 or later.
+##
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
## Shell code that determines whether the current make instance is
## running with a given one-letter option (e.g., -k, -n) that takes
diff --git a/m4/lispdir.m4 b/m4/lispdir.m4
index 95a88da..f1f2212 100644
--- a/m4/lispdir.m4
+++ b/m4/lispdir.m4
@@ -34,7 +34,7 @@ AC_DEFUN([AM_PATH_LISPDIR],
# which is non-obvious for non-emacs users.
# Redirecting /dev/null should help a bit; pity we can't detect "broken"
# emacsen earlier and avoid running this altogether.
- AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car
load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
+ AC_RUN_LOG([$EMACS -batch -Q -eval '(while load-path (princ (concat (car
load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
am_cv_lispdir=`sed -n \
-e 's,/$,,' \
-e
'/.*\/lib\/x*emacs\/site-lisp$/{s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;}'
\
diff --git a/t/Makefile.inc b/t/Makefile.inc
index 5f10d90..62613ac 100644
--- a/t/Makefile.inc
+++ b/t/Makefile.inc
@@ -64,9 +64,9 @@ AM_TESTS_ENVIRONMENT += stderr_fileno_=9; export
stderr_fileno_;
# in case it is given with a relative name containing no slashes.
AM_TESTS_ENVIRONMENT += \
if test $(srcdir) != .; then \
- PATH='$(abs_srcdir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \
+ PATH='$(abs_srcdir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
fi; \
- PATH='$(abs_builddir)/%D%/ax'$(PATH_SEPARATOR)$$PATH; \
+ PATH='$(abs_builddir)/%D%/ax$(PATH_SEPARATOR)'$$PATH; \
export PATH;
# Hand-written tests.
diff --git a/t/distcom-subdir.sh b/t/distcom-subdir.sh
index 257561e..df40f96 100644
--- a/t/distcom-subdir.sh
+++ b/t/distcom-subdir.sh
@@ -17,59 +17,60 @@
# Test to make sure that if an auxfile (here depcomp) is required
# by a subdir Makefile.am, it is distributed by that Makefile.am.
+required=cc
. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
+AC_PROG_FGREP
AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = subdir
+test-distdir: distdir
+ test -f $(distdir)/depcomp
+.PHONY: test-distdir
+check-local: test-distdir
END
rm -f depcomp
mkdir subdir
-: > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+.PHONY: test-distcom
+test-distcom:
+ echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+END
$ACLOCAL
$AUTOCONF
$AUTOMAKE
test ! -e depcomp
-cat > subdir/Makefile.am << 'END'
+cat >> subdir/Makefile.am << 'END'
bin_PROGRAMS = foo
+.PHONY: test-distcom
+test-distcom:
+ echo ' ' $(DIST_COMMON) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+check-local: test-distcom
END
-: > subdir/foo.c
+cat > subdir/foo.c <<'END'
+int main (void)
+{
+ return 0;
+}
+END
$AUTOMAKE -a subdir/Makefile
test -f depcomp
-# FIXME: the logic of this check and other similar ones in other
-# FIXME: 'distcom*.sh' files should be factored out in a common
-# FIXME: subroutine in 'am-test-lib.sh'...
-sed -n -e "
- /^DIST_COMMON =.*\\\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\\\$/\\\\/
- t loop
- s/$/ /
- s/[$tab ][$tab ]*/ /g
- p
- n
- }" subdir/Makefile.in > dc.txt
-cat dc.txt
-$FGREP ' $(top_srcdir)/depcomp ' dc.txt
-
./configure
-$MAKE distdir
-test -f $distdir/depcomp
+(cd subdir && $MAKE test-distcom)
+$MAKE test-distdir
+
+$MAKE distcheck
:
diff --git a/t/distcom2.sh b/t/distcom2.sh
index c13a6d7..3eb0376 100644
--- a/t/distcom2.sh
+++ b/t/distcom2.sh
@@ -51,22 +51,18 @@ for opt in '' --no-force; do
test -f depcomp
for dir in . subdir; do
- # FIXME: the logic of this check and other similar ones in other
- # FIXME: 'distcom*.sh' files should be factored out in a common
- # FIXME: subroutine in 'am-test-lib.sh'...
sed -n -e "
- /^DIST_COMMON =.*\\\\$/ {
+ /^am__DIST_COMMON =.*/ {
+ b body
:loop
- p
n
- t clear
- :clear
+ :body
+ p
s/\\\\$/\\\\/
t loop
s/$/ /
s/[$tab ][$tab ]*/ /g
p
- n
}" $dir/Makefile.in > $dir/dc.txt
done
diff --git a/t/distcom3.sh b/t/distcom3.sh
index 7837959..6f1ebaf 100644
--- a/t/distcom3.sh
+++ b/t/distcom3.sh
@@ -19,9 +19,13 @@
. test-init.sh
+echo AC_OUTPUT >> configure.ac
+
cat > Makefile.am << 'END'
README:
echo 'I bet you are reading me.' > README
+test-distcommon:
+ echo ' ' $(DIST_COMMON) ' ' | grep ' README '
END
# Files required by '--gnu'.
@@ -36,20 +40,14 @@ $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output;
exit 1; }
cat output
grep README output && exit 1
-sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep README
-
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+test -f $distdir/README
# Should warn about missing README.
+rm -f README
: > Makefile.am
AUTOMAKE_fails --add-missing --gnu
grep 'required file.*README.*not found' stderr
diff --git a/t/distcom4.sh b/t/distcom4.sh
index 5feae9b..39b5b71 100644
--- a/t/distcom4.sh
+++ b/t/distcom4.sh
@@ -43,8 +43,13 @@ mkdir tests
: > README
: > tests/wrapper.in
cat > Makefile.am << 'END'
-.PHONY: test
-test: distdir
+.PHONY: test1 test 2
+test1:
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep 'tests/' > lst
+ cat lst # For debugging.
+ test `wc -l <lst` -eq 1
+test2: distdir
test -f $(distdir)/tests/wrapper.in
END
@@ -52,23 +57,6 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
-$MAKE test
-
-sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' Makefile.in > dc.txt
-
-cat dc.txt # For debugging.
-
-test 1 -eq $(grep -c tests dc.txt)
-grep configure dc.txt
+$MAKE test1 test2
:
diff --git a/t/distcom5.sh b/t/distcom5.sh
index 2bb1b34..939702f 100644
--- a/t/distcom5.sh
+++ b/t/distcom5.sh
@@ -21,21 +21,6 @@
. test-init.sh
-extract_distcommon ()
-{
- sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' ${1+"$@"}
-}
-
cat >> configure.ac << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
[chmod +x tests/autoconf])
@@ -57,28 +42,31 @@ END
mkdir tests
: > tests/wrapper.in
-: > tests/Makefile.am
+
cat > Makefile.am << 'END'
SUBDIRS = tests
.PHONY: test
test: distdir
test -f $(distdir)/tests/wrapper.in
+check-local: test
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep tests && exit 1; :
+END
+
+cat > tests/Makefile.am <<'END'
+check-local:
+ for x in $(DIST_COMMON); do echo $$x; done \
+ | grep wrapper.in > lst
+ cat lst # For debugging.
+ test `wc -l <lst` -eq 1
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure
-$MAKE test
-
-extract_distcommon Makefile.in > top.txt
-extract_distcommon tests/Makefile.in > inner.txt
-
-# Might be useful for debugging.
-cat top.txt
-cat inner.txt
-
-test 0 -eq $(grep -c tests top.txt)
-test 1 -eq $(grep -c wrapper inner.txt)
+$MAKE check
+# Sanity check.
+test -f tests/lst
:
diff --git a/t/hdr-vars-defined-once.sh b/t/hdr-vars-defined-once.sh
index 85a254a..fdf0bb7 100644
--- a/t/hdr-vars-defined-once.sh
+++ b/t/hdr-vars-defined-once.sh
@@ -25,25 +25,22 @@ END
cat > Makefile.am << 'END'
include Will_Be_Included_In_Makefile
+test-distcommon:
+ echo ' ' $(DIST_COMMON) ' ' \
+ | grep '[ /]Will_Be_Included_In_Makefile '
END
-: > Will_Be_Included_In_Makefile
+id=0c35bbde7c95b569a
+echo "# $id" > Will_Be_Included_In_Makefile
$ACLOCAL
$AUTOMAKE
test $(grep -c '^srcdir' Makefile.in) -eq 1
-# Also make sure include file is distributed.
-sed -n -e '/^DIST_COMMON =.*\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\$/\\/
- t loop
- p
- n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+$AUTOCONF
+./configure
+$MAKE test-distcommon
+$MAKE distdir
+grep "$id" $distdir/Will_Be_Included_In_Makefile
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, minor, updated. v1.14.1-59-g88ac92b,
Stefano Lattarini <=