RMLC(1)

NAME
rmlc - RML compiler

SYNOPSIS
rmlc [ -c ] [ -Dname [=token ] ] [ -dryrun ] [ -foption ] [ -g ] [ -Idir ] [ -keeptmp ] [ -Ldir ] [ -lname ] [ -ofile ] [ -p ] [ -Uname ] [ -v ] [ -Wc,args ] [ -Woption ] [ +C ] [ +Rrts ]

DESCRIPTION
rmlc is the interface to the RML compilation system. The compilation tools conceptually consist of the RML translator, the C compiler, and the link editor. rmlc processes the supplied options and then executes the various tools with the proper arguments. rmlc accepts several types of files as arguments.

Files whose names end with .rml are taken to be RML source files and may be translated, compiled, and link edited. The compilation process may be stopped after the completion of any pass if the appropriate options are supplied. If the compilation process runs through the translator, then a C source file is produced whose name is that of the RML file with .c substituted for .rml; additionally, a C header file is produced suffixed .h. If the compilation process runs through the C compiler, then an object file is produced whose name is that of the C file with .o substituted for .c. In the same way, files whose names end in .c are taken to be C source files; they may be compiled and link edited. Files whose names end in .o or .a are handed to the link editor, which produces an executable whose name by default is a.out.

OPTIONS
Options and file name arguments may be freely mixed. Arguments are processed from left to right. The following options are interpreted by rmlc:

+C  Translate, but do not compile or link edit the named RML files.

-c  Suppress the link editing phase of the compilation.

-Dname[=token]
    Associates name with the specified token as if by a #define preprocessing directive. If no =token is specified, the token 1 is supplied. This option is passed to the C compiler.

-dryrun
    Show each component as it would have been invoked, but do not actually execute it.

-foption
    The entire option is passed to the RML translator.

-g  Direct the C compiler to produce additional information for symbolic debugging. Also direct the link editor to link with debug-enabled object libraries. The last one of -g and -p to be specified takes precedence.

-Idir
    Look in dir, prior to the usual directories, for included files whose names do not begin with slash (/). Directories for multiple -I options are searched in the order specified. This option is passed to the C compiler.

-keeptmp
    Retain temporary files created during compilation, instead of deleting them automatically.

-Ldir
    Add dir to the list of directories searched for object libraries. This option is passed to the link editor.

-lname
    Link with object library libname.so or libname.a. This option is passed to the link editor.

-o filename
    If linking, produce the executable code in filename instead of a.out. If not linking, produce object code for file.c in filename instead of file.o. Do not specify both of -c and -o if more than one file is being compiled.

-p  Direct the C compiler to generate extra code to write profile information. Also direct the link editor to link with profile-enabled object libraries. The last one of -g and -p to be specified takes precedence.

+Rrts
    Direct the RML translator to generate code for the runtime system named rts instead of the default plain. Also direct the link editor to link with the appropriate object library.

-Uname
    Cause any definition of name to be undefined, as if by a #undef preprocessing directive. This option is passed to the C compiler.

-v  Show each component as it is invoked (verbose mode).

-Wc,args
    Hand off the arguments args to c. Each argument must be separated from the preceding by only a comma. (A comma can be part of an argument by escaping it by an immediately preceding backslash (\) character; the backslash is removed from the resulting argument.) c can be one of the following:

    c   C compiler: (cc, gcc)
    r   RML translator: (rml)

-Woption
    The entire option is passed to the RML translator, unless it is of the form -Wc,args.

FILES
file.rml
    RML source file containing an RML module
file.c
    C source file
file.h
    C header file
file.o
    object file
a.out
    executable output file

SEE ALSO
cc(1), gcc(1), rml(1), librml(3x)

The Definition of RML.

Compiling Natural Semantics.

NOTES
The steps needed to compile and link RML code are sufficiently complex, and sometimes obscure, that users should not attempt to perform them themselves. Users are advised to use the rmlc driver in all of the following cases:
1.  When compiling RML source code.
2.  When compiling C code that either was generated by the RML translator, or uses RML declarations from <rml.h>.
3.  When linking, and one or more object files were produced from RML source code or C code that uses RML declarations.

AUTHOR
Mikael Pettersson (mikpe@sophia.inria.fr, mikpe@ida.liu.se).