aboutsummaryrefslogtreecommitdiffstats
path: root/kerl
diff options
context:
space:
mode:
authorEvax Software <[email protected]>2011-04-07 14:03:47 +0200
committerEvax Software <[email protected]>2011-04-07 14:03:47 +0200
commit2ec0d6aa881766139f99e8660bf039342344a39b (patch)
treee4618c0ae358ca08a48d2f3fe4005dbac319035e /kerl
parente96ce81c7d911c3ccf6f67a1201de9a452e387df (diff)
downloadkerl-2ec0d6aa881766139f99e8660bf039342344a39b.tar.gz
kerl-2ec0d6aa881766139f99e8660bf039342344a39b.tar.bz2
kerl-2ec0d6aa881766139f99e8660bf039342344a39b.zip
Do not use autoconf unless people ask for it (KERL_USE_AUTOCONF)
Diffstat (limited to 'kerl')
-rwxr-xr-xkerl24
1 files changed, 17 insertions, 7 deletions
diff --git a/kerl b/kerl
index 02eade1..6eadaa0 100755
--- a/kerl
+++ b/kerl
@@ -224,13 +224,19 @@ do_build()
fi
echo "Building Erlang/OTP $1 ($2), please wait..."
cd "$KERL_BUILD_DIR/$2/otp_src_$1"
- ./otp_build setup -a $KERL_CONFIGURE_OPTIONS > "$KERL_BUILD_DIR/$2/otp_build_$1.log" 2>&1
+ 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
+ else
+ ./otp_build configure $KERL_CONFIGURE_OPTIONS > "$LOGFILE" 2>&1 && \
+ ./otp_build boot -a > "$LOGFILE" 2>&1
+ fi
if [ "$?" -eq 1 ]; then
- echo "Build failed, see $KERL_BUILD_DIR/$2/otp_build_$1.log"
+ echo "Build failed, see $LOGFILE"
list_remove builds "$1 $2"
exit 1
fi
- rm -f "$KERL_BUILD_DIR/$2/otp_build_$1.log"
+ rm -f "$LOGFILE"
./otp_build release -a "$KERL_BUILD_DIR/$2/release_$1" > /dev/null 2>&1
cd "$KERL_BUILD_DIR/$2/release_$1"
./Install $INSTALL_OPT "$KERL_BUILD_DIR/$2/release_$1" > /dev/null 2>&1
@@ -349,11 +355,15 @@ list_print()
list_add()
{
- if [ -f $KERL_BASE_DIR/otp_$1 ]; then
- grep "$2" $KERL_BASE_DIR/otp_$1 > /dev/null 2>&1 || \
- echo "$2" >> $KERL_BASE_DIR/otp_$1
+ if [ -f "$KERL_BASE_DIR/otp_$1" ]; then
+ for l in `cat "$KERL_BASE_DIR/otp_$1"`; do
+ if [ "$l" = "$2" ]; then
+ return 1
+ fi
+ done
+ echo "$2" >> "$KERL_BASE_DIR/otp_$1"
else
- echo "$2" > $KERL_BASE_DIR/otp_$1
+ echo "$2" > "$KERL_BASE_DIR/otp_$1"
fi
}