Commit 4a0b7a10 authored by thomie's avatar thomie

Build: run autoreconf jobs in parallel

Running ./boot takes ~20 seconds on my laptop with 2 cores. With this change,
that goes down to a little over 10 seconds. There are 8 configure.ac files in
total, so max 8 parallel jobs.

Differential Revision: https://phabricator.haskell.org/D962
parent 3445947a
......@@ -155,16 +155,25 @@ sub boot_pkgs {
# autoreconf everything that needs it.
sub autoreconf {
my $dir;
my $fail;
foreach $dir (".", glob("libraries/*/")) {
if (-f "$dir/configure.ac") {
next if (my $pid = fork);
die "fork failed: $!" if (! defined $pid);
print "Booting $dir\n";
chdir $dir or die "can't change to $dir: $!";
system("autoreconf") == 0
or die "Running autoreconf failed with exitcode $?";
chdir $curdir or die "can't change to $curdir: $!";
exec("autoreconf");
exit 1;
}
}
# Wait for all child processes to finish.
while (wait() != -1) {
$fail = 1 if $?;
}
die "Running autoreconf failed" if $fail;
}
sub checkBuildMk {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment