summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-26 19:29:25 +0100
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2008-10-26 19:35:07 +0100
commit937775c8efa56c28891748aa75ab540a7a884315 (patch)
tree254db483a73695dafc72fa661469af14060845f7 /bootstrap
parent2b85923e0b06f7f633b7f9f18bdec2b16ec5d958 (diff)
downloadautomake-937775c8efa56c28891748aa75ab540a7a884315.tar.gz
Parallel automake execution: AUTOMAKE_JOBS.
* lib/Automake/Config.in (perl_threads): New global. * automake.in: Use it. If the perl supports interpreter-based threading, then use `threads' and `Thread::Queue'. (handle_makefile, handle_makefiles_serial): New functions, factored out from main. (get_number_of_threads): New function, compute number of threads to use, based on environment variable `AUTOMAKE_JOBS' and number of independent makefiles. (handle_makefiles_threaded): New function. Spawn threads, use thread queue to distribute handling the different makefiles. Collect $exit_code values from threads. (main): Use new functions. * aclocal.in: No threads here. * configure.ac: Substitute PERL_THREADS; enabled with perl >= 5.7.2 and when ithreads are available. * bootstrap (dosubst): Likewise. * Makefile.am (do_subst): Likewise. * lib/Automake/Makefile.am (do_subst): Likewise. * lib/Automake/ChannelDefs.pm: Use `Automake::Config' and `threads'. (verb): Prepend thread ID (tid) to verbose messages. * lib/Automake/Channels.pm (msg): Before exiting, flush stderr, needed for worker threads. * lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Also include the build tree path, so Config.pm is found. * tests/parallel-am.test: New test. * tests/Makefile.am: Update. * doc/automake.texi (Invoking Automake): Document AUTOMAKE_JOBS. * NEWS, THANKS: Update. Report about long execution times by Joakim Tjernlund and others. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap2
1 files changed, 2 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index aa50f5d14..8437d116d 100755
--- a/bootstrap
+++ b/bootstrap
@@ -56,6 +56,7 @@ fi
VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
PACKAGE=automake
datadir=.
+PERL_THREADS=0
# Override SHELL. This is required on DJGPP so that Perl's system()
# uses bash, not COMMAND.COM which doesn't quote arguments properly.
@@ -100,6 +101,7 @@ dosubst ()
sed -e "s%@APIVERSION@%$APIVERSION%g" \
-e "s%@PACKAGE@%$PACKAGE%g" \
-e "s%@PERL@%$PERL%g" \
+ -e "s%@PERL_THREADS@%$PERL_THREADS%g" \
-e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \
-e "s%@VERSION@%$VERSION%g" \
-e "s%@datadir@%$datadir%g" \