Next: , Previous: , Up: Invocation   [Contents][Index]


9.13 Build system options

-m
--make

Treat the non-option arguments to ‘mmc’ as files to make, rather than source files. Create the specified files, if they are not already up-to-date. (Note that this option also enables ‘--use-subdirs’.)


-r
--rebuild

Same as ‘--make’, but always rebuild the target files even if they are up to date.


-k
--keep-going

With ‘--make’ keep going as far as possible even if an error is detected.


-j n
--jobs n

With ‘--make’, attempt to perform up to n jobs concurrently for some tasks.


--track-flags

With ‘--make’, keep track of the options used when compiling each module. If an option for a module is added or removed, ‘mmc --make’ will then know to recompile the module even if the timestamp on the file itself has not changed. Warning, verbosity and build system options are not tracked.


--pre-link-command command

Specify a command to run before linking with ‘mmc --make’. This can be used to compile C source files which rely on header files generated by the Mercury compiler. The command will be passed the names of all of the source files in the program or library, with the source file containing the main module given first.


--extra-init-command command

Specify a command to produce extra entries in the .init file for a library. The command will be passed the names of all of the source files in the program or library, with the source file containing the main module given first.


--install-prefix dir

Specify the directory under which to install Mercury libraries.


--install-command command

Specify the command to use to install the files in Mercury libraries. The given command will be invoked as command source target to install each file in a Mercury library. The default command is ‘cp’.


--install-command-dir-option option

Specify the flag to pass to the install command to install a directory. The given command will be invoked as command option source target to install each directory. The default option is ‘-R’.


--no-detect-libgrades

Do not scan the installation direcotry to determine which standard library grades are available.


--libgrade grade

Add grade to the list of compilation grades in which a library to be installed should be built.


--no-libgrade

Clear the list of compilation grades in which a library to be installed should be built. The main use of this is to avoid building and installing the default set of grades.


--libgrades-include-component component
--libgrades-include component

Remove grades that do not contain the specified component from the set of library grades to be installed. (This option does not work with Mmake, only ‘mmc --make’.)


--libgrades-exclude-component component
--libgrade-exclude component

Remove grades that contain the specified component from the set of library grades to be installed. (This option does not work with Mmake, only ‘mmc --make’.)


--lib-linkage {shared,static}

Specify whether libraries should be installed for shared or static linking. This option can be specified multiple times. By default libraries will be installed for both shared and static linking.


--flags file
--flags-file file

Take options from the specified file, and handle them as if they were specified on the command line.


--options-file file

Add file to the list of options files to be processed. If file is ‘-’, an options file will be read from the standard input. By default the file Mercury.options in the current directory will be read. See Using Mmake for a description of the syntax of options files.

--config-file file

Read the Mercury compiler’s configuration information from file. If the ‘--config-file’ option is not set, a default configuration will be used, unless ‘--no-mercury-stdlib-dir’ is passed to ‘mmc’. The configuration file is just an options file (see Using Mmake).


--options-search-directory dir

Add dir to the list of directories to be searched for options files.


--mercury-configuration-directory dir
--mercury-config-dir dir

Search dir for Mercury system’s configuration files.


-I dir
--search-directory dir

Append dir to the list of directories to be searched for imported modules.


--intermod-directory dir

Append dir to the list of directories to be searched for ‘.opt’ files.


--use-search-directories-for-intermod

Append the arguments of all -I options to the list of directories to be searched for ‘.opt’ files.


--no-libgrade-install-check

Do not check that libraries have been installed before attempting to use them. (This option is only meaningful with ‘mmc --make’.)


--use-subdirs

Create intermediate files in a Mercury subdirectory, rather than in the current directory.


--use-grade-subdirs

Generate intermediate files in a Mercury subdirectory, laid out so that multiple grades can be built simultaneously. Executables and libraries will be symlinked or copied into the current directory. ‘--use-grade-subdirs’ does not work with Mmake (it does work with ‘mmc --make’).


--order-make-by-timestamp

Make ‘mmc --make’ compile more recently modified source files first.


--show-make-times

Report run times for commands executed by ‘mmc --make’.


--extra-library-header file
--extra-lib-header file

Install the specified C header file along with a Mercury library. (This option is only supported by ‘mmc --make’)


--restricted-command-line

Enable this option if your shell doesn’t support long command lines. This option uses temporary files to pass arguments to sub-commands. (This option is only supported by ‘mmc --make’)


--env-type type

Specify the environment type in which the compiler and generated programs will be invoked. The environment type controls how the compiler and generated programs interact with the shell and other system tools. The type should be one of ‘posix’, ‘cygwin’, ‘msys’, or ‘windows’. This option is equivalent to setting all of ‘--host-env-type’, ‘--system-env-type’ and ‘--target-env-type’ to type.


--host-env-type type

Specify the environment type in which the compiler will be invoked. (See above for a list of supported environment types.)


--system-env-type type

Specify the environment type in which external programs invoked by the compiler will run. If not specified, this defaults to the value given by ‘--host-env-type’.


--target-env-type type

Specify the environment type in which generated programs will be invoked. (See above for a list of supported environment types.)


Next: , Previous: , Up: Invocation   [Contents][Index]