home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / RCS / BUILDU.D < prev    next >
Text File  |  1998-07-24  |  1KB  |  53 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. UPPER`
  22.    echo "Assuming machine is $MACHINE"
  23. fi
  24. machine=$MACHINE
  25. echo Ignore any errors about directories already existing
  26. mkdir rcs
  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. cd $BUILDPREFIX/rcs
  39. RCSREV=5.7
  40. cat $SOURCEDIR/RCS/RCS_57GZ. | uncompress | tar xvf -
  41. cd rcs-5.7
  42. test -f $SOURCEDIR/RCS/$MACHINE/RCS. &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/RCS/$MACHINE/RCS. | patch -b .rtr -s -p  )
  43. configure --prefix=$INSTALLDIR --with-diffutils
  44.  
  45. make
  46. make install
  47.  
  48. make installcheck
  49.  
  50. cd ..
  51. cd $BUILDDIR
  52. if test "$RM" != "" ; then rm -rf $BUILDDIR/rcs ; fi
  53.