diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-22 11:20:14 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-22 17:17:35 +0100 |
commit | 2c0ffb86f2c7df3476cb9bc5a6e6ff724d95aa01 (patch) | |
tree | f5504d9c5ed3766091b7e16e6721d3880d4ee14b /bin/automake.in | |
parent | 986a82e394ee7d8284e67e4d6bc3585daf485ac3 (diff) | |
download | automake-2c0ffb86f2c7df3476cb9bc5a6e6ff724d95aa01.tar.gz |
dist: ordering of files in DIST_COMMON is deterministic now
It had likely stopped being deterministic due to the new perl behavior
of having non-deterministic order of numerating hash keys:
<http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Hash_randomization>
<http://onionstand.blogspot.ie/2012/12/are-you-relying-on-hash-keys-being.html>
See also similar commit v1.14-19-g52e6404, albeit in this case the issue
is likely coming from autom4te/autoconf, not from automake itself.
Fixes automake bug http://debbugs.gnu.org/17908
* bin/automake.in (handle_dist): Sort @dist_common.
(print_autodist_files): Swap invocations of 'sort' and 'uniq', for
consistency with the new code in 'handle_dist' and to get rid of a
minor hack.
* NEWS: Update.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'bin/automake.in')
-rw-r--r-- | bin/automake.in | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/automake.in b/bin/automake.in index 283d1bbfe..785145498 100644 --- a/bin/automake.in +++ b/bin/automake.in @@ -3714,10 +3714,13 @@ sub handle_dist () } } - # Files to distributed. Don't use ->value_as_list_recursive - # as it recursively expands '$(dist_pkgdata_DATA)' etc. + # Files to distributed. Don't use ->value_as_list_recursive as it + # recursively expands '$(dist_pkgdata_DATA)' etc. + # 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). my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value); - @dist_common = uniq (@dist_common); + @dist_common = uniq (sort @dist_common); variable_delete 'DIST_COMMON'; define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @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 = |