summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-11-02 02:50:27 +0000
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-11-02 02:50:27 +0000
commit5dac4618eb70a58a4be091b1559cd29c6c8481e3 (patch)
treeea9a60bcf944da1f50627bc34ecbc1addab7ce44 /lib
parent82216ce83ba3cdf3572b58e4d9e84886ab02d22d (diff)
parent16d8cb026a41d9344b1d0cf291b663fd48fa0f45 (diff)
downloadautomake-5dac4618eb70a58a4be091b1559cd29c6c8481e3.tar.gz
Merge branch 'micro' into minor
* micro: cosmetics: fix typo in a user-facing message in tests automake: account for perl hash order randomization tests: avoid use of intervals to capitalize letters distcheck: don't allow overriding of --prefix and --srcdir by the user tests: expose bug#14991 (relates to 'distcheck')
Diffstat (limited to 'lib')
-rw-r--r--lib/Automake/Variable.pm14
-rw-r--r--lib/am/distdir.am11
2 files changed, 14 insertions, 11 deletions
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index f1559f58c..4751563a3 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -317,21 +317,21 @@ use vars '%_variable_dict', '%_primary_dict';
sub variables (;$)
{
my ($suffix) = @_;
+ my @vars = ();
if ($suffix)
{
if (exists $_primary_dict{$suffix})
{
- return values %{$_primary_dict{$suffix}};
- }
- else
- {
- return ();
+ @vars = values %{$_primary_dict{$suffix}};
}
}
else
{
- return values %_variable_dict;
+ @vars = values %_variable_dict;
}
+ # The behaviour of the 'sort' built-in is undefined in scalar
+ # context, hence we need an ad-hoc handling for such context.
+ return wantarray ? sort { $a->name cmp $b->name } @vars : scalar @vars;
}
=item C<Automake::Variable::reset>
@@ -1080,7 +1080,7 @@ For debugging.
sub variables_dump ()
{
my $text = "all variables:\n{\n";
- foreach my $var (sort { $a->name cmp $b->name } variables)
+ foreach my $var (variables())
{
$text .= $var->dump;
}
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index f3549876e..a8ad63cef 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -452,13 +452,16 @@ distcheck: dist
## so be sure to 'cd' back to the original directory after this.
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && ../configure \
?GETTEXT? --with-included-gettext \
-## Additional flags for configure. Keep this last in the configure
-## invocation so the developer and user can override previous options,
-## and let the user's flags take precedence over the developer's ones.
+## Additional flags for configure.
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+## At the moment, the code doesn't actually support changes in these --srcdir
+## and --prefix values, so don't allow them to be overridden by the user or
+## the developer. That used to be allowed, and caused issues in practice
+## (in corner-case usages); see automake bug#14991.
+ --srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \