home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The UNIX CD Bookshelf
/
OREILLY_TUCB_UNIX_CD.iso
/
upt
/
examples
/
SOURCES
/
TCSH
/
BUILDU.DR
< prev
next >
Wrap
Text File
|
1998-07-24
|
2KB
|
62 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.\;1 UPPER`
echo "Assuming machine is $MACHINE"
fi
machine=$MACHINE
echo Ignore any errors about directories already existing
mkdir tcsh
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/tcsh
cat $SOURCEDIR/TCSH/TCSH_603.Z\;1 | uncompress | tar xvf -
cd $BUILDPREFIX/tcsh/tcsh-6.03
(sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/TCSH/RTR/TCSH.\;1 | patch -s -p )
cp config/config.ultrix ./config.RISC
cp config/config.aix ./config.RS6000
cp config/config.sco32v2 ./config.i386
cp config/config.xenix ./config.xenix
cp config/config.sos41 ./config.sun4c
cp config/config.sos41 ./config.sun3
cp config/config.sol2 ./config.SSol2
cp config/config.hpux8 ./config.hp700
cp config/config.alpha ./config.alpha
cp config/config.linux ./config.linux
cp config.`machname` config.h
test -f $SOURCEDIR/TCSH/$MACHINE/TCSH.\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/TCSH/$MACHINE/TCSH.\;1 | patch -s -p -b .rtr )
make
make install
make manpage
cd ..
cd $BUILDDIR
if test "$RM" != "" ; then rm -rf $BUILDDIR/tcsh ; fi