aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcbuild2.sh43
-rwxr-xr-xconfigure85
-rw-r--r--configure.ac45
-rw-r--r--host.conf.in5
-rw-r--r--lib/globals.sh6
5 files changed, 159 insertions, 25 deletions
diff --git a/cbuild2.sh b/cbuild2.sh
index d8dc5326..2107c807 100755
--- a/cbuild2.sh
+++ b/cbuild2.sh
@@ -666,35 +666,40 @@ while test $# -gt 0; do
shift
;;
# These steps are disabled by default but are sometimes useful.
- --enable*)
- check_directive $1 "enable" "enable" $2
- case $2 in
- bootstrap|b*)
- bootstrap=yes
+ --enable*|--disable*)
+ case "$1" in
+ --enable*)
+ check_directive $1 "enable" "enable" $2
+ value="yes"
;;
- alltests|b*)
- alltests=yes
+ --disable*)
+ check_directive $1 "disable" "disable" $2
+ value="no"
;;
-
*)
- error "$2 not recognized as a valid --enable directive."
+ error "Internal failure. Should never happen."
build_failure
;;
esac
- shift
- ;;
- # These are enabled by default, but not always desired.
- --disable*)
- check_directive $1 "disable" "disable" $2
+
case $2 in
- install|i*)
- install=no
+ bootstrap)
+ bootstrap="$value"
+ ;;
+ alltests)
+ alltests="$value"
+ ;;
+ install)
+ install="$value"
+ ;;
+ schroot_test)
+ schroot_test="$value"
;;
- update|u*)
- supdate=no
+ update)
+ supdate="$value"
;;
*)
- error "$2 not recognized as a valid --disable directive."
+ error "$2 not recognized as a valid $1 directive."
build_failure
;;
esac
diff --git a/configure b/configure
index c396f51f..a101fd1e 100755
--- a/configure
+++ b/configure
@@ -589,6 +589,11 @@ DEJAGNU
LIBTOOL
AUTOMAKE
AUTOCONF
+ENABLE_SOURCE_UPDATE
+ENABLE_SCHROOT_TEST
+ENABLE_INSTALL
+ENABLE_ALLTESTS
+ENABLE_BOOTSTRAP
ENABLE_SSH
REMOTE_SNAPSHOTS
LOCAL_BUILDS
@@ -681,6 +686,11 @@ with_local_snapshots
with_local_builds
with_remote_snapshots
enable_ssh
+enable_bootstrap
+enable_alltests
+enable_install
+enable_schroot_test
+enable_source_update
'
ac_precious_vars='build_alias
host_alias
@@ -1303,6 +1313,11 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-ssh If you have SSH access to remote build host
+ --enable-bootstrap If you want to do bootstrap by default
+ --enable-alltests If you want to run all tests by default
+ --enable-install If you want to install by default
+ --enable-schroot-test If you want to used schroot-based testing by default
+ --enable-source-update If you want to update sources by default
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -3715,6 +3730,76 @@ fi
+# Check whether --enable-bootstrap was given.
+if test "${enable_bootstrap+set}" = set; then :
+ enableval=$enable_bootstrap; case "${enableval}" in
+ yes) ENABLE_BOOTSTRAP=yes ;;
+ no) ENABLE_BOOTSTRAP=no ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-bootstrap option" >&5
+$as_echo "$as_me: WARNING: bad value ${enableval} for enable-bootstrap option" >&2;} ;;
+esac
+else
+ ENABLE_BOOTSTRAP=no
+fi
+
+
+
+# Check whether --enable-alltests was given.
+if test "${enable_alltests+set}" = set; then :
+ enableval=$enable_alltests; case "${enableval}" in
+ yes) ENABLE_ALLTESTS=yes ;;
+ no) ENABLE_ALLTESTS=no ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-alltests option" >&5
+$as_echo "$as_me: WARNING: bad value ${enableval} for enable-alltests option" >&2;} ;;
+esac
+else
+ ENABLE_ALLTESTS=no
+fi
+
+
+
+# Check whether --enable-install was given.
+if test "${enable_install+set}" = set; then :
+ enableval=$enable_install; case "${enableval}" in
+ yes) ENABLE_INSTALL=yes ;;
+ no) ENABLE_INSTALL=no ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-install option" >&5
+$as_echo "$as_me: WARNING: bad value ${enableval} for enable-install option" >&2;} ;;
+esac
+else
+ ENABLE_INSTALL=yes
+fi
+
+
+
+# Check whether --enable-schroot-test was given.
+if test "${enable_schroot_test+set}" = set; then :
+ enableval=$enable_schroot_test; case "${enableval}" in
+ yes) ENABLE_SCHROOT_TEST=yes ;;
+ no) ENABLE_SCHROOT_TEST=no ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-schroot-test option" >&5
+$as_echo "$as_me: WARNING: bad value ${enableval} for enable-schroot-test option" >&2;} ;;
+esac
+else
+ ENABLE_SCHROOT_TEST=no
+fi
+
+
+
+# Check whether --enable-source-update was given.
+if test "${enable_source_update+set}" = set; then :
+ enableval=$enable_source_update; case "${enableval}" in
+ yes) ENABLE_SOURCE_UPDATE=yes ;;
+ no) ENABLE_SOURCE_UPDATE=no ;;
+ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bad value ${enableval} for enable-source-update option" >&5
+$as_echo "$as_me: WARNING: bad value ${enableval} for enable-source-update option" >&2;} ;;
+esac
+else
+ ENABLE_SOURCE_UPDATE=yes
+fi
+
+
+
for ac_prog in autoconf
do
diff --git a/configure.ac b/configure.ac
index 4984db01..9d0fe872 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,6 +292,51 @@ AC_ARG_ENABLE(ssh, AC_HELP_STRING([--enable-ssh], [If you have SSH access to rem
esac], ENABLE_SSH=no)
AC_SUBST(ENABLE_SSH)
+dnl if you want to do bootstrap by default
+AC_ARG_ENABLE(bootstrap, AC_HELP_STRING([--enable-bootstrap], [If you want to do bootstrap by default]),
+[case "${enableval}" in
+ yes) ENABLE_BOOTSTRAP=yes ;;
+ no) ENABLE_BOOTSTRAP=no ;;
+ *) AC_MSG_WARN([bad value ${enableval} for enable-bootstrap option]) ;;
+esac], ENABLE_BOOTSTRAP=no)
+AC_SUBST(ENABLE_BOOTSTRAP)
+
+dnl if you want to run all tests by default
+AC_ARG_ENABLE(alltests, AC_HELP_STRING([--enable-alltests], [If you want to run all tests by default]),
+[case "${enableval}" in
+ yes) ENABLE_ALLTESTS=yes ;;
+ no) ENABLE_ALLTESTS=no ;;
+ *) AC_MSG_WARN([bad value ${enableval} for enable-alltests option]) ;;
+esac], ENABLE_ALLTESTS=no)
+AC_SUBST(ENABLE_ALLTESTS)
+
+dnl if you want to install by default
+AC_ARG_ENABLE(install, AC_HELP_STRING([--enable-install], [If you want to install by default]),
+[case "${enableval}" in
+ yes) ENABLE_INSTALL=yes ;;
+ no) ENABLE_INSTALL=no ;;
+ *) AC_MSG_WARN([bad value ${enableval} for enable-install option]) ;;
+esac], ENABLE_INSTALL=yes)
+AC_SUBST(ENABLE_INSTALL)
+
+dnl if you want to enable schroot-based testing by default
+AC_ARG_ENABLE(schroot-test, AC_HELP_STRING([--enable-schroot-test], [If you want to used schroot-based testing by default]),
+[case "${enableval}" in
+ yes) ENABLE_SCHROOT_TEST=yes ;;
+ no) ENABLE_SCHROOT_TEST=no ;;
+ *) AC_MSG_WARN([bad value ${enableval} for enable-schroot-test option]) ;;
+esac], ENABLE_SCHROOT_TEST=no)
+AC_SUBST(ENABLE_SCHROOT_TEST)
+
+dnl if you want to update sources by default
+AC_ARG_ENABLE(source-update, AC_HELP_STRING([--enable-source-update], [If you want to update sources by default]),
+[case "${enableval}" in
+ yes) ENABLE_SOURCE_UPDATE=yes ;;
+ no) ENABLE_SOURCE_UPDATE=no ;;
+ *) AC_MSG_WARN([bad value ${enableval} for enable-source-update option]) ;;
+esac], ENABLE_SOURCE_UPDATE=yes)
+AC_SUBST(ENABLE_SOURCE_UPDATE)
+
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 a24749b7..63dd55d2 100644
--- a/host.conf.in
+++ b/host.conf.in
@@ -27,6 +27,11 @@ distribution=@DISTRIBUTION@
# various configure time flags
enable_ssh=@ENABLE_SSH@
+boostrap=@ENABLE_BOOTSTRAP@
+alltests=@ENABLE_ALLTESTS@
+install=@ENABLE_INSTALL@
+schroot_test=@ENABLE_SCHROOT_TEST@
+supdate=@ENABLE_SOURCE_UPDATE@
wget_bin=@WGET@
bash_shell=@BASH@
diff --git a/lib/globals.sh b/lib/globals.sh
index 84f59005..590323b5 100644
--- a/lib/globals.sh
+++ b/lib/globals.sh
@@ -85,13 +85,7 @@ network=""
runtests=no
ccache=no
-# These are flags for the --enable option to cbuild, which are disabled by default
-bootstrap=no
-alltests=no
-# These are flags for the --disable option to cbuild, which are enabled by default
-install=yes
release=""
-supdate=yes
if test x"${BUILD_NUMBER}" = x; then
export BUILD_NUMBER=${RANDOM}