MLETERNAL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT STATUS
ENVIRONMENT
AUTHOR
REPORTING BUGS
COPYRIGHT
SEE ALSO

NAME

mleternal − incrementally rebuild OCaml programs as source code evolves

SYNOPSIS

mleternal
mleternal
SCRIPT.ml
mleternal
[TREE]... [TARGET]...
mleternal
[OPTION]...

DESCRIPTION

Run mleternal with no arguments to compile all sources from current directory (recursively including subdirectories) and to create executables for each top-level module. Watch compiler messages evolving as the sources are changed.

Command line interface of mleternal has strict options and shortcuts. Shortcut forms are the following:

$ mleternal

= create foo.native for each module Foo that is not used by any other module; stay showing current messages both in case of success and failure

$ mleternal foo.ml -some --switches and arguments

= execute the given script with the given arguments; in case of errors just fail and exit.

$ mleternal ../Extra Abc/bar.cmx foo.cmo blah.native

= for each path pointing to an existing directory: include it as a source tree (self-visible only); for any other given path: create it as a target with possibly narrow source tree; stay showing current messages

The examples provided in the Examples/ directory are hopefully self-explanatory. Each use case has a file called 'go' that shows how mleternal can be run.

mleternal maintains lists of source trees and targets, discovers dependencies, calls external tools and processes error messages. The state is kept by a single server process. Also, all the real work is done by the server. First call to mleternal starts the server; subsequent calls reuse it, so they all share the same state. The file VOCABULARY contains more detailed description of mleternal.

mleternal is meant to work out-of-the-box with no configuration.

OPTIONS

General options:
-t
, --strict

Disable CLI shortcuts for this mleternal call

-c, --client

Start client in foreground

-s, --server

Start server in foreground; fail if already serving

--server-background

Start server in background; fail if already serving

--ensure-server

If no server is running, start new server in background

--pass-arguments

Pass all non-option arguments to what --execute points to

-j N, --jobs=N

Run at most N actions simultaneously. If not given, the number of available CPUs is taken.

Requests:
--stop-server

Ask the running server to exit (causing all clients to quit)

--rebuild

Delete all results and rebuild

--makefile[=PATH]

Overwrite ./Makefile (or the file PATH) with rules building all current targets in current dir

--tree=PATH

Include the given directory as source tree with self-visibility only

--ensure-tree-having=PATH

If PATH is outside all given trees, create a self-visible-only source tree rooted at the parent of PATH

--library-tree=PATH

Include the given directory as source tree visible to all trees

--guess-targets=PATH

Guess targets in the given source tree

--remove-tree=PATH

Detach the source tree and forget its settings

--target=PATH

Build the given file

--report[=PATH]

Report on the current state of the server to the file PATH (or mleternal_state.txt)

--execute=PATH

Execute the given file when succesfully built

--once

Exit when all targets are built or relevant errors shown; all messages go to stderr in a simple format

--stay

Stay showing current messages (exit with ctrl-C); messages are shown on stdout using terminal capabilities

--force-console-output

Print to stdout assuming it is a console

About mleternal:
--show-rules

Show a list of all defined rules

--help-manual-nroff

Print manual in nroff format and exit

--help

Display a help message and exit

--version

Show version information and exit

For debugging mleternal itself:
-g
, --show-commands

Show external commands that bring messages

--debug

Be explicit and debug-friendly

--debug-log

Write to debug log file

--check-invariants

Run time-consuming invariant checks

-m

Use alternative stdlib from hardcoded location

--run-tests

Run Tests.doit instead of mleternal

EXIT STATUS

0 - successful execution, no errors

1 - ordinary build errors, all requests fulfilled

2 - failed to satisfy user's requests, fatal errors occured

ENVIRONMENT

MLETERNAL_OPTIONS - additional options included when mleternal starts. The same syntax as command line options. Doesn't influence interpretation of shortcut forms given as real command line options. Some options cannot be passed this way (--help, -t, -s, -c, --debug-log, -g and others).

AUTHOR

Dawid Toton <d0@wp.pl>

REPORTING BUGS

https://forge.ocamlcore.org/tracker/?atid=766&group_id=171&func=browse

COPYRIGHT

Copyright © 2010 Dawid Toton <d0@wp.pl>

SEE ALSO

A more flexible tool: http://omake.metaprl.org