diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2014-07-13 00:51:36 +0100 |
---|---|---|
committer | Robert Savoye <rob.savoye@linaro.org> | 2014-07-22 12:26:34 +0000 |
commit | db161edcd0fa1604f5c3ff0a3ec0907276f64b9d (patch) | |
tree | ccc0670f4e11aa57324e254eca50ae649cfe3252 | |
parent | 6faf6ea3fae5d931230a28d22bc308887ee9ae87 (diff) |
Enable parallelism by default
Also add --enable parallel and --disable parallel option handling and
--enable-parallel / --disable-parallel configure options to set
the default.
Change-Id: I3d41101e2a863490a9efaf5d07a41b6c1a5ed280
-rwxr-xr-x | cbuild2.sh | 3 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | host.conf.in | 1 | ||||
-rw-r--r-- | lib/globals.sh | 1 |
5 files changed, 31 insertions, 1 deletions
@@ -721,6 +721,9 @@ while test $# -gt 0; do install) install="${value}" ;; + parallel) + parallel="$value" + ;; schroot_test) schroot_test="${value}" ;; @@ -569,6 +569,7 @@ DEJAGNU LIBTOOL AUTOMAKE AUTOCONF +ENABLE_PARALLEL ENABLE_SOURCE_UPDATE ENABLE_SCHROOT_TEST ENABLE_MAKE_DOCS @@ -675,6 +676,7 @@ enable_install enable_make_docs enable_schroot_test enable_source_update +enable_parallel ' ac_precious_vars='build_alias host_alias @@ -1305,6 +1307,8 @@ Optional Features: --enable-make-docs If you want to enable making package documentation --enable-schroot-test If you want to used schroot-based testing by default --enable-source-update If you want to update sources by default + --enable-parallel If you want to build with make -j<number of CPUs> by + default Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -3815,6 +3819,20 @@ fi +# Check whether --enable-parallel was given. +if test "${enable_parallel+set}" = set; then : + enableval=$enable_parallel; case "${enableval}" in + yes) ENABLE_PARALLEL=yes ;; + no) ENABLE_PARALLEL=no ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-parallel option" >&5 +$as_echo "$as_me: WARNING: bad value ${enableval} for enable-parallel option" >&2;} ;; +esac +else + ENABLE_PARALLEL=yes +fi + + + for ac_prog in autoconf do diff --git a/configure.ac b/configure.ac index 2c552be..cc29d59 100644 --- a/configure.ac +++ b/configure.ac @@ -353,6 +353,15 @@ AC_ARG_ENABLE(source-update, AC_HELP_STRING([--enable-source-update], [If you wa esac], ENABLE_SOURCE_UPDATE=yes) AC_SUBST(ENABLE_SOURCE_UPDATE) +dnl if you want to update sources by default +AC_ARG_ENABLE(parallel, AC_HELP_STRING([--enable-parallel], [If you want to build with make -j<number of CPUs> by default]), +[case "${enableval}" in + yes) ENABLE_PARALLEL=yes ;; + no) ENABLE_PARALLEL=no ;; + *) AC_MSG_WARN([bad value ${enableval} for enable-parallel option]) ;; +esac], ENABLE_PARALLEL=yes) +AC_SUBST(ENABLE_PARALLEL) + dnl AC_ARG_WITH(snapshots, dnl AC_HELP_STRING([--with-snapshots], []), dnl snapshots=${withval}, diff --git a/host.conf.in b/host.conf.in index db55cab..a790d12 100644 --- a/host.conf.in +++ b/host.conf.in @@ -34,6 +34,7 @@ install=@ENABLE_INSTALL@ schroot_test=@ENABLE_SCHROOT_TEST@ make_docs=@ENABLE_MAKE_DOCS@ supdate=@ENABLE_SOURCE_UPDATE@ +parallel=@ENABLE_PARALLEL@ wget_bin=@WGET@ bash_shell=@BASH@ diff --git a/lib/globals.sh b/lib/globals.sh index cc46799..4a91845 100644 --- a/lib/globals.sh +++ b/lib/globals.sh @@ -81,7 +81,6 @@ fi clobber=no force=no interactive=no -parallel=no nodepends=no verbose=1 network="" |