home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / pine3.07 / build next >
Encoding:
Text File  |  1993-03-30  |  6.5 KB  |  207 lines

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