home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / epmgcc32.zip / INSTALL.DOC < prev    next >
Text File  |  1996-12-07  |  13KB  |  261 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.  
  9. Legal stuff:
  10. ~~~~~~~~~~~
  11. See the file license.txt.
  12.  
  13.  
  14. Requirements:
  15. ~~~~~~~~~~~~
  16. The EMX/GCC interface to EPM supplied with this package needs to be compiled
  17. before it can be incorporated into EPM. You will need to obtain the complete EPM
  18. package (EPM 6.03 or above) from IBM to do this. The EPM package is available for
  19. free from various Internet sites and is part of the Developer Connection CDs.
  20.  
  21. Note: EPM 5.51a is part of OS2 Warp (EPM 6.03b is part of Warp
  22.       Version 4). You still need to obtain the complete package, since you
  23.       need the source code of the standard set of e-macros.
  24.  
  25.  
  26. Introduction:
  27. ~~~~~~~~~~~~
  28. (Skip this section if you are familiar with configuring and compiling EPM).
  29.  
  30. To understand how the menu and function key support for EMX/GCC is implemented,
  31. one has to understand how IBM's Enhanced Editor EPM works. EPM consists of one
  32. exe-file (EPM.EXE) and a few "ex"-files, normally at least "epm.ex". EPM.EXE
  33. supplies the PM-interface (e. g. message-queue), while the ex-files implement
  34. the functions of the editor via compiled macros. Each ex-file is called a module
  35. and consists of definitions of editor commands, internal procedures, menus, keys
  36. and so on. These definitions are written in a macro language called "E", which
  37. is similar but not identical to REXX. The source files have the extension "e".
  38.  
  39. Each module is the result of a compilation process of a source file. It is
  40. possible to include other source files in a sort of "master source file".
  41. Normally, the whole set of standard macros are compiled into one module, epm.ex.
  42. This module is loaded at startup of the editor. Additional modules can be
  43. loaded later.
  44.  
  45. Including source files into a master source file allows not only for an easier
  46. maintenance of code, but allows the inclusion of files depending on
  47. configuration constants (similar to #ifdef #include ... #endif structures in C).
  48.  
  49. Configuring EPM and adding own applications is made very simple through a trick.
  50. The standard set of E-macros include a number of MY*.E files. These files are
  51. the only ones which have to be changed. Once the MY*.E files are set up, only
  52. epm.e have to be recompiled and the modules have to be located in a
  53. place where the editor can find them.
  54.  
  55. The following sections deal with the installation of EPM 6.03b and the
  56. modifications necessary on the MY*.E files to install EPMGCC.
  57.  
  58.  
  59. Installation of EPM 6.0x:
  60. ~~~~~~~~~~~~~~~~~~~~~~~~
  61. The EPM package includes two hypertext files; the EPM User's Manual, and the EPM
  62. Technical Reference.  Both of these manuals provide a wealth of information on
  63. EPM.  It is highly recommended that you spend some time becoming familiar with
  64. EPM, and the E macro language by reading through them.
  65.  
  66. EPM consists of a number of *.exe-files (they belong somewhere along your PATH),
  67. *.dll-files (they belong in a directory in your LIBPATH), *.hlp-files (put them
  68. in a directory in your HELP environment variable) and *.inf-files (they should
  69. go in a directory in your BOOKSHELF environment variable). That's it for the
  70. basic installation. NOTE: make sure that all *.exe, *.dll etc. files come before
  71. any files from the standard WARP EPM 5.51a distribution.
  72.  
  73. As mentioned above, most of the functionality of EPM is contained in macros.
  74. All compiled macros (*.ex-files) must be either in the current directory,
  75. in a directory along the PATH or EPMPATH, or in the directory of EPM.EXE (they
  76. are searched in that order).
  77.  
  78. The macro translator ETPM.EXE will look for source files in the following
  79. locations (in that order):
  80.   - in the current directory
  81.   - along the EPMPATH
  82.   - along the DPATH
  83.   - in the same directory as ETPM.EXE
  84. e.g. if you enter the command `etpm epm`, then epm.e will be searched for in the
  85. directories mentioned above.
  86.  
  87. I recommend the following setup:
  88.  
  89.   - don't put *.ex files into your EPMPATH, but somewhere along the PATH
  90.   - copy all *.ex files except epm.ex (and draw.ex, see below) from the EPM 6.03
  91.     package into one directory along your PATH
  92.   - recompile draw.e if you do not set the constant WANT_DBCS_SUPPORT=1 in
  93.     your mycnf.e
  94.   - create the following directory structure
  95.  
  96.     e_macros               all my*.e files
  97.        ├─ epmstd           all *.e files of the standard distribution
  98.        ├─ epmbeta          all *.e files of epmbeta
  99.        ├─ epmgcc           all files from EPMGCC
  100.        ├─ tex              all files from the epmtex package (if needed)
  101.        ├─ modified         all modified *.e files from the epmstd, epmbeta
  102.        └─ other            various *.e files
  103.  
  104.   - setup your EPMPATH to contain all the above directories, make sure that
  105.     e_macros\modified comes before e_macros\epmbeta and e_macros\epmstd. Of
  106.     course you can add additional directories, depending on the number of
  107.     packages you use.
  108.  
  109. Configuring the editor:
  110. ~~~~~~~~~~~~~~~~~~~~~~
  111. "Configuring the editor" means the definition of constants which define the
  112. behavior of the editor like colors, appearance of the mouse, mark-mode and (very
  113. important!) which macros of the standard set are included into the base-module
  114. epm.ex. Configuring is not only important to make EPM look and act like you
  115. expect it to do, but also to save space. For example, I have thrown out all
  116. macros which implement the host support, since my PC is not connected to a host.
  117. This minimizes the startup time of the editor.
  118.  
  119. Configuration is done by setting up a file called MYCNF.E. This file is included
  120. by various e-macro source file to alter the code at compile time.
  121.  
  122. Read the section in the EPM user's manual 'Changing the default configuration'
  123. to understand the use of EPM's configuration constants and what they can do. The
  124. binaries included with the EPM package were compiled with the constants defined
  125. in epmgcnf.smp in your e_macros\epmstd subdirectory. If these are OK with you,
  126. copy epmgcnf.smp to a file called mycnf.e in your e_macros directory. I have
  127. also included a file MYCNF.SMP as an example of a configuration file (it is the
  128. one I use).
  129.  
  130. Important notes: 1) Never put any executable e-code in MYCNF.E!
  131.                  2) Configuriation for EPM 6.0x should be a bit different from
  132.                     the configuration for EPM 5.51. See MYCNF.SMP for an example.
  133.                  3) Please don't just copy MYCNF.SMP to MYCNF.E and then write
  134.                     mails to me asking why EPM suddenly behaves different.
  135.  
  136.  
  137. Implementing EPMGCC:
  138. ~~~~~~~~~~~~~~~~~~~
  139. Any additional applications should be implemented via the MY*.E files. They are
  140. included automatically at the right place. The following files are supplied as
  141. samples (extension "smp" instead as "e"):
  142.  
  143. MYKEYS.E    This file should include application key definitions. It is better
  144.             to use "TRYINCLUDE" statements, so you don't have to change this
  145.             file if a new version of an application is to be used. The sample
  146.             file consists of a single statement:
  147.                  TRYINCLUDE 'gcckeys.e'.
  148.             The included file defines some accelerator keys and the
  149.             "next-error-key".  If the defined keys conflict with key definitions
  150.             of other applications, you would have to edit gcckeys.e.
  151.  
  152. MYSTUFF.E   All includes for application macros which should go into the module
  153.             epm.ex. The sample file consists of two statements (since I also use
  154.             EPMTEX13):
  155.                  TRYINCLUDE 'tex.e'
  156.                  TRYINCLUDE 'gcc.e'
  157.             If you do not have EPMTEX13, you do not have to remove the first
  158.             line - it is ignored by the macro compiler.
  159.             Important: none of the *parse.e and *set.e files should be
  160.             included via TRYINCLUDE. They must be compiled separately!
  161.  
  162. MYMNUINI.E  This file is included by the standard macro which implements the
  163.             menu support. If applications need menu support, their code should
  164.             be included into this file. Again, the sample consists of two
  165.             statements:
  166.                  TRYINCLUDE 'texmenu.e'
  167.                  TRYINCLUDE 'gccmenu.e'
  168.             Note to EPMTEX13 users: I have renamed the file mymnuini.e supplied
  169.             with EPMTEX13 to texmenu.e.
  170.  
  171. ACTIONS.LST This file is an exception. It is necessary for toolbar support and
  172.             your actions.lst file must contain the line `gccactn`. The sample
  173.             file provided in the distribution already contains this line.
  174.  
  175.  
  176. Configuring EPMGCC:
  177. ~~~~~~~~~~~~~~~~~~
  178. EPMGCC offers three levels of configuration. The basic configuration file
  179. gccenv.e defines constants and defaults for various settings.
  180.  
  181. Configuration macros (provided are gccset.e, bccset.e, iccset.e, iccset2.e,
  182. vacppset.e, vacppst2.e, ipfset.e, javaset.e, nrxset.e nrxset2.e) can be
  183. used to define the utilities (compiler, make, debugger) which are invoked
  184. by the various menu-selections and default values for the
  185. compile/build-options.
  186.  
  187. Toggles for debug mode, autosave mode, verbose (test), the automatic removal of
  188. error-files and save settings mode can be changed at runtime. They are saved
  189. from session to session if save settings is checked.
  190.  
  191. A sample configuration file is included in the distribution (gccenv.smp).
  192. Rename it to gccenv.e and change it to fit your needs.
  193.  
  194. Note that editing gccenv.smp is not enough, EPMGCC needs a file called
  195. gccenv.e!
  196.  
  197.  
  198. Compiling the macros:
  199. ~~~~~~~~~~~~~~~~~~~~
  200. First, switch to the directory where you want to place your *.ex files. Then
  201. invoke the command `makemacs` from the EPMGCC distribution. This batch file will
  202. recompile epm.ex and all macros of EPMGCC. It writes a log called makemacs.log
  203. and displays the log at the end. ETPM will complain about all errors with line
  204. and column number. If all your paths are set up correctly and if MYCNF.E doesn't
  205. contain errors, there should be no errors reported.
  206.  
  207. You should now be ready to use EPMGCC. For a test, start the editor, load a
  208. c-source file into the edit-ring, edit it to include errors and press c-F12 (or
  209. use the drop-down menu). After gcc has finished, press a-q once (this takes you
  210. to the error-file) and after examining the errors press a-q again. This takes
  211. you to the first error. Repeat pressing a-q to take you from error to error. At
  212. any time, you can switch to the current error-file with the menu-selection "View
  213. results" (there might be more than one error-file with the same name in the
  214. edit-ring). If you want to go to a specific error, put the cursor on the line
  215. reporting the error and press a-q.
  216.  
  217.  
  218. Note on implicit and explicit linking of macros:
  219. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  220. Compiled e-macros can be loaded implicitly and explicitly. The latter ones stay
  221. in memory and are always available, e.g. epm.ex is loaded at startup of the
  222. editor. You can use the command
  223.     ql <module>  (e.g. ql epm)
  224. to query the link status of a module.
  225.  
  226. The default configuration loads gccparse.ex, the gcc-error-parser at startup.
  227.  
  228. Implicit loading occurs when you issue a command from the editor command-line
  229. (CTRL-i) and the command is not an internal command and is not found in the
  230. set of explicitly loaded macros. EPM will then search your paths for a
  231. compiled e-macro, load it into memory, execute and discard it. Candidates for
  232. these kind of macros are either seldom used or big macros, which would
  233. otherwise take away too much space.
  234.  
  235. The setup macros (e.g. gccset.e) will only work if they are implicitly loaded.
  236. They perform three tasks: they set up some editor-variables, unload the
  237. current error-parser and install a new one. Using this feature, you can switch
  238. between compilers without quitting the editor and recompiling the macros.
  239.  
  240.  
  241. Final notes:
  242. ~~~~~~~~~~~
  243.  
  244. I hope EPMGCC is of value for you.  If you think you have found a genuine bug,
  245. or would like to make suggestions, contributions, or enhancements to this code
  246. please drop me a note (I will include additional error-parsers in the
  247. distribution, e.g. for texinfo, if I am provided with them).
  248.  
  249. Since I have released this code without charge, I cannot offer a warranty or
  250. customer support, but I will do my best within the limit of available time.
  251.  
  252. English is not my native language. Nevertheless, I hope the documentation is
  253. clear enough to be of use. Everybody is welcome to supply a corrected version if
  254. you feel it makes things clearer.
  255.  
  256.  
  257. 12/07/96
  258. Bernhard Bablok
  259. D-82256 Fuerstenfeldbruck, Germany
  260. INTERNET: ua302cb@sunmail.lrz-muenchen.de
  261.