home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / EMACS / BUILDL.DR < prev    next >
Encoding:
Text File  |  1998-07-24  |  3.3 KB  |  97 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 emacs
  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. cd $BUILDPREFIX/emacs
  38. cat $SOURCEDIR/emacs/em1931gz.\;1 | uncompress | tar xvf -
  39. cd emacs-19.31
  40. test -f $SOURCEDIR/emacs/rtr/emacs.\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/emacs/rtr/emacs.\;1 | patch -s -p )
  41. test -f  $SOURCEDIR/emacs/$machine/emacs.\;1 &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;"  $SOURCEDIR/emacs/.\;1`machname`patch | patch -b .rtr -s -p )
  42. .emacs
  43. case `machname` in
  44. sun386i) configure -prefix=$INSTALLDIR  \
  45. sun386
  46. ;;
  47. xenix) # using gcc 1.40 (execept for profile)
  48. configure -prefix=$INSTALLDIR i386-sco-xenix
  49. ;;
  50. hp700) configure --with-x-toolkit -prefix=$INSTALLDIR \
  51. --x-includes=/usr/local/xutR5 --x-libraries=/usr/local/xutR5 
  52. ;;
  53. sun4c) configure --with-x-toolkit -prefix=$INSTALLDIR \
  54. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-sunos4
  55. ;;
  56. SSol2) configure --with-x-toolkit -prefix=$INSTALLDIR \
  57. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib sparc-sun-solaris2
  58. ;;
  59. iSol2) configure --with-x-toolkit -prefix=$INSTALLDIR \
  60. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib i386-sun-solaris2
  61. ;;
  62. alpha) configure --with-x-toolkit -prefix=$INSTALLDIR \
  63. --with-gcc=no alpha-dec-osf1
  64. ;;
  65. i386) configure -prefix=$INSTALLDIR \
  66. --x-libraries=$INSTALLDIR/lib
  67. ;;
  68. sun3) configure -prefix=$INSTALLDIR \
  69. --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib m68k-sun-sunos4
  70. ;;
  71. RS6000) configure --with-x-toolkit -prefix=/////////////////////////////// ///////////////////////////////////////////$INSTALLDIR --with-gcc=no
  72. make CFLAGS=-O
  73. ;;
  74. uware)  NON_GNU_CPP=/usr/local/lib/gcc-lib/i386v4/2.7.2/cpp configure --with-x-toolkit -prefix=$INSTALLDIR i386-unixware --with-gcc=no
  75. ;;
  76. sco5)  configure --with-x-toolkit -prefix=$INSTALLDIR i486-unknown-sco3.2v4
  77. ;;
  78. *)     configure --with-x-toolkit -prefix=$INSTALLDIR --with-x
  79. esac
  80. make
  81. make install-arch-dep
  82. rm $INSTALLDIR/bin/emacs
  83. ''ln $INSTALLDIR/bin/emacs-19.31 $INSTALLDIR/bin/emacs
  84.  
  85. find $INSTALLDIR/* -name \*.orig -exec rm -f {} \;
  86. if test `machname` = "RS6000"; then
  87. else
  88. fi
  89.  
  90. make install-arch-indep
  91. cp $SOURCEDIR/emacs/dir.\;1 $INSTALLSHAREDIR/${SHAREPREFIX}lib/emacs/info
  92. find $INSTALLDIR/* -name \*.orig -exec rm -f {} \;
  93. cd ..
  94.  
  95. cd $BUILDDIR
  96. if test "$RM" != "" ; then rm -rf $BUILDDIR/emacs ; fi
  97.