aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rwxr-xr-xkerl49
2 files changed, 52 insertions, 4 deletions
diff --git a/README.md b/README.md
index 84ea794..fcebb56 100644
--- a/README.md
+++ b/README.md
@@ -187,6 +187,7 @@ You can set the following variables:
- KERL_BUILD_DIR where to hold the builds, defaults to $HOME/.kerl/builds
- KERL_DEFAULT_INSTALL_DIR if set in ~/.kerlrc, install builds to this dir if no path is provided on installs, (recommend "$KERL_BASE_DIR/installs")
- KERL_CONFIGURE_OPTIONS options to pass to Erlang's ./configure script, e.g. --without-termcap
+- KERL_CONFIGURE_APPLICATIONS if non-empty, subset of applications used in the builds (and subsequent installations) process, e.g. "kernel stdlib sasl"
- KERL_DISABLE_AGNER if non-empty will disable agner support
- KERL_AGNER_AUTOINSTALL a list of packages to pre-install
- KERL_SASL_STARTUP use SASL system startup instead of minimal
@@ -237,6 +238,12 @@ You can specify the configure options to use when building Erlang/OTP with the K
$ KERL_CONFIGURE_OPTIONS=--enable-hipe kerl build R14B02 r14b02_hipe
+#### Configure applications
+
+If non-empty, you can specify the subset of applications to use when building (and subsequent installing) Erlang/OTOP with the KERL_CONFIGURE_APPLICATIONS variable, either in your $HOME/.kerlrc file or prepending it to the command line.
+
+ $ KERL_CONFIGURE_APPLICATIONS="kernel stdlib sasl"
+
#### Enable autoconf
You can enable the use of autoconf in the build process setting KERL_USE_AUTOCONF=yes in your $HOME/.kerlrc file
diff --git a/kerl b/kerl
index f2549ee..16d08df 100755
--- a/kerl
+++ b/kerl
@@ -30,6 +30,9 @@ KERL_BUILD_DIR="$KERL_BASE_DIR/builds"
if [ -n "$KERL_CONFIGURE_OPTIONS" ]; then
_KCO="$KERL_CONFIGURE_OPTIONS"
fi
+if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then
+ _KCA="$KERL_CONFIGURE_APPLICATIONS"
+fi
if [ -n "$KERL_SASL_STARTUP" ]; then
_KSS="$KERL_SASL_STARTUP"
fi
@@ -43,6 +46,7 @@ if [ -n "$KERL_DEPLOY_RSYNC_OPTIONS" ]; then
_KDRSYNC="$KERL_DEPLOY_RSYNC_OPTIONS"
fi
KERL_CONFIGURE_OPTIONS=
+KERL_CONFIGURE_APPLICATIONS=
KERL_DISABLE_AGNER=
KERL_SASL_STARTUP=
KERL_INSTALL_MANPAGES=
@@ -56,6 +60,9 @@ if [ -f "$KERL_CONFIG" ]; then . "$KERL_CONFIG"; fi
if [ -n "$_KCO" ]; then
KERL_CONFIGURE_OPTIONS="$_KCO"
fi
+if [ -n "$_KCA" ]; then
+ KERL_CONFIGURE_APPLICATIONS="$_KCA"
+fi
if [ -n "$_KSS" ]; then
KERL_SASL_STARTUP="$_KSS"
fi
@@ -284,7 +291,23 @@ do_git_build()
fi
LOGFILE="$KERL_BUILD_DIR/$3/opt_build.log"
echo "Building Erlang/OTP $3 from git, please wait..."
- ./otp_build setup -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
+ ./otp_build autoconf $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
+ ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
+ if [ "$?" -eq 1 ]; then
+ echo "Build error, see $LOGFILE"
+ exit 1
+ fi
+ if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then
+ find ./lib -maxdepth 1 -type d -exec touch -f {}/SKIP \;
+ for i in $KERL_CONFIGURE_APPLICATIONS; do
+ rm ./lib/$i/SKIP
+ if [ "$?" -eq 1 ]; then
+ echo "Couldn't prepare '$i' application for building"
+ exit 1
+ fi
+ done
+ fi
+ ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
if [ "$?" -eq 1 ]; then
echo "Build error, see $LOGFILE"
exit 1
@@ -343,11 +366,29 @@ do_build()
cd "$ERL_TOP"
LOGFILE="$KERL_BUILD_DIR/$2/otp_build_$1.log"
if [ -n "$KERL_USE_AUTOCONF" ]; then
- ./otp_build setup -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
+ ./otp_build autoconf $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
+ ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
else
- ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
- ./otp_build boot -a > "$LOGFILE" 2>&1
+ ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
+
+ fi
+ if [ "$?" -eq 1 ]; then
+ echo "Build failed, see $LOGFILE"
+ list_remove builds "$1 $2"
+ exit 1
+ fi
+ if [ -n "$KERL_CONFIGURE_APPLICATIONS" ]; then
+ find ./lib -maxdepth 1 -type d -exec touch -f {}/SKIP \;
+ for i in $KERL_CONFIGURE_APPLICATIONS; do
+ rm ./lib/$i/SKIP
+ if [ "$?" -eq 1 ]; then
+ echo "Couldn't prepare '$i' application for building"
+ list_remove builds "$1 $2"
+ exit 1
+ fi
+ done
fi
+ ./otp_build boot -a $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1
if [ "$?" -eq 1 ]; then
echo "Build failed, see $LOGFILE"
list_remove builds "$1 $2"