home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / sprint / spturbo.zip / COMPILE.SPM next >
Text File  |  1989-05-27  |  3KB  |  117 lines

  1. ; compile.spm
  2.  
  3. ; A Sprint menu system for the command line compilers: Turbo Pascal,
  4. ; Turbo C, and Turbo Assembler.  Allows you to set compiler default settings
  5. ; that will be passed to the command line compiler.
  6.  
  7. ; Just load this file with the Alt-U-M-L command. Then assign it to 
  8. ; a key sequence for easy access with Alt-U-M-E. Tell Sprint that the 
  9. ; macro is named : compilemenu. Press A to assign to a key sequence.  
  10. ; In my version of Sprint, I've assigned it to "Shift-Alt-C".
  11.  
  12. ; This is a work in progress and is not complete.  I would be very interested
  13. ; to hear from anyone who uses this and/or makes modifications so I can learn
  14. ; and enhance this macro.  Given Sprint's capabilities, I believe this 
  15. ; simulation of the Turbo integrated environments could be worthwhile.
  16.  
  17. ; Written by Chris Barker, CIS ID 72261,2312.
  18.  
  19. ; May 20, 1989
  20.  
  21. ; Last Updated: May 27, 1989
  22.  
  23.  
  24. ; Initialize debug code generation to false(0).  These settings will be 
  25. ; sticky - they will stay set to however you last set them.
  26.  
  27.     int Pdebug    0        
  28.     int Cdebug    0
  29.     int Adebug    0
  30.     int Xref        0
  31.  
  32.  
  33. SelectModel: 
  34.     menu "Model" {
  35.     "tiny"        set QN  "-mt",
  36.     "small"        set QN  "-ms",
  37.     "compact"        set QN  "-mc",
  38.     "medium"        set QN  "-mm",
  39.     "large"        set QN  "-ml",
  40.     "huge"        set QN  "-mh"
  41.     }
  42.  
  43.  
  44. PASSettingsMenu:
  45.     do {
  46.     menu "Current Settings" {
  47.         Pdebug    "Debug Info\>%[OFF%:ON%]"
  48.         !Pdebug->Pdebug,
  49.         "Primary File"
  50.         }
  51.     }
  52.  
  53. CSettingsMenu:
  54.     do        {
  55.     menu "Current Settings" {
  56.         Cdebug    "Debug Info\>%[OFF%:ON%]"
  57.         !Cdebug->Cdebug,
  58.         "Primary File",
  59.         "Memory Model"    SelectModel,                 
  60.         Xref        "Gen Xref\>%[OFF%:ON%]"
  61.         !Xref->Xref
  62.         }
  63.     }                        
  64.  
  65. TASMSettingsMenu:
  66.     do {
  67.     menu "Current Settings" {
  68.         Adebug    "Debug Info\>%[OFF%:ON%]"
  69.         !Adebug->Adebug,
  70.         "Primary File"
  71.         }
  72.     }
  73.  
  74. CompileDfltMenu:
  75.     menu "Compiler Defaults" {
  76.     "Pascal Settings"     PASSettingsMenu,
  77.     "C Settings"         CSettingsMenu,
  78.     "Assembler Settings" TASMSettingsMenu,
  79.     "Linker Settings"
  80.     }
  81.  
  82.  
  83. CompileMenu:
  84.  
  85. ; Each time this menu is called, the memory model for  Turbo C will be set
  86. ; to small.  I would like to initialize this globally so that you don't have 
  87. ; keep resetting alternate models each time.  I haven't figured out how to 
  88. ; initialize a global string variable yet.
  89.  
  90.     set QN "-ms"
  91.     set QD cdstrip fname
  92.  
  93.     menu "Compiler Menu" {
  94.     "Pascal (tpc)"    Save 
  95.     if Pdebug { 1 call "command /ctpc /v" QD } else 
  96.       { 1 call "command /ctpc" QD}, 
  97.  
  98.     "C (tcc)"    Save 
  99.     if Cdebug { 1 call "command /c tcc -c -v -g5 -j5" QN QD } else 
  100.       { 1 call "command /c tcc -c -g5 -j5" QN QD }, 
  101.  
  102.     "Assembler (tasm)" 
  103.     Save 
  104.     if Adebug { 1 call "command /ctasm /zi" QD } else 
  105.       { 1 call "command /ctasm " QD }, 
  106.  
  107.     "Linker"        set QD fchange "%.obj" QD
  108.     1 call "command /ctlink" QD,
  109.  
  110.     "_",
  111.     "Defaults" 
  112.     CompileDfltMenu                
  113.     }
  114.  
  115.  
  116.  
  117.