home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / edit / macro / sas / smake.ged < prev    next >
Text File  |  1994-07-19  |  2KB  |  79 lines

  1. /* 
  2.  * $VER: smake.ged 1.0 (19.07.94)
  3.  * ©1994 Markus Zahn (Zahn@Uni-Augsburg.DE)
  4.  * Make current project using SAS/C 6.50
  5.  *
  6.  * Note:
  7.  *
  8.  * Be careful with the AUTOEDIT option in env:sc/SCMSG, i.e. don't
  9.  * use it. The GoldED GUI only gets unlocked, when you close the
  10.  * compiler output window. Use the scmsg.ged script to retrieve your
  11.  * errors/warnings instead!
  12.  */
  13.  
  14. OPTIONS RESULTS                             /* enable return codes     */
  15.  
  16. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  17.     address 'GOLDED.1'
  18.  
  19. 'LOCK CURRENT QUIET'                        /* lock GUI, gain access   */
  20. OPTIONS FAILAT 21                           /* ignore warnings         */
  21. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  22.  
  23. /* ------------------------- INSERT YOUR CODE HERE: -------------------- */
  24.  
  25. 'QUERY CAT'
  26. isGerman = ( result = "deutsch" )
  27.  
  28. 'QUERY MODIFY'
  29. if( result = 'TRUE' ) then
  30. do
  31.   if( isGerman ) then
  32.     'REQUEST BODY="Datei wurde verändert. Speichern ?" BUTTON="speichern|abbrechen"'
  33.   else
  34.     'REQUEST BODY="File has been changed. Save it ?" BUTTON="SAVE|CANCEL"'
  35.  
  36.   if( result = 1 ) then
  37.     'SAVE ALL'
  38. end
  39.  
  40. 'QUERY PATH VAR PATH'
  41. if( right( path, 1 ) ~= ':' ) then
  42.   path = path || '/'
  43.  
  44. if( exists( path || 'smakefile' ) | exists( path || 'makefile' ) ) then
  45. do
  46.   shell /* address shell */
  47.  
  48.   dir = pragma( 'directory', path ) /* goto directory of current file */
  49.   'sc:c/smake' /* make current project */
  50.   path = pragma( 'directory', dir ) /* go back to original directory */
  51.  
  52.   shell /* address host (GoldED) */
  53.  
  54.   if( isGerman ) then
  55.     say "Fertig (RETURN drücken)."
  56.   else
  57.     say "done (press RETURN)."
  58.  
  59.   pull dummy
  60. end
  61. else
  62. do
  63.   if( isGerman ) then
  64.     'REQUEST BODY="Kein Makefile in ' || path || '?!"'
  65.   else
  66.     'REQUEST BODY="No makefile in ' || path || '?!"'
  67. end
  68.  
  69. /* ---------------------------- END OF YOUR CODE ----------------------- */
  70.  
  71. 'UNLOCK' /* VERY important: unlock GUI */
  72. EXIT
  73.  
  74. SYNTAX:
  75.  
  76. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  77. 'UNLOCK'
  78. EXIT
  79.