home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The UNIX CD Bookshelf
/
OREILLY_TUCB_UNIX_CD.iso
/
upt
/
examples
/
SOURCES
/
TKNEW
/
BUILDL.D
next >
Wrap
Text File
|
1998-07-24
|
3KB
|
94 lines
#!/bin/sh
# uncomment the next line to see more of the build process
#set -x
# BUILD script provided by Ready-to-Run Software, Inc.
# Copyright 1997 Ready-to-Run Software, Inc. All Rights Reserved.
BUILDDIR=`pwd`
BUILDPREFIX=${BUILDPREFIX-`pwd`}
SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
if test ! -d $SOURCEDIR ; then
cd `dirname $0`/..; SOURCEDIR=`pwd`
echo Assuming SOURCEDIR is $SOURCEDIR
cd $BUILDDIR
fi
INSTALLDIR=${INSTALLDIR-/usr/local}
INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
if test "$1" != ""; then
MACHINE=$1
shift
fi
if test "$MACHINE" = ""; then
MACHINE=`$SOURCEDIR/../common/guess. `
echo "Assuming machine is $MACHINE"
fi
machine=$MACHINE
echo Ignore any errors about directories already existing
mkdir tknew
mkdir -p $INSTALLDIR
mkdir $INSTALLDIR/bin
mkdir $INSTALLDIR/lib
mkdir -p $INSTALLSHAREDIR
mkdir $INSTALLSHAREDIR/man
mkdir $INSTALLSHAREDIR/man/man1
mkdir $INSTALLSHAREDIR/doc
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
cd $BUILDPREFIX/tknew
cat $SOURCEDIR/tknew/tk42p2gz. | uncompress | tar xvf -
cat $SOURCEDIR/tknew/tcl7p2gz. | uncompress | tar xvf -
cat $SOURCEDIR/tknew/expect.gz | uncompress | tar xvf -
cd tcl7.6
(sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/rtr/tcl. | patch -s -p )
test -f $SOURCEDIR/tknew/$machine/tcl. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/$machine/tcl. | patch -b .rtr -p -s )
cd unix
case `machname` in
uware*)
configure -prefix=$INSTALLDIR
;;
*)
configure --enable-gcc -prefix=$INSTALLDIR
;;
esac
make
make install
make test
cd $BUILDPREFIX/tk/tk4.2
(sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/rtr/tk. | patch -s -p )
test -f $SOURCEDIR/tknew/$machine/tk. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/$machine/tk. | patch -b .rtr -p -s )
cd unix
case `machname` in
uware*)
configure -prefix=$INSTALLDIR
;;
*)
configure --enable-gcc -prefix=$INSTALLDIR
;;
esac
make
make install
make test
cd $BUILDPREFIX/tk
cd expect-5.22
(sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/rtrpatch.expect | patch -s )
test -f $SOURCEDIR/tknew/$machine/expect. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/tknew/$machine/expect. | patch -b .rtr -s )
case `machname` in
uware*)
configure -prefix=$INSTALLDIR
;;
*)
configure --enable-gcc -prefix=$INSTALLDIR
;;
esac
make
make install
make test
cd ..
cd $BUILDDIR
if test "$RM" != "" ; then rm -rf $BUILDDIR/tknew ; fi