home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 22 gnu
/
22-gnu.zip
/
epmgcc32.zip
/
gcc.doc
< prev
next >
Wrap
Text File
|
1996-12-07
|
14KB
|
322 lines
EPM 6.03 Interface to EMX/GCC, ICC, and other compilers
EPMGCC Version 3.20
Bernhard Bablok
December, 1996
History:
~~~~~~~
3.20: - Added support for NetRexx (thanks to Mike Cowlishaw for providing the
compact option).
- A correction in the JAVA-support: the name of the class wasn't passed
on to java/javapm.
- Added the constant GCC_EXTENSIONS. This constant defaults to
C_EXTENSIONS CPP_EXTENSIONS 'NRX'. The GCC-menue is available for all
filenames with these extensions.
3.10: - Added support for JAVA.
3.00: - Non 32bit versions of EPM are no longer supported.
- Added support for IBM's Visual Age C++.
- New menu option "Save settings": if this option is checked, all settings
(menu options, compile/build options, current parser module) are saved
inbetween sessions in EPM.INI. The only exception are the last five
opened projects, they are saved independently of this switch.
- UNLINK now works with relative pathnames, therefore all occurences of
GCC_MACRO_PATH have been removed from the macros.
- All universal variables now start with gcc_. Therefore, all *set.e macros
have to be changed (see below for details).
2.10: (Never publicly released)
- Support for EPM 6.0x (the 32bit version of EPM) added (mainly support
for calling EPMGCC-commands from the toolbar)
- New menu-option "Select Project". The last five projects are saved in
EPM.INI and are available from a listbox.
- Runtime arguments are now also available for "Debug Exe"
- Runtime arguments are saved inbetween sessions in EPM.INI
- "Open Project" is now available from the menu, even if a project is
already open. Opening a new project just closes the old one.
- Good news for 4OS2-users: no more problems with the start command (is
this correct (I don't use it)?). Cristoph Spiel from Munich proposed
a solution which also works with the standard OS/2 start command, so
I changed the code.
- Some minor bug corrections
2.00: - Design change: the error-parser is loaded as a seperately module. This
allows for changing the compiler and parser at runtime. Parser modules
are included for GCC, BCC, ICC and IPFC.
- The makefile maintenance utility epro.cmd is now distributed seperately
(Available as epro.zip, added some new functionality).
1.10: - Bug fixes in gccproc.e (didn't work with makefiles without extensions,
"View Results" would repeatedly load the same file into the editor)
- New menu toggle "Remove .err-files automatically" (before every compile
or build all .err-files are removed automatically from the edit-ring)
1.00: - first public release
Credit:
~~~~~~
Credit has to be given to Jon Hacker who wrote EPMTEX, the TeX interface to EPM.
Some of the ideas are taken from his excellent
work. With his code as a basis, the development of this application was straight
forward. Any errors and oversights are nevertheless my fault.
Disclaimer:
~~~~~~~~~~
See the attached license.txt file. It is a modification of Jon's file included
with EPMTEX, which in turn is copied more or less from IBM's license agreement.
Introduction:
~~~~~~~~~~~~
Although I hate fighting my way through menues and submenues and subsubmenues I
did miss some of the features of Microsoft's Programmer's Workbench when working
with the GNU c-compiler. So I tried to facilitate programm development with the
help of some REXX and E-macros.
After getting access to the EPMTEX-package of Jon Hacker which adds menu-support
for TeX to EPM, I decided to build a full featured GCC-interface in a similar
way.
With EPMGCC you can compile (and link) files, build projects, maintain makefiles
and so on without leaving the editor. Since compile- and make-results are piped
to an error-file, it is possible to move from error to error simply by pressing
a predefined key combination. The cursor is positioned on the correct line (i.e.
the line with the error). All source-files are loaded into the edit-ring
automatically if necessary.
Although EPMGCC was designed as an interface to the GCC-compiler, it is
now possible to use any compiler which generates reasonable error-messages.
The user only has to define two e-macros: the error-parser and a configuration
macro. This should not be difficult (see the samples provided in this
distribution).
Installation:
~~~~~~~~~~~~
See the file INSTALL.DOC for a description how to install EPMGCC and how to
configure and recompile the macros for epm. Don't panic, it is less complicated
than it seems!
Configuration:
~~~~~~~~~~~~~
EPMGCC offers three levels of configuration. The basic configuration file
gccenv.e defines constants and defaults for various settings.
Configuration macros (provided are gccset.e, bccset.e, iccset.e, iccset2.e,
vacppset.e, vacppst2.e, ipfset.e, javaset.e, nrxset.e and nrxset2.e) can be
used to define the utilities (compiler, make, debugger) which are invoked
by the various menu-selections and default values for the
compile/build-options.
You have to edit the *set.e macros to suit your needs. Once they are compiled
they are used like any epm command: invoke the EPM-command-line (CTRL-i) and
just type (for example) `ipfset`. This will configure the editor to use IBM's
information presentation facility compiler in a compile. The error-parser
will also be able ble to interpret the error-messages of ipfc.
Toggles for debug mode, autosave mode, verbose (test), the automatic removal of
error-files and save settings mode can be changed at runtime. They are saved
from session to session if `save settings` is checked.
Details about configuration can be found in the file INSTALL.DOC and in the file
gccenv.smp.
Description of menu-items:
~~~~~~~~~~~~~~~~~~~~~~~~~
> Open Project
Pops up an entrybox asking for the name of a makefile. The makefile need not
exist. All results of make will be piped to a file with the same base name
and extension ".err". Any open project is closed automatically.
> Select Project
EPM keeps a record of the last five opened projects. Selecting this menu item
will present a listbox, from which a project can be selected (opened).
> Edit Project
If you decide to use EPRO, this selection starts the VREXX-script epro.cmd,
the makefile maintenance-utility. Depending on your configuration of EPMGCC,
this might only load the makefile into the edit-ring (starting with version
2.00, EPRO is available as a seperate package).
> Close Project
Close the current project.
> Set Compile Options (c-F11)
This menu-choice defines the compile options used with "Compile Current File"
depending on the setting of "Debug Mode" (see below). The options are passed
directly to gcc (or icc...) with the following execptions:
%* is replaced with the fully qualified filename of the current file
%**D is replaced with the drive letter and colon
%**P is replaced with the path including drive and trailing '\'
%**F is replaced with filename and extension (without path)
%**N is replaced with the filename only
%**E is replaced with the extension
Compile options are saved from session to session if the toggle
`save settings` is checked.
Examples:
-c -g2 %* Compile current file, add debug information.
-O2 -o %**P%**N.exe %* Compile current file and link. The exe-file has the
same base name as the current file.
-O2 -o c:\bin\%**N.exe %* Identical to the second example, but places the exe-
file into the c:\bin directory.
> Compile Current File (c-F12)
Depending on the setting of "Debug Mode" either compiles the current file with
the debug or production options in effect. The options can be changed with
"Set Compile Options".
> Set Build Options (s-F11)
Define options passed to the make utility. The same replacement syntax is used
as in "Set Compile Options", exept that the project-file (makefile) is used
instead of the current file. Note that the parts of the makefile-name are only
available if they are entered. Again two sets of options are kept, one for
debug mode and one for production.
Build options are saved from session to session if the toggle
`save settings` is checked.
> Build Current Project (s-F12)
Make is invoked with the appropriate set of options.
> View Results
This selection switches to the last error-file produced either by "Compile
Current File" or by "Build Current Project". The file is always loaded from
disk - it is possible to have more than one copy of the same file in the
edit-ring. See also the discussion of the ALT-Q key combination.
> Run Exe
If the exe-file exists this menu-item pops up an entrybox asking for the
runtime parameters and starts the program in a new session. If the program
just prints out some text and then terminates, this option will not be very
useful (unless you have a very slow machine).
Note that it is necessary that your makefile generates an exe-file with the
same base name as the project file, otherwise this (and the following) option
won't work.
If the environment is set up to use the JAVA or NetRexx compiler, the
"Run Exe" option will present a listbox with the program to run (either
java, javapm or applet) and then prompt for the runtime argument(s). Java
and Javapm will try to run either `<project-name>.class` or
`<filename>.class`, depending on your last action (build or compile). If
you selected the appletviewer, you have to provide the name of an
existing HTML-file as the runtime argument.
> Debug Exe
Invokes gdb (or any other debugger you have configured).
> Debug Mode
Toggles debug mode. If this menu item is checked, debug mode is in effect,
otherwise production mode.
> Auto Save
Toggles autosave mode. If this menu item is checked, the current file is saved
prior to invoking gcc if "Compile Current File" is selected. If "Build Current
Project" is selected, all files in the edit-ring are saved first.
> Verbose Mode
Toggles verbose mode. If this menu item is checked, all generated commands are
displayed in the message area prior to invoking them.
> Remove .err-files automatically
Before invoking compile/build, all .err-files in the edit-ring are FILEd/QUIT
automatically. Of course there is some additional delay, but compared to the
time it takes to start a new session for the compiler or make-utility this
seems negligible (unless you have an edit-ring with a lots of files).
> Save settings
Toggles save settings mode. If this menu item is checked, all settings are
saved inbetween sessions (toggles, compile/build options, error parser).
Accelerator keys:
~~~~~~~~~~~~~~~~
> CONTROL-F11 = "Set Compile Options"
> CONTROL-F12 = "Compile Current File"
> SHIFT-F11 = "Set Build Options"
> SHIFT-F12 = "Build Current Project"
> ALT-Q ("goto next error")
This special key-combination (defined in gcckeys.e) is used to jump from one
syntax error to the next. The first time ALT-Q is pressed since the last
compile or build the key combination is identical to "View Results". Otherwise
ALT-Q will behave as follows:
If ALT-Q is pressed while in the error-file, the cursor will jump to the error
(-line) of the compiler-error-message the cursor is positioned on and display
the message in the message area. If ALT-Q is pressed in a source-file, the
cursor jumps directly to the next error. The message parser is programmed to
skip all information-messages or link-errors.
Note1: If you add or delete lines in a source file after invoking compile/build
the cursor will of course be positioned on lines below or above the
actual error - so don't be suprised.
Toolbar support:
~~~~~~~~~~~~~~~
All menu commands are also available from the toolbar. Select
"Edit item..." from the context menu of a toolbar icon (press the right mouse
button to get it) and from the combo-box select the appropriate command (all
commands start with gcc, e.g. gccViewResults).
I also included a sample toolbar (gcc.bar). To activate it, select "File", then
"Settings..." from the menu. From the settings notebook select "Toolbars" and
push the "Import" button. From the standard file dialog, select gcc.bar (change
to the correct directory if necessary). Then push the "Make current" push button.
NOTE: Since drive and pathnames are stored in gcc.bar, you might encounter
problems loading the toolbar. This is a bug in the import/export utility
of EPM's toolbar support. In this case you have to reconfigure all
toolbar items with a '?'-bitmap to show the correct bitmap.
The sample toolbar has icons for "Open Project", "Select Project",
"Close Project", "Build current project", "View results", "Previous error",
"Current error" and "Next error" (besides others).
12/07/96
Bernhard Bablok
D-82256 Fuerstenfeldbruck, Germany
INTERNET: ua302cb@sunmail.lrz-muenchen.de