home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / epmgcc32.zip / gcc.doc < prev    next >
Text File  |  1996-12-07  |  14KB  |  322 lines

  1.               EPM 6.03 Interface to EMX/GCC, ICC, and other compilers
  2.  
  3.                              EPMGCC Version  3.20
  4.  
  5.                                Bernhard Bablok
  6.  
  7.                                 December, 1996
  8. History:
  9. ~~~~~~~
  10. 3.20: - Added support for NetRexx (thanks to Mike Cowlishaw for providing the
  11.         compact option).
  12.       - A correction in the JAVA-support: the name of the class wasn't passed
  13.         on to java/javapm.
  14.       - Added the constant GCC_EXTENSIONS. This constant defaults to
  15.         C_EXTENSIONS CPP_EXTENSIONS 'NRX'. The GCC-menue is available for all
  16.         filenames with these extensions.
  17.  
  18. 3.10: - Added support for JAVA.
  19.  
  20. 3.00: - Non 32bit versions of EPM are no longer supported.
  21.       - Added support for IBM's Visual Age C++.
  22.       - New menu option "Save settings": if this option is checked, all settings
  23.         (menu options, compile/build options, current parser module) are saved
  24.         inbetween sessions in EPM.INI. The only exception are the last five
  25.         opened projects, they are saved independently of this switch.
  26.       - UNLINK now works with relative pathnames, therefore all occurences of
  27.         GCC_MACRO_PATH have been removed from the macros.
  28.       - All universal variables now start with gcc_. Therefore, all *set.e macros
  29.         have to be changed (see below for details).
  30.  
  31. 2.10: (Never publicly released)
  32.       - Support for EPM 6.0x (the 32bit version of EPM) added (mainly support
  33.         for calling EPMGCC-commands from the toolbar)
  34.       - New menu-option "Select Project". The last five projects are saved in
  35.         EPM.INI and are available from a listbox.
  36.       - Runtime arguments are now also available for "Debug Exe"
  37.       - Runtime arguments are saved inbetween sessions in EPM.INI
  38.       - "Open Project" is now available from the menu, even if a project is
  39.         already open. Opening a new project just closes the old one.
  40.       - Good news for 4OS2-users: no more problems with the start command (is
  41.         this correct (I don't use it)?). Cristoph Spiel from Munich proposed
  42.         a solution which also works with the standard OS/2 start command, so
  43.         I changed the code.
  44.       - Some minor bug corrections
  45.  
  46. 2.00: - Design change: the error-parser is loaded as a seperately module. This
  47.         allows for changing the compiler and parser at runtime. Parser modules
  48.         are included for GCC, BCC, ICC and IPFC.
  49.       - The makefile maintenance utility epro.cmd is now distributed seperately
  50.         (Available as epro.zip, added some new functionality).
  51.  
  52. 1.10: - Bug fixes in gccproc.e (didn't work with makefiles without extensions,
  53.         "View Results" would repeatedly load the same file into the editor)
  54.       - New menu toggle "Remove .err-files automatically" (before every compile
  55.         or build all .err-files are removed automatically from the edit-ring)
  56.  
  57. 1.00: - first public release
  58.  
  59.  
  60. Credit:
  61. ~~~~~~
  62. Credit has to be given to Jon Hacker who wrote EPMTEX, the TeX interface to EPM.
  63. Some of the ideas are taken from his excellent
  64. work. With his code as a basis, the development of this application was straight
  65. forward. Any errors and oversights are nevertheless my fault.
  66.  
  67.  
  68. Disclaimer:
  69. ~~~~~~~~~~
  70. See the attached license.txt file. It is a modification of Jon's file included
  71. with EPMTEX, which in turn is copied more or less from IBM's license agreement.
  72.  
  73.  
  74. Introduction:
  75. ~~~~~~~~~~~~
  76. Although I hate fighting my way through menues and submenues and subsubmenues I
  77. did miss some of the features of Microsoft's Programmer's Workbench when working
  78. with the GNU c-compiler.  So I tried to facilitate programm development with the
  79. help of some REXX and E-macros.
  80.  
  81. After getting access to the EPMTEX-package of Jon Hacker which adds menu-support
  82. for TeX to EPM, I decided to build a full featured GCC-interface in a similar
  83. way.
  84.  
  85. With EPMGCC you can compile (and link) files, build projects, maintain makefiles
  86. and so on without leaving the editor. Since compile- and make-results are piped
  87. to an error-file, it is possible to move from error to error simply by pressing
  88. a predefined key combination. The cursor is positioned on the correct line (i.e.
  89. the line with the error). All source-files are loaded into the edit-ring
  90. automatically if necessary.
  91.  
  92. Although EPMGCC was designed as an interface to the GCC-compiler, it is
  93. now possible to use any compiler which generates reasonable error-messages.
  94. The user only has to define two e-macros: the error-parser and a configuration
  95. macro. This should not be difficult (see the samples provided in this
  96. distribution).
  97.  
  98. Installation:
  99. ~~~~~~~~~~~~
  100. See the file INSTALL.DOC for a description how to install EPMGCC and how to
  101. configure and recompile the macros for epm. Don't panic, it is less complicated
  102. than it seems!
  103.  
  104.  
  105. Configuration:
  106. ~~~~~~~~~~~~~
  107. EPMGCC offers three levels of configuration. The basic configuration file
  108. gccenv.e defines constants and defaults for various settings.
  109.  
  110. Configuration macros (provided are gccset.e, bccset.e, iccset.e, iccset2.e,
  111. vacppset.e, vacppst2.e, ipfset.e, javaset.e, nrxset.e and nrxset2.e) can be
  112. used to define the utilities (compiler, make, debugger) which are invoked
  113. by the various menu-selections and default values for the
  114. compile/build-options.
  115.  
  116. You have to edit the *set.e macros to suit your needs. Once they are compiled
  117. they are used like any epm command: invoke the EPM-command-line (CTRL-i) and
  118. just type (for example) `ipfset`.  This will configure the editor to use IBM's
  119. information presentation facility compiler in a compile.  The error-parser
  120. will also be able ble to interpret the error-messages of ipfc.
  121.  
  122. Toggles for debug mode, autosave mode, verbose (test), the automatic removal of
  123. error-files and save settings mode can be changed at runtime. They are saved
  124. from session to session if `save settings` is checked.
  125.  
  126. Details about configuration can be found in the file INSTALL.DOC and in the file
  127. gccenv.smp.
  128.  
  129. Description of menu-items:
  130. ~~~~~~~~~~~~~~~~~~~~~~~~~
  131.  
  132. > Open Project
  133.  
  134.   Pops up an entrybox asking for the name of a makefile.  The makefile need not
  135.   exist.  All results of make will be piped to a file with the same base name
  136.   and extension ".err". Any open project is closed automatically.
  137.  
  138.  
  139. > Select Project
  140.  
  141.   EPM keeps a record of the last five opened projects. Selecting this menu item
  142.   will present a listbox, from which a project can be selected (opened).
  143.  
  144.  
  145. > Edit Project
  146.  
  147.   If you decide to use EPRO, this selection starts the VREXX-script epro.cmd,
  148.   the makefile maintenance-utility. Depending on your configuration of EPMGCC,
  149.   this might only load the makefile into the edit-ring (starting with version
  150.   2.00, EPRO is available as a seperate package).
  151.  
  152.  
  153. > Close Project
  154.  
  155.   Close the current project.
  156.  
  157.  
  158. > Set Compile Options (c-F11)
  159.  
  160.   This menu-choice defines the compile options used with "Compile Current File"
  161.   depending on the setting of "Debug Mode" (see below). The options are passed
  162.   directly to gcc (or icc...) with the following execptions:
  163.  
  164.   %*   is replaced with the fully qualified filename of the current file
  165.   %**D is replaced with the drive letter and colon
  166.   %**P is replaced with the path including drive and trailing '\'
  167.   %**F is replaced with filename and extension (without path)
  168.   %**N is replaced with the filename only
  169.   %**E is replaced with the extension
  170.  
  171.   Compile options are saved from session to session if the toggle
  172.   `save settings` is checked.
  173.  
  174.   Examples:
  175.  
  176.   -c -g2 %*                 Compile current file, add debug information.
  177.   -O2 -o %**P%**N.exe %*    Compile current file and link. The exe-file has the
  178.                             same base name as the current file.
  179.   -O2 -o c:\bin\%**N.exe %* Identical to the second example, but places the exe-
  180.                             file into the c:\bin directory.
  181.  
  182.  
  183. > Compile Current File (c-F12)
  184.  
  185.   Depending on the setting of "Debug Mode" either compiles the current file with
  186.   the debug or production options in effect. The options can be changed with
  187.   "Set Compile Options".
  188.  
  189.  
  190. > Set Build Options (s-F11)
  191.  
  192.   Define options passed to the make utility. The same replacement syntax is used
  193.   as in "Set Compile Options", exept that the project-file (makefile) is used
  194.   instead of the current file. Note that the parts of the makefile-name are only
  195.   available if they are entered. Again two sets of options are kept, one for
  196.   debug mode and one for production.
  197.  
  198.   Build options are saved from session to session if the toggle
  199.   `save settings` is checked.
  200.  
  201.  
  202. > Build Current Project (s-F12)
  203.  
  204.   Make is invoked with the appropriate set of options.
  205.  
  206.  
  207. > View Results
  208.  
  209.   This selection switches to the last error-file produced either by "Compile
  210.   Current File" or by "Build Current Project". The file is always loaded from
  211.   disk - it is possible to have more than one copy of the same file in the
  212.   edit-ring. See also the discussion of the ALT-Q key combination.
  213.  
  214.  
  215. > Run Exe
  216.  
  217.   If the exe-file exists this menu-item pops up an entrybox asking for the
  218.   runtime parameters and starts the program in a new session. If the program
  219.   just prints out some text and then terminates, this option will not be very
  220.   useful (unless you have a very slow machine).
  221.  
  222.   Note that it is necessary that your makefile generates an exe-file with the
  223.   same base name as the project file, otherwise this (and the following) option
  224.   won't work.
  225.  
  226.   If the environment is set up to use the JAVA or NetRexx compiler, the
  227.   "Run Exe" option will present a listbox with the program to run (either
  228.   java, javapm or applet) and then prompt for the runtime argument(s). Java
  229.   and Javapm will try to run either `<project-name>.class` or
  230.   `<filename>.class`, depending on your last action (build or compile). If
  231.   you selected the appletviewer, you have to provide the name of an
  232.   existing HTML-file as the runtime argument.
  233.  
  234. > Debug Exe
  235.  
  236.   Invokes gdb (or any other debugger you have configured).
  237.  
  238.  
  239. > Debug Mode
  240.  
  241.   Toggles debug mode. If this menu item is checked, debug mode is in effect,
  242.   otherwise production mode.
  243.  
  244.  
  245. > Auto Save
  246.  
  247.   Toggles autosave mode. If this menu item is checked, the current file is saved
  248.   prior to invoking gcc if "Compile Current File" is selected. If "Build Current
  249.   Project" is selected, all files in the edit-ring are saved first.
  250.  
  251.  
  252. > Verbose Mode
  253.  
  254.   Toggles verbose mode. If this menu item is checked, all generated commands are
  255.   displayed in the message area prior to invoking them.
  256.  
  257.  
  258. > Remove .err-files automatically
  259.  
  260.   Before invoking compile/build, all .err-files in the edit-ring are FILEd/QUIT
  261.   automatically. Of course there is some additional delay, but compared to the
  262.   time it takes to start a new session for the compiler or make-utility this
  263.   seems negligible (unless you have an edit-ring with a lots of files).
  264.  
  265.  
  266. > Save settings
  267.  
  268.   Toggles save settings mode. If this menu item is checked, all settings are
  269.   saved inbetween sessions (toggles, compile/build options, error parser).
  270.  
  271.  
  272. Accelerator keys:
  273. ~~~~~~~~~~~~~~~~
  274. > CONTROL-F11 = "Set Compile Options"
  275. > CONTROL-F12 = "Compile Current File"
  276. > SHIFT-F11   = "Set Build Options"
  277. > SHIFT-F12   = "Build Current Project"
  278.  
  279. > ALT-Q ("goto next error")
  280.  
  281.   This special key-combination (defined in gcckeys.e) is used to jump from one
  282.   syntax error to the next.  The first time ALT-Q is pressed since the last
  283.   compile or build the key combination is identical to "View Results". Otherwise
  284.   ALT-Q will behave as follows:
  285.  
  286.   If ALT-Q is pressed while in the error-file, the cursor will jump to the error
  287.   (-line) of the compiler-error-message the cursor is positioned on and display
  288.   the message in the message area.  If ALT-Q is pressed in a source-file, the
  289.   cursor jumps directly to the next error.  The message parser is programmed to
  290.   skip all information-messages or link-errors.
  291.  
  292.   Note1: If you add or delete lines in a source file after invoking compile/build
  293.          the cursor will of course be positioned on lines below or above the
  294.          actual error - so don't be suprised.
  295.  
  296.  
  297. Toolbar support:
  298. ~~~~~~~~~~~~~~~
  299. All menu commands are also available from the toolbar. Select
  300. "Edit item..." from the context menu of a toolbar icon (press the right mouse
  301. button to get it) and from the combo-box select the appropriate command (all
  302. commands start with gcc, e.g. gccViewResults).
  303.  
  304. I also included a sample toolbar (gcc.bar). To activate it, select "File", then
  305. "Settings..." from the menu. From the settings notebook select "Toolbars" and
  306. push the "Import" button. From the standard file dialog, select gcc.bar (change
  307. to the correct directory if necessary). Then push the "Make current" push button.
  308.  
  309. NOTE: Since drive and pathnames are stored in gcc.bar, you might encounter
  310.       problems loading the toolbar. This is a bug in the import/export utility
  311.       of EPM's toolbar support. In this case you have to reconfigure all
  312.       toolbar items with a '?'-bitmap to show the correct bitmap.
  313.  
  314. The sample toolbar has icons for "Open Project", "Select Project",
  315. "Close Project", "Build current project", "View results", "Previous error",
  316. "Current error" and "Next error" (besides others).
  317.  
  318. 12/07/96
  319. Bernhard Bablok
  320. D-82256 Fuerstenfeldbruck, Germany
  321. INTERNET: ua302cb@sunmail.lrz-muenchen.de
  322.