automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFE: make automake's output deterministic


From: Ralf Wildenhues
Subject: Re: RFE: make automake's output deterministic
Date: Wed, 2 Jan 2008 20:31:15 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hello Bruno,

Thanks for the bug report, and a Happy New Year.

* Bruno Haible wrote on Wed, Dec 26, 2007 at 03:43:40PM CET:
> 
> When automake is installing files, it does so in a non-deterministic order.
> For example, in the same situation, sometimes "automake -a" outputs
> 
> configure.in:5: installing `./config.sub'
> configure.in:3: installing `./install-sh'
> configure.in:3: installing `./missing'
> configure.in:5: installing `./config.guess'
> 
> and sometimes it outputs
> 
> configure.in:5: installing `./config.guess'
> configure.in:3: installing `./install-sh'
> configure.in:3: installing `./missing'
> configure.in:5: installing `./config.sub'
[...]

> Can automake be made to use a deterministic hash table or sort the list of
> files before processing it?

The patch below should do the trick, I think.  It would be nice to have
a test to expose this to go along with this change if possible.  Can you
provide a recipe to reproduce the ordering change?

I guess it depends on the order the traces are read from the autom4te
cache, which in turn might depend on the order in which autotools have
been called and whether called by autoreconf.  However, in a couple of
casual tests I can't expose this here.  Which M4 and Autoconf versions
do you use?

FWIW, the patch should go into branch-1-10, too.

Thanks,
Ralf

2008-01-02  Ralf Wildenhues  <address@hidden>

        * automake.in (scan_autoconf_files): Sort loop over
        %required_aux_file, for stable verbose output.
        Report by Bruno Haible.

diff --git a/automake.in b/automake.in
index 3720769..a3d56a0 100755
--- a/automake.in
+++ b/automake.in
@@ -5146,8 +5146,9 @@ sub scan_autoconf_files ()
   # check must be done for every run, even those where we are only
   # looking at a subdir Makefile.  We must set relative_dir for
   # maybe_push_required_file to work.
+  # Sort the files for stable verbose output.
   $relative_dir = '.';
-  foreach my $file (keys %required_aux_file)
+  foreach my $file (sort keys %required_aux_file)
     {
       require_conf_file ($required_aux_file{$file}->get, FOREIGN, $file)
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]