These options are mutually exclusive. If more than one of these options is specified, only the first in this list will apply. If none of these options are specified, the default action is to compile and link the modules named on the command line to produce an executable.
Output the module name to file name mapping for the list of source files given as non-option arguments to ‘mmc’ to Mercury.modules. This must be done before ‘mmc --generate-dependencies’ if there are any modules for which the file name does not match the module name. If there are no such modules the mapping need not be generated.
Output “Make”-style dependencies for the module and all of its dependencies to module.dep, module.dv and the relevant ‘.d’ files.
Output ‘Make’-style dependencies for the module to module.d’.
Output the strongly connected components of the module dependency graph in top-down order to module.order. Effective only if ‘--generate-dependencies’ is also specified.
Output a stand-alone interface. basename is used as the basename of any files generated for the stand-alone interface. (See see Stand-alone Interfaces for further details.)
Generate dependencies for use by ‘mmc --make’ even when using Mmake. This is recommended when building a library for installation.
Write the module interface to module.int. Also write the short interface to module.int2.
Write the unqualified version of the short interface to module.int3.
Write the module’s private interface (used for compiling nested sub-modules) to module.int0.
Write information used for inter-module optimization to module.opt.
Write the module.trans_opt file. This file is used to store information used for inter-module optimization. The information is read in when the compiler is invoked with the ‘--transitive-intermodule-optimization’ option. The file is called the “transitive” optimization interface file because a ‘.trans_opt’ file may depend on other ‘.trans_opt’ and ‘.opt’ files. In contrast, a ‘.opt’ file can only hold information derived directly from the corresponding ‘.m’ file.
Output an XML representation of all the declarations in the module into the file module.xml. This XML file can then be transformed via a XSL transform into another documentation format.
Convert to Mercury. Output to file module.ugly. This option acts as a Mercury ugly-printer. (It would be a pretty-printer, except that comments are stripped and nested if-then-elses are indented too much — so the result is rather ugly.)
Just check the syntax and type-correctness of the code. Don’t invoke the mode analysis and later passes of the compiler. When converting Prolog code to Mercury, it can sometimes be useful to get the types right first and worry about modes second; this option supports that approach.
Check the module for errors, but do not generate any code.
Generate target code (i.e. C in module.c, C# in module.cs, Java in module.java or Erlang in module.erl), but not object code.
Generate C code in module.c and object code in module.o but do not attempt to link the named modules.
Compute from the rest of the option settings the canonical grade string and print it on the standard output.
Print the command used to link executables to the standard output.
Print the command used to link shared libraries to the standard output.
Print the list of compilation grades in which a library to be installed should be built to the standard output.
Print the command used to invoke the C compiler to the standard output.
Print the C compiler type to the standard output.
Print the flags with which the C compiler will be invoked to the standard output.
Print the command used to invoke the C# compiler to the standard output.
Print the C# compiler type to the standard output.
Print the flags that are passed to the linker in order to link against the current set of libraries. This includes the standard library as well as any other libraries specified via the ‘--ml’ option. The flags are printed to the standard output.
Print the flags that are passed to the C compiler to define the macros used to specify the compilation grade. The flags are printed to the standard output.
Print the flags that are passed to the C compiler to specify which directories to search for C header files. This includes the C header files from the standard library. The flags are printed to the standard output.
Print the target architecture to the standard output.
Print to standard output the name of the directory in which generated Java class files will be placed.