home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / extras / ttx / rexx / ttx_sasc / Build.ttx < prev    next >
Encoding:
Text File  |  1996-12-24  |  1.0 KB  |  46 lines

  1. /*
  2. **  $VER: Build.ttx 2.1 (17.8.93)
  3. **      By Kenneth Yarnall.  This code may be freely distributed.
  4. **
  5. **  Submits a build for the project in the directory of the file in the
  6. ** current TTX window.  If scmsg is not running, it is started, the variable
  7. ** ENV:sc/projdir is set to point to the current directory, and scmsg is
  8. ** asked to build the project.
  9. **
  10. */
  11. Options RESULTS
  12.  
  13. /*  Get the file path+name safely, then split off the path  */
  14.  
  15. path = 'Rexx:TTX_SASC/SafeGetFileName'()
  16.  
  17. path = 'Rexx:TTX_SASC/GetPathPart'(path)
  18.  
  19. /* Get the current screen name from TTX, to use when opening SCMsg */
  20.  
  21. GetScreenInfo
  22. Parse VAR RESULT . '"' pubscrname '"'
  23.  
  24. Call 'Rexx:TTX_SASC/StartSCMsg.ttx' pubscrname
  25.  
  26. /*
  27. **  If we are here, scmsg is running, and we have a path.  Set the environment
  28. ** variable sc/projdir to point to that path.
  29. */
  30.  
  31. if ~Exists('ENV:sc') then
  32.     Address COMMAND 'makedir ENV:sc'
  33.  
  34. Address COMMAND 'setenv sc/projdir ' || path
  35.  
  36. /* Tell scmsg to go at it */
  37. GetPort
  38. port = RESULT
  39.  
  40. Address SC_SCMSG
  41. 'abort'
  42. 'newbld'
  43. 'build'
  44.  
  45. exit 0
  46.