home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / stlpt453.zip / STLport-4.5.3 / src / beos-setup < prev    next >
Text File  |  2001-05-27  |  2KB  |  88 lines

  1. #!/bin/sh
  2.  
  3. function intel_setup
  4. {
  5. files='alloca assert ctype dirent err fcntl float new inttypes libio limits locale malloc math memory signal stdarg stddef stdio stdlib string time va_list wchar wctype'
  6.  
  7. for file in $files; do
  8.    echo '#include_next "'"$file"'.h"' > "../stlport/beos/$file"'.h'
  9.    echo '#include_next "'"c$file"'"' > "../stlport/beos/c$file"''
  10. done
  11.  
  12. files='fstream new exception typeinfo iomanip iosfwd iostream istream ostream stdexcept stdiostream stream streambuf strstream'
  13.  
  14. for file in $files; do
  15.    echo '#include_next "'"$file"'.h"' > "../stlport/beos/$file"'.h'
  16.    echo '#include_next "'"$file"'"' > "../stlport/beos/$file"''
  17. done
  18. }
  19.  
  20. function intel_uninstall
  21. {
  22.     rm -fr ~/config/include/stlport
  23.     cd ../lib
  24.     for file in libstlport_gcc*; do
  25.         rm -f ~/config/lib/$file
  26.     done
  27.     rm -f ~/config/lib/libstlport_gcc*.so
  28. }
  29.  
  30. function intel_install
  31. {
  32.     cp -R ../stlport ~/config/include
  33.  
  34.     cd ../lib
  35.     for file in libstlport_gcc*.so.*; do
  36.         basename=`echo $file | sed 's/\(.*\.so\).*/\1/'`
  37.         cp $file ~/config/lib
  38.         if test "$file" != "$basename"; then
  39.             ln -s ~/config/lib/$file ~/config/lib/$basename
  40.         fi
  41.     done
  42.  
  43.     for file in libstlport_gcc*.a; do
  44.         cp $file ~/config/lib
  45.     done
  46.  
  47.     echo include files are in ~/config/include
  48.     echo libraries are in ~/config/lib
  49. }
  50.  
  51.  
  52. if test $# -ne 1; then
  53. echo usage:
  54. echo "    beos-setup -setup       # sets up headers"
  55. echo "    beos-setup -install     # installs STLPort"
  56. echo "    beos-setup -uninstall   #uninstalls STLPort"
  57.  
  58. else
  59.  
  60. if test $1 = "-setup"; then
  61.     intel_setup
  62.     exit 0
  63. fi
  64.  
  65. if test $1 = "-uninstall"; then
  66.     intel_uninstall
  67.     exit 0
  68. fi
  69.  
  70. if test $1 = "-install"; then
  71.     intel_install
  72.     exit 0
  73. fi
  74.  
  75. echo unknown option $*
  76. exit 1
  77.  
  78.  
  79.  
  80. fi
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.