home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / TKNEW / BUILDL.ZR < prev    next >
Text File  |  1998-07-24  |  3KB  |  94 lines

  1. #!/bin/sh
  2. # uncomment the next line to see more of the build process
  3. #set -x
  4. # BUILD script provided by Ready-to-Run Software, Inc.
  5. # Copyright 1997 Ready-to-Run Software, Inc. All Rights Reserved.
  6. BUILDDIR=`pwd`
  7. BUILDPREFIX=${BUILDPREFIX-`pwd`}
  8. SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
  9. if test ! -d $SOURCEDIR ; then 
  10.    cd `dirname $0`/..; SOURCEDIR=`pwd`
  11.    echo Assuming SOURCEDIR is $SOURCEDIR
  12.    cd $BUILDDIR
  13. fi
  14. INSTALLDIR=${INSTALLDIR-/usr/local}
  15. INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
  16. if test "$1" != ""; then 
  17.    MACHINE=$1
  18.    shift
  19. fi
  20. if test "$MACHINE" = ""; then 
  21.    MACHINE=`$SOURCEDIR/../common/guess\;1 `
  22.    echo "Assuming machine is $MACHINE"
  23. fi
  24. machine=$MACHINE
  25. echo Ignore any errors about directories already existing
  26. mkdir tknew
  27. mkdir -p $INSTALLDIR
  28. mkdir $INSTALLDIR/bin
  29. mkdir $INSTALLDIR/lib
  30. mkdir -p $INSTALLSHAREDIR
  31. mkdir $INSTALLSHAREDIR/man
  32. mkdir $INSTALLSHAREDIR/man/man1
  33. mkdir $INSTALLSHAREDIR/doc
  34. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
  35. mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
  36.  
  37.  
  38.  
  39. cd $BUILDPREFIX/tknew
  40. cat $SOURCEDIR/tknew/tk42p2gz.\;1 | uncompress | tar xvf -
  41. cat $SOURCEDIR/tknew/tcl7p2gz.\;1 | uncompress | tar xvf -
  42. cat $SOURCEDIR/tknew/expect.gz\;1 | uncompress | tar xvf -
  43. cd tcl7.6
  44. (sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/rtr/tcl.\;1 | patch -s -p )
  45. test -f  $SOURCEDIR/tknew/$machine/tcl\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/$machine/tcl\;1 | patch -b .rtr -p -s )
  46. cd unix
  47. case `machname` in
  48. uware*)
  49. configure -prefix=$INSTALLDIR
  50. ;;
  51. *)
  52. configure --enable-gcc -prefix=$INSTALLDIR
  53. ;;
  54. esac
  55. make
  56. make install
  57. make test
  58. cd $BUILDPREFIX/tk/tk4.2
  59. (sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/rtr/tk.\;1 | patch -s -p )
  60. test -f  $SOURCEDIR/tknew/$machine/tk\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/$machine/tk\;1 | patch -b .rtr -p -s )
  61. cd unix
  62. case `machname` in
  63. uware*)
  64. configure -prefix=$INSTALLDIR
  65. ;;
  66. *)
  67. configure --enable-gcc -prefix=$INSTALLDIR
  68. ;;
  69. esac
  70. make
  71. make install
  72. make test
  73.  
  74. cd $BUILDPREFIX/tk
  75.  
  76. cd expect-5.22
  77. (sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/rtrpatch.expect\;1 | patch -s )
  78. test -f  $SOURCEDIR/tknew/$machine/expect\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/tknew/$machine/expect\;1 | patch -b .rtr -s )
  79. case `machname` in
  80. uware*)
  81. configure -prefix=$INSTALLDIR
  82. ;;
  83. *)
  84. configure --enable-gcc -prefix=$INSTALLDIR
  85. ;;
  86. esac
  87. make
  88. make install
  89. make test
  90. cd ..
  91.  
  92. cd $BUILDDIR
  93. if test "$RM" != "" ; then rm -rf $BUILDDIR/tknew ; fi
  94.