2008-06-20 13:34:53 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exec 2>&1
|
|
|
|
|
|
|
|
BUILD_TEST_DIR=/tmp/aria2_build_test
|
|
|
|
|
2008-07-22 16:10:31 +00:00
|
|
|
if [ ! -d "$BUILD_TEST_DIR" ]; then
|
|
|
|
mkdir "$BUILD_TEST_DIR" \
|
|
|
|
|| echo "Failed to create directory $BUILD_TEST_DIR" \
|
2008-06-20 13:34:53 +00:00
|
|
|
&& exit -1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "Starting build test "
|
|
|
|
echo `date`
|
|
|
|
|
|
|
|
# build CONFIGURE_OPTS BIN_SUFFIX DESC
|
|
|
|
build()
|
|
|
|
{
|
|
|
|
echo -n "new build() started at "
|
|
|
|
echo `date`
|
|
|
|
echo "*** configure opts=$1"
|
2008-07-22 16:10:31 +00:00
|
|
|
BIN_NAME="aria2c_$2"
|
|
|
|
if [ -f "$BUILD_TEST_DIR/$BIN_NAME" ]; then
|
2008-06-20 13:34:53 +00:00
|
|
|
echo "$BIN_NAME exists, skipping"
|
|
|
|
return
|
|
|
|
fi
|
2008-07-22 16:10:31 +00:00
|
|
|
./configure $1 \
|
|
|
|
&& cp config.log "$BUILD_TEST_DIR/config.log_$2" \
|
|
|
|
&& LANG=C make -j2 check > "$BUILD_TEST_DIR/aria2c_$2.log" \
|
|
|
|
&& cp src/aria2c "$BUILD_TEST_DIR/aria2c_$2"
|
2008-06-20 13:34:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
clear()
|
|
|
|
{
|
|
|
|
for file in `ls $BUILD_TEST_DIR`; do
|
2008-07-22 16:10:31 +00:00
|
|
|
rm -f "$BUILD_TEST_DIR/$file";
|
2008-06-20 13:34:53 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
clear)
|
|
|
|
clear
|
|
|
|
;;
|
|
|
|
*)
|
2008-07-22 16:10:31 +00:00
|
|
|
# Library combinations
|
2008-06-20 13:34:53 +00:00
|
|
|
build "--without-gnutls" "openssl"
|
|
|
|
build "--without-gnutls --without-openssl" "nossl"
|
|
|
|
build "--without-libcares" "nocares"
|
|
|
|
build "--without-libxml2" "nolibxml2"
|
|
|
|
build "--without-libxml2 --without-libexpat" "noxml"
|
2008-07-22 16:10:31 +00:00
|
|
|
build "--without-libz" "nozlib"
|
2008-06-20 13:34:53 +00:00
|
|
|
# Feature combinations
|
|
|
|
build "--disable-bittorrent" "nobt"
|
|
|
|
build "--disable-metalink" "noml"
|
|
|
|
build "--disable-bittorrent --disable-metalink" "nobt_noml"
|
|
|
|
build "--disable-epoll" "noepoll"
|
|
|
|
build "--disable-epoll --without-libcares" "noepoll_nocares"
|
|
|
|
;;
|
|
|
|
esac
|