]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] dist: fixup: run slower compressors first
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 09:45:57 +0000 (11:45 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 09:45:57 +0000 (11:45 +0200)
For better parallelism in "make dist".  This was already the case
for mainline Automake, but our recent changes to the dist-related
code in Automake-NG had broken that invariant.

* automake.in (handle_dist): Here, use 'unshift' rather than
'push' on '@archive_formats'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
automake.in

index 331c55307eb9ffe503995ce5e7c578fa8f9ba942..366c16222dd6be4d8bb13bd0300268d7aad6ab15 100644 (file)
@@ -3217,10 +3217,10 @@ sub handle_dist ()
       # We order @archive_formats by expected duration of the
       # compressors, slowest first, for better parallelism in
       # "make dist".
-      push @archive_formats, 'gzip' unless option 'no-dist-gzip';
+      unshift @archive_formats, 'gzip' unless option 'no-dist-gzip';
       foreach my $fmt (qw/shar zip tarZ bzip2 lzip xz/)
         {
-          push @archive_formats, $fmt if option "dist-$fmt";
+          unshift @archive_formats, $fmt if option "dist-$fmt";
         }
       # At least one of the archive formats must be enabled.
       if (@archive_formats == 0)