home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / triton-1.2.lha / Triton / Developer / AmigaE / Mac2EFront / rexx / Ecompile.rexx
OS/2 REXX Batch file  |  1995-01-13  |  2KB  |  63 lines

  1. /* Ecompile.rexx: run E compiler from ced.
  2.    thanks to Rick Younie for improvements. */
  3.  
  4. epath = 'e:bin/'                    /* homedir of EC */
  5.  
  6. OPTIONS RESULTS
  7. ADDRESS COMMAND
  8.  
  9. IF ~EXISTS('ram:copy') THEN 'copy c:copy ram:'            /* the copy command */
  10. /*IF ~EXISTS('ram:ec') THEN 'ram:copy 'epath'ec ram:'        /* for slow sys: devices */*/
  11. IF ~EXISTS('ram:delete') THEN 'copy c:delete ram:'        /* the delete command */
  12.  
  13. ADDRESS 'rexx_ced'
  14.  
  15. 'status 19'                        /* ask ced filename */
  16. file = result
  17.  
  18. 'status 18'
  19. IF result ~= 0 THEN DO                /* save if changed */
  20.   'save' file                           /* we're saving file.e */
  21.   SAY 'saving changes of file 'file
  22. END
  23. ELSE SAY 'no changes..'
  24.  
  25. SAY 'invoking Mac2EFront with'file
  26. ADDRESS
  27. OPTIONS FAILAT 10000
  28. 'E:bin/flushcache'
  29. 'delete t:tmp_SPP.e QUIET'
  30. 'copy 'file' t:tempsource'
  31.  
  32. comm = 'e:bin/mac2efront t:tmp_SPP.e t:tempsource'
  33.  
  34. SAY comm                            /* echo what we're doing */
  35. comm                                /* and then do it.. */
  36.  
  37. IF ~EXISTS('t:tmp_SPP.e') THEN 'copy 'file' t:tmp_SPP.e'
  38. 'delete t:tempsource QUIET'
  39.  
  40. PARSE VAR file comparg '.e'            /* strip the extension */
  41.  
  42. SAY 'invoking E compiler with (t:tmp_SPP.e of) file ' comparg'.e '
  43.  
  44. 'e:bin/ec IGNORECACHE WB REG=3 t:tmp_SPP'            /* compile file  t:tmp_SPP.e */
  45. eline=rc
  46.  
  47. 'ram:copy t:tmp_SPP 'comparg' QUIET'
  48.  
  49. SAY 'running the executable 'comparg
  50. IF EXISTS(comparg) THEN comparg        /* run exe */
  51. SAY 'returnvalue of 'comparg' : 'rc
  52.  
  53. 'ram:delete t:tmp_SPP QUIET'            /* delete the temporary files */
  54. /*'ram:delete t:tmp_SPP.e QUIET'          /* source can be found while running */
  55. */
  56.  
  57. ADDRESS
  58. pull                                /* wait for a <cr> */
  59. ADDRESS 'rexx_ced'
  60. 'cedtofront'
  61. IF eline>0 THEN 'jump to line' eline     /* jump to spot of error */
  62. exit 0
  63.