bldall 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/bin/sh
  2. #edit this to your homedir (no trailing slash)
  3. TCLDIR="/home/bryan"
  4. #### DO NOT EDIT BELOW THIS LINE #####
  5. # Figure out whether to use default or a specified config file
  6. if test $1
  7. then
  8. packname=$1
  9. else
  10. packname=default
  11. fi
  12. # Verify we got the config file
  13. if ! test -f $packname.conf
  14. then
  15. echo "Can't find pack configuration file $packname.conf"
  16. exit 1
  17. fi
  18. # Figure what bins we're making
  19. case `uname` in
  20. Linux) prefix=linux;;
  21. FreeBSD) case `uname -r` in
  22. 4*) prefix=freebsd4;;
  23. 3*) prefix=freebsd3;;
  24. esac;;
  25. OpenBSD) prefix=openbsd;;
  26. esac
  27. if test -z $prefix
  28. then
  29. echo "Automated packing disabled, `uname` isn't recognized"
  30. fi
  31. # make clean, just in case
  32. echo "Cleaning up old binaries..."
  33. make distclean > /dev/null
  34. # Run ./configure, then verify it's ok
  35. echo "Configuring..."
  36. #./configure > /dev/null 2>configure.temp
  37. ./configure --with-tcllib=${TCLDIR}/lib/libtcl8.4.a --with-tclinc=${TCLDIR}/include/tcl.h > /dev/null 2>configure.temp
  38. #if test "`cat configure.temp`"
  39. #then
  40. # echo "Configure error'd"
  41. # cat configure.temp
  42. #
  43. # exit 1
  44. #fi
  45. #rm -f configure.temp
  46. # Read the config
  47. echo -n "Pack configuration:"
  48. for cnf in `cat $packname.conf | grep -v "^#"`
  49. do
  50. defines="$defines -DS_$cnf"
  51. echo -n "$cnf "
  52. done
  53. echo ""
  54. # Build utils and check we got the bins
  55. #echo "Building utils..."
  56. #make utils CFLGS="$defines" > /dev/null
  57. #if ! test -f readlog -a -f makebot -a -f makepack -a -f stringfix
  58. #then
  59. # echo "Util build failed"
  60. # exit 1
  61. #fi
  62. # Build leaf and check
  63. echo "Building leaf..."
  64. make config CFLGS="-DHUB $defines" > /dev/null
  65. #make -j sdebug CFLGS="-DLEAF $defines" > /dev/null
  66. make static CFLGS="-DLEAF $defines" > /dev/null
  67. mv -f eggdrop leaf
  68. if ! test -f leaf
  69. then
  70. echo "leaf build failed"
  71. exit 1
  72. fi
  73. # Build hub and check
  74. echo "Building hub..."
  75. make clean > /dev/null
  76. make config CFLGS="-DHUB $defines" > /dev/null
  77. #make -j sdebug CFLGS="-DHUB $defines" > /dev/null
  78. make static CFLGS="-DHUB $defines" > /dev/null
  79. mv -f eggdrop hub
  80. if ! test -f hub
  81. then
  82. echo "hub build failed"
  83. exit 1
  84. fi
  85. make clean > /dev/null