home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / build < prev    next >
Text File  |  1994-04-06  |  8KB  |  234 lines

  1. #!/bin/sh
  2. #
  3. # $Id: build,v 4.12 1993/10/07 18:02:23 mikes Exp $
  4. #
  5. #            T H E    P I N E    M A I L   S Y S T E M
  6. #
  7. #   Laurence Lundblade and Mike Seibel
  8. #   Networks and Distributed Computing
  9. #   Computing and Communications
  10. #   University of Washington
  11. #   Administration Building, AG-44
  12. #   Seattle, Washington, 98195, USA
  13. #   Internet: lgl@CAC.Washington.EDU
  14. #             mikes@CAC.Washington.EDU
  15. #
  16. #   Please address all bugs and comments to "pine-bugs@cac.washington.edu"
  17. #
  18. #   Copyright 1989-1993  University of Washington
  19. #
  20. #    Permission to use, copy, modify, and distribute this software and its
  21. #   documentation for any purpose and without fee to the University of
  22. #   Washington is hereby granted, provided that the above copyright notice
  23. #   appears in all copies and that both the above copyright notice and this
  24. #   permission notice appear in supporting documentation, and that the name
  25. #   of the University of Washington not be used in advertising or publicity
  26. #   pertaining to distribution of the software without specific, written
  27. #   prior permission.  This software is made available "as is", and
  28. #   THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  29. #   WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  30. #   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  31. #   NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  32. #   INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  33. #   LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  34. #   (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  35. #   WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  36. #  
  37. #   Pine and Pico are trademarks of the University of Washington.
  38. #   No commercial use of these trademarks may be made without prior
  39. #   written permission of the University of Washington.
  40. #
  41. #   Pine is in part based on The Elm Mail System:
  42. #    ***********************************************************************
  43. #    *  The Elm Mail System  -  Revision: 2.13                             *
  44. #    *                                                                     *
  45. #    *             Copyright (c) 1986, 1987 Dave Taylor               *
  46. #    *             Copyright (c) 1988, 1989 USENET Community Trust    *
  47. #    ***********************************************************************
  48. #
  49.  
  50.  
  51. #
  52. #  General build script for Pine
  53. #
  54.  
  55. cat > .bld.hlp <<EOF
  56. Usage: build <make-options> <target-platform>
  57.  
  58. <target-platform> may be one of the following:
  59.     ult   Works on DECStations with Ultrix 4.1 or 4.2
  60.     nxt   Works on NeXT 68030's and 68040's running Next Mach 2.0     
  61.     sun   Works on SPARCs running SunOS 4.1
  62.     ptx   Works on Sequent Symmetry running Dynix/PTX
  63.     a32   Works on IBM RS/6000 running AIX 3.2
  64.     ...   Others are available, see doc/pine-ports
  65.   clean   Clean up object files and such.
  66.           Also, a good way to rebuild Pine/Pico from scratch.
  67.  
  68. See the document doc/pine-ports for a list of other platforms that
  69. Pine has been ported to and for details about these and other ports.
  70.  
  71. <make-options> are generally not needed. They are flags (anything
  72. beginning with -) and are passed to make. "-n" is probably the most
  73. useful, as it tells make to just print out what it is going to do and
  74. not actually do it.
  75.  
  76. To build Pine and Pico the command "build xxx" should work where xxx
  77. is one of the targets. For example "build ult" to build Pine for Ultrix.
  78.  
  79.  
  80. The executables built by this are:
  81.  
  82.  pine   The Pine mailer. Once compiled this should work just fine on
  83.         your system with no other files than this binary, and no
  84.         modifications to your system. Optionally you may create two
  85.         configuration files, /usr/local/lib/pine.conf and 
  86.         /usr/local/lib/pine.info. See the documentation for details.
  87.  
  88.  pico   The standalone editor similar to the Pine message composer.
  89.         This is a very simple straight forward text editor.
  90.  
  91.  imapd  The IMAP daemon. If you want to run Pine in client/server mode,
  92.         this is the daemon to run on the server. Installing this
  93.         requires system privileges and modifications to /etc/services.
  94.         See doc/tech-notes for more details.
  95.  
  96.  mtest  The test IMAP client, an absolutely minimal mail client, useful
  97.         for debugging.
  98.  
  99. In general you should be able to just copy the Pine and Pico binaries
  100. to the place you keep your other local binaries. /usr/local/bin is a
  101. likely place.
  102.   
  103. EOF
  104.                  
  105.  
  106. maketarget="no-target"
  107. makeargs="CC=cc"
  108. PHOME=`pwd`
  109.  
  110. args=$#
  111. while [ $args -gt 0 ]
  112. do
  113.   case $1 in
  114.  
  115.     help) cat .bld.hlp
  116.           exit ;;
  117.  
  118.     -*) makeargs="$makeargs $1" ;;
  119.  
  120.     clean|???)
  121.          if [ $maketarget != no-target ]
  122.          then
  123.              echo "Can only make one target system at a time"
  124.              echo 'Both "$maketarget" and "$1" where given'
  125.              exit
  126.          else
  127.              maketarget=$1
  128.          fi
  129.        ;;
  130.  
  131.       
  132.     *) makeargs="$makeargs $1" ;;
  133.  
  134.   esac
  135.   
  136.   shift
  137.   
  138.   args=`expr $args - 1`
  139.  
  140. done
  141.  
  142. echo 'make args are "'$makeargs'"'
  143.  
  144. case $maketarget in
  145.  
  146.    ???) 
  147.         echo ''
  148.         cd $PHOME
  149.  
  150.         if [ -s c-client ] ; then rm -f c-client ; fi
  151.         if [ -s imapd    ] ; then rm -f imapd    ; fi
  152.         if [ -s imap/ANSI/c-client/makefile.$maketarget ] ; then
  153.           ln -s imap/ANSI/c-client c-client
  154.           ln -s imap/ANSI/imapd imapd
  155.         elif [ -s imap/non-ANSI/c-client/makefile.$maketarget ] ; then
  156.           ln -s imap/non-ANSI/c-client c-client
  157.           ln -s imap/non-ANSI/imapd imapd
  158.         fi
  159.  
  160.     if [ -s c-client/makefile ] ; then rm -f c-client/makefile ; fi
  161.     ln -s makefile.$maketarget c-client/makefile
  162.         echo "Making c-client library and mtest"
  163.         cd $PHOME/c-client
  164.         make $makeargs -f makefile.$maketarget
  165.         echo ''
  166.         echo "Making Imapd"
  167.         cd $PHOME/imapd
  168.         make $makeargs
  169.         echo ''
  170.         echo "Making Pico"
  171.         cd $PHOME/pico
  172.         make $makeargs -f makefile.$maketarget
  173.         echo ''
  174.         echo "Making Pine".
  175.         cd $PHOME/pine
  176.         make $makeargs -f makefile.$maketarget
  177.         cd $PHOME
  178.         if [ ! -d bin ] ;  then    mkdir bin;        fi
  179.         cd $PHOME/bin
  180.         rm -f pine mtest imapd pico
  181.         if [ -s ../pine/pine ] ;      then ln ../pine/pine  pine      ; fi
  182.         if [ -s ../c-client/mtest ] ; then ln ../c-client/mtest mtest ; fi
  183.         if [ -s ../imapd/imapd ] ;    then ln ../imapd/imapd imapd    ; fi
  184.         if [ -s ../pico/pico ] ;      then ln ../pico/pico pico ; fi
  185.         cd $PHOME
  186.         echo ''
  187.         echo "Links to executables are in bin directory:"
  188.         size bin/pine bin/mtest bin/imapd bin/pico
  189.         echo "Done"
  190.         ;;
  191.  
  192.  
  193.     clean) # This only sort of works 
  194.         echo "Cleaning c-client"
  195.     if [ -s $PHOME/c-client ] ; then
  196.           cd $PHOME/c-client
  197.       if [ -s makefile.ult ] ; then 
  198.         make -f makefile.ult clean
  199.       elif [ -s makefile.nxt ] ; then
  200.         make -f makefile.nxt clean
  201.       fi
  202.       rm $PHOME/c-client
  203.     fi
  204.         echo "Cleaning imapd"
  205.     if [ -s $PHOME/imapd ] ; then
  206.           cd $PHOME/imapd
  207.           make clean
  208.       rm $PHOME/imapd
  209.     fi
  210.         echo "Cleaning Pine"
  211.         cd $PHOME/pine
  212.         make -f makefile.ult clean
  213.         echo "Cleaning pico"
  214.         cd $PHOME/pico
  215.         make $makeargs -f makefile.ult clean
  216.         echo "Done"
  217.         cd $PHOME
  218.         ;;
  219.  
  220.     no-target)
  221.         echo "No target plaform for which to build Pine given."
  222.         echo 'Give command "build help" for help.'
  223.         ;;
  224.  
  225.     *)  echo 'Do not know how to make Pine for target "'$maketarget'".'
  226.         ;;
  227. esac
  228.  
  229.  
  230.  
  231.  
  232.      
  233.