build_test.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/bin/sh
  2. #exec 2>&1
  3. BUILDDIR=/tmp/aria2buildtest
  4. if [ ! -d "$BUILDDIR" ]; then
  5. mkdir "$BUILDDIR" \
  6. || { echo "Failed to create directory $BUILDDIR" && exit -1; }
  7. fi
  8. echo -n "Starting build test "
  9. echo `date`
  10. # build CONFIGURE_OPTS BIN_SUFFIX DESC
  11. build()
  12. {
  13. echo -n "new build() started at "
  14. echo `date`
  15. echo "*** configure opts=$1"
  16. BIN_NAME="aria2c_$2"
  17. if [ -f "$BUILDDIR/$BIN_NAME" ]; then
  18. echo "$BIN_NAME exists, skipping"
  19. return
  20. fi
  21. ./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log"\
  22. && cp config.log "$BUILDDIR/config.log_$2" \
  23. && LANG=C make -j2 check 2>&1 |tee "$BUILDDIR/aria2c_$2.log" \
  24. && cp src/aria2c "$BUILDDIR/aria2c_$2"
  25. }
  26. clear()
  27. {
  28. for file in `ls $BUILDDIR`; do
  29. rm -f "$BUILDDIR/$file";
  30. done
  31. }
  32. case "$1" in
  33. clear)
  34. clear
  35. ;;
  36. *)
  37. # Library combinations
  38. build "--without-gnutls" "openssl"
  39. build "--without-gnutls --without-openssl" "nossl"
  40. build "--without-libcares" "nocares"
  41. build "--without-libxml2" "expat"
  42. build "--without-libxml2 --without-libexpat" "noxml"
  43. build "--without-libz" "nozlib"
  44. build "--without-sqlite3" "nosqlite3"
  45. # Feature combinations
  46. build "--disable-bittorrent" "nobt"
  47. build "--disable-metalink" "noml"
  48. build "--disable-bittorrent --disable-metalink" "nobt_noml"
  49. build "--disable-epoll" "noepoll"
  50. build "--disable-epoll --without-libcares" "noepoll_nocares"
  51. ;;
  52. esac