home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / epmgcc10.zip / GCC.DOC < prev    next >
Text File  |  1994-02-05  |  8KB  |  214 lines

  1.                          EMX/GCC Interface to EPM 5.51
  2.  
  3.                              EPMGCC Version  1.00
  4.  
  5.                                Bernhard Bablok
  6.  
  7.                                 January, 1994
  8.  
  9. Credit:
  10. ~~~~~~
  11. Credit has to be given to Jon Hacker who wrote EPMTEX, the TeX interface to EPM.
  12. Some of the ideas and parts of the documentation are taken from his excellent
  13. work. With his code as a basis, the development of this application was straight
  14. forward. Any errors and oversights are nevertheless my fault.
  15.  
  16.  
  17. Disclaimer:
  18. ~~~~~~~~~~
  19. See the attached license.txt file. It is a modification of Jon's file included
  20. with EPMTEX, which in turn is copied more or less from IBM's license agreement.
  21.  
  22.  
  23. Introduction:
  24. ~~~~~~~~~~~~
  25. Although I hate fighting my way through menues and submenues and subsubmenues I
  26. did miss some of the features of Microsoft's Programmer's Workbench when working
  27. with the GNU c-compiler.  So I tried to facilitate programm development with the
  28. help of some REXX and E-macros.
  29.  
  30. After getting access to the EPMTEX-package of Jon Hacker which adds menu-support
  31. for TeX to EPM, I decided to build a full featured GCC-interface in a similar
  32. way.
  33.  
  34. With EPMGCC you can compile (and link) files, build projects, maintain makefiles
  35. and so on without leaving the editor. Since compile- and make-results are piped
  36. to an error-file, it is possible to move from error to error simply by pressing
  37. a predefined key combination. The cursor is positioned on the correct line (i.e.
  38. the line with the error). All source-files are loaded into the edit-ring
  39. automatically if necessary.
  40.  
  41. As a supplement, I have included a VREXX script called epro.cmd. This is a
  42. simple makefile maintenance utility which can also be used stand-alone. VREXX is
  43. IBM-employee-written software adding "PM"-support to REXX and is available free
  44. of charge from various ftp-sites.
  45.  
  46.  
  47. Installation:
  48. ~~~~~~~~~~~~
  49. See the file install.doc for a description how to install EPMGCC and how to
  50. configure and recompile the macros for epm. Don't panic, it is less complicated
  51. than it seems!
  52.  
  53.  
  54. Configuration:
  55. ~~~~~~~~~~~~~
  56. EPMGCC offers two levels of configuration. You can define the utilities
  57. (compiler, make, debugger) which are invoked by the various menu-selections.
  58. These definitions cannot be changed after the compilation of the edit-macros.
  59.  
  60. In addition you can define startup values for the compile/build-options and for
  61. the debug, autosave and verbose toggles.  These values can be changed at runtime
  62. but they cannot be saved from session to session.
  63.  
  64. Details about configuration can be found in the file install.doc and in the file
  65. gccenv.smp.
  66.  
  67. Description of menu-items:
  68. ~~~~~~~~~~~~~~~~~~~~~~~~~
  69.  
  70. > Open Project
  71.  
  72.   Pops up an entrybox asking for the name of a makefile.  The makefile need not
  73.   exist.  All results of make will be piped to a file with the same base name
  74.   and extension ".err".
  75.  
  76.  
  77. > Edit Project
  78.  
  79.   If you decide to use EPRO, this selection starts the VREXX-script epro.cmd,
  80.   the makefile maintenance-utility. Depending on your configuration of EPMGCC,
  81.   this might only load the makefile into the edit-ring.
  82.  
  83.  
  84. > Close Project
  85.  
  86.   Close the current project (before you can change the project, you have to
  87.   close the currently open project).
  88.  
  89.  
  90. > Set Compile Options (c-F11)
  91.  
  92.   This menu-choice defines the compile options used with "Compile Current File"
  93.   depending on the setting of "Debug Mode" (see below). The options are passed
  94.   directly to gcc with the following execptions:
  95.  
  96.   %*   is replaced with the fully qualified filename of the current file
  97.   %**D is replaced with the drive letter and colon
  98.   %**P is replaced with the path including drive and trailing '\'
  99.   %**F is replaced with filename and extension (without path)
  100.   %**N is replaced with the filename only
  101.   %**E is replaced with the extension
  102.  
  103.   Examples:
  104.  
  105.   -c -g2 %*                 Compile current file, add debug information.
  106.   -O2 -o %**P%**N.exe %*    Compile current file and link. The exe-file has the
  107.                             same base name as the current file.
  108.   -O2 -o c:\bin\%**N.exe %* Identical to the second example, but places the exe-
  109.                             file into the c:\bin directory.
  110.  
  111.   Note: All '\' are replaced by '/' automatically (this might be a problem if
  112.         you use native OS/2 applications instead of gcc or GNU-make).
  113.  
  114.  
  115. > Compile Current File (c-F12)
  116.  
  117.   Depending on the setting of "Debug Mode" either compiles the current file with
  118.   the debug or production options in effect. The options can be changed with
  119.   "Set Compile Options".
  120.  
  121.  
  122. > Set Build Options (s-F11)
  123.  
  124.   Define options passed to the make utility. The same replacement syntax is used
  125.   as in "Set Compile Options", exept that the project-file (makefile) is used
  126.   instead of the current file. Note that the parts of the makefile-name are only
  127.   available if they are entered. Again two sets of options are kept, one for
  128.   debug mode and one for production.
  129.  
  130.  
  131. > Build Current Project (s-F12)
  132.  
  133.   Make is invoked with the appropriate set of options.
  134.  
  135.  
  136. > View Results
  137.  
  138.   This selection switches to the last error-file produced either by "Compile
  139.   Current File" or by "Build Current Project". The file is always loaded from
  140.   disk - it is possible to have more than one copy of the same file in the
  141.   edit-ring. See also the discussion of the ALT-Q key combination.
  142.  
  143.  
  144. > Run Exe
  145.  
  146.   If the exe-file exists this menu-item pops up an entrybox asking for the
  147.   runtime parameters and starts the program in a new session. If the program
  148.   just prints out some text and then terminates, this option will not be very
  149.   useful (unless you have a very slow machine).
  150.  
  151.   Note that it is necessary that your makefile generates an exe-file with the
  152.   same base name as the project file, otherwise this (and the following) option
  153.   won't work.
  154.  
  155.  
  156. > Debug Exe
  157.  
  158.   Invokes gdb (or any other debugger you have configured).
  159.  
  160.  
  161. > Debug Mode
  162.  
  163.   Toggles debug mode. If this menu item is checked, debug mode is in effect,
  164.   otherwise production mode.
  165.  
  166.  
  167. > Auto Save
  168.  
  169.   Toggles autosave mode. If this menu item is checked, the current file is saved
  170.   prior to invoking gcc if "Compile Current File" is selected. If "Build Current
  171.   Project" is selected, all files in the edit-ring are saved first.
  172.  
  173.  
  174. > Verbose Mode
  175.  
  176.   Toggles verbose mode. If this menu item is checked, all generated commands are
  177.   displayed in the message area prior to invoking them.
  178.  
  179.  
  180. Accelerator keys:
  181. ~~~~~~~~~~~~~~~~
  182. > CONTROL-F11 = "Set Compile Options"
  183. > CONTROL-F12 = "Compile Current File"
  184. > SHIFT-F11   = "Set Build Options"
  185. > SHIFT-F12   = "Build Current Project"
  186.  
  187. > ALT-Q ("goto next error")
  188.  
  189.   This special key-combination (defined in gcckeys.e) is used to jump from one
  190.   syntax error to the next.  The first time ALT-Q is pressed since the last
  191.   compile or build the key combination is identical to "View Results". Otherwise
  192.   ALT-Q will behave as follows:
  193.  
  194.   If ALT-Q is pressed while in the error-file, the cursor will jump to the error
  195.   (-line) of the compiler-error-message the cursor is positioned on and display
  196.   the message in the message area.  If ALT-Q is pressed in a source-file, the
  197.   cursor jumps directly to the next error.  The message parser is programmed to
  198.   skip all information-messages or link-errors.
  199.  
  200.   Note1: If you add or delete lines in a source file after invoking compile/build
  201.          the cursor will of course be positioned on lines below or above the
  202.          actual error - so don't be suprised.
  203.  
  204.   Note2: If you use EPMGCC with a different compiler than gcc, you will most
  205.          likely have to change the parser of the error messages in the procedure
  206.          "gcc_next_error" in the file gccproc.e.
  207.  
  208.  
  209.  
  210. 1/28/94
  211. Bernhard Bablok
  212. D-82256 Fuerstenfeldbruck, Germany
  213. INTERNET: ua302cb@sunmail.lrz-muenchen.de
  214.