Introduction
This document describes the compilation environment of Mercury. It describes
- how to use ‘mmc’, the Mercury compiler;
- how to use ‘mmc –make’, a build tool integrated into ‘mmc’;
- how to use an older build tool, ‘mmake’, built on top of GNU make;
- how to use ‘mdb’, the Mercury debugger;
- how to use ‘mprof’, a ‘gprof’-style profiler for Mercury; and
- how to use ‘mdprof’, a more detailed profiler for Mercury that uses a web interface.
Mercury programs can be compiled to executables via any one of three target languages: C, Java and C#. The most frequently used target language is C, for two main reasons. The first is that several important parts of the Mercury system, such as ‘mdb’, ‘mprof’ and ‘mdprof’, are implemented only when targeting C. The second is that targeting C yields the fastest executables.