bldall 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #!/bin/sh
  2. #edit this to your homedir (no trailing slash)
  3. TCLDIR="/home/wheel/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. # Run ./configure, then verify it's ok
  32. echo "Configuring..."
  33. ./configure --disable-tcl-threads --with-tcllib=${TCLDIR}/lib/libtcl8.4.a --with-tclinc=${TCLDIR}/include/tcl.h > /dev/null 2>configure.temp
  34. #if test "`cat configure.temp`"
  35. #then
  36. # echo "Configure error'd"
  37. # cat configure.temp
  38. #
  39. # exit 1
  40. #fi
  41. #rm -f configure.temp
  42. # make clean, just in case
  43. echo "Cleaning up old binaries..."
  44. make clean > /dev/null
  45. # Read the config
  46. echo -n "Pack configuration:"
  47. for cnf in `cat $packname.conf | grep -v "^#"`
  48. do
  49. defines="$defines -DS_$cnf"
  50. echo -n "$cnf "
  51. done
  52. echo ""
  53. # Build utils and check we got the bins
  54. echo "Building utils..."
  55. make utils CFLGS="$defines" > /dev/null
  56. if ! test -f stringfix
  57. then
  58. echo "Util build failed"
  59. exit 1
  60. fi
  61. # Build leaf and check
  62. echo "Building leaf..."
  63. make leaf CFLGS="$defines" > /dev/null
  64. if ! test -f leaf
  65. then
  66. echo "leaf build failed"
  67. exit 1
  68. fi
  69. # Build hub and check
  70. echo "Building hub..."
  71. make hub CFLGS="$defines" > /dev/null
  72. if ! test -f hub
  73. then
  74. echo "hub build failed"
  75. exit 1
  76. fi