.TH MODULA\-2 1 "$Revision$" .ad .SH NAME Modula-2 \- ACK Modula-2 compiler .SH SYNOPSIS \fBack\fR \-m\fImach\fR files .br \fImach\fR files .SH INTRODUCTION This document provides a short introduction to the use of the ACK Modula-2 compiler. It also mentions the location of definition modules for "standard" modules. .SH FILENAMES Usually, a Modula-2 program consists of several definition and implementation modules, and one program module. Definition modules must reside in files with names having a ".def" extension. Implementation modules and program modules must reside in files having a ".mod" extension. .PP The name of the file in which a definition module is stored must be the same as the module-name, apart from the extension. .SH CALLING THE COMPILER The easiest way to do this is to let the \fIack\fR(1) program do it. So, to compile a program module "prog.mod", just call .nf \fBack\fR \-m\fImach\fR prog.mod [ objects of implementation modules ] or \fImach\fR prog.mod [ objects of implementation modules ] .fi where \fImach\fR is one of the target machines of ACK. .PP To compile an implementation module, use the \-\fBc\fR flag to produce a ".o" file. Definition modules can not be compiled; the compiler reads them when they are needed. .PP For more details on the \fIack\fR program see \fIack\fR(1). .SH DEFINITION MODULES "Standard" definition modules can be found in the directory \fB~em/lib/m2\fR. .PP When the compiler needs a definition module, it is first searched for in the current directory, then in the directories given to it by the \-\fBI\fR flag in the order given, and then in the directory mentioned above. .SH FLAGS The \fIack\fR(1) program recognizes (among others) the following flags, that are passed to the Modula-2 compiler: .IP \fB\-I\fIdirname\fR .br append \fIdirname\fR to the list of directories where definition modules are looked for. .IP \fB\-I\fP don't look in the directory \fB~em/lib/m2\fR. .IP \fB\-M\fP\fIn\fP set maximum identifier length to \fIn\fR. The minimum value of \fIn\fR is 14, because the keyword "IMPLEMENTATION" is that long. .IP \fB\-n\fR do not generate EM register messages. The user-declared variables will not be stored into registers on the target machine. .IP \fB\-L\fR do not generate the EM \fBfil\fR and \fBlin\fR instructions that enable an interpreter to keep track of the current location in the source code. .IP \fB\-w\fR\fIclasses\fR suppress warning messages whose class is a member of \fIclasses\fR. Currently, there are three classes: \fBO\fR, indicating old-flashioned use, \fBW\fR, indicating "ordinary" warnings, and \fBR\fR, indicating restricted Modula-2. If no \fIclasses\fR are given, all warnings are suppressed. By default, warnings in class \fBO\fR and \fBW\fR are given. .IP \fB\-W\fR\fIclasses\fR allow for warning messages whose class is a member of \fIclasses\fR. .IP \fB\-g\fR produce a DBX-style symbol table. .IP \fB\-x\fR make all procedure names global, so that \fIadb\fR(1) understands them. .IP \fB\-Xs\fR make INTEGER ranges symmetric, t.i., MIN(INTEGER) = - MAX(INTEGER). This is useful for interpreters that use the "real" MIN(INTEGER) to indicate "undefined". .LP .SH SEE ALSO \fIack\fR(1), \fIem_m2\fR(6), \fIm2mm(1)\fR .SH FILES .IR ~em/lib/em_m2 : binary of the Modula-2 compiler. .SH DIAGNOSTICS All warning and error messages are written on standard error output. .SH REMARKS Debugging and profiling facilities may be present during the development of \fIem_m2\fP.