home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Pascal / Utilities / Snippets / pp < prev    next >
Encoding:
Text File  |  1992-08-12  |  930 b   |  36 lines  |  [TEXT/MPS ]

  1. ## pp compile and link a pacal file. usage: pp <source>
  2. # © G. Sawitzki, StatLab Heidelberg 1992 <gs@statlab.uni-heidelberg.de>
  3. ## ofiles and $Load files go to directory ofiles
  4. #set echo 1
  5. set exit 0
  6. set source "{1}"
  7.     if `(evaluate  "{source}" =~/(≈)®1.p/ )` == 1 
  8.     # ok: source is of form <name>.p
  9.     else
  10.     set ®1 "{source}"
  11.     set source "{source}".p
  12.     end
  13.  
  14. if `exists -d :ofiles:` == 0 
  15.      (newfolder :ofiles: ) > dev:null
  16. end
  17.  
  18. echo -n {®1} '  ##' "{source}" compile 
  19.  #-k :ofiles: 
  20.  pascal "{source}"  {poptions} -o :ofiles:  || exit 1
  21.    echo -n " & link " 
  22.  Link -w -t MPST -c 'MPS ' ∂
  23.         :ofiles:"{source}".o ∂
  24.         "{Libraries}"Interface.o ∂
  25.         "{Libraries}"ToolLibs.o ∂
  26.         "{Libraries}"Runtime.o ∂
  27.         "{Libraries}"ObjLib.o ∂
  28.         "{PLibraries}"PasLib.o ∂
  29.         "{PLibraries}"SANELib.o ∂
  30.         -o {®1} ∂
  31.  && (echo -n ' & go ' ;find \•{®1} \ "{active}";find / /!0 "{active}")
  32. # set echo 0
  33.     #    "{PLibraries}"NagLib.o ∂
  34.     #    "{PLibraries}"Nagio.o ∂
  35.  
  36.