Commit 66c05136 authored by thomie's avatar thomie Committed by Austin Seipp

Update documentation for "Batch compiler mode"

Since commit 7828bf3e
* --make is the default
* -c is a mode flag, except when used in combination with --make

* -C (generate C code) is only available in unregisterised mode.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter

Differential Revision:
parent 6fc78fdf
......@@ -209,8 +209,8 @@
<entry>Do not link</entry>
<entry>Stop after generating object (<literal>.o</literal>) file</entry>
......@@ -245,6 +245,13 @@ module X where
<para>A file created by the preprocessor.</para>
......@@ -383,7 +390,7 @@ module X where
<command>ghc -E</command>
<command>ghc -c</command>
<command>ghc -C</command>
<command>ghc -S</command>
<command>ghc -c</command>
......@@ -395,10 +402,7 @@ module X where
<para>This is the traditional batch-compiler mode, in which
GHC can compile source files one at a time, or link objects
together into an executable. This mode also applies if
there is no other mode flag specified on the command line,
in which case it means that the specified files should be
compiled and then linked to form a program. See <xref
together into an executable. See <xref
......@@ -617,6 +621,11 @@ ghc Main.hs
given on the command line and GHC will include them when linking
the executable.</para>
<para>For backward compatibility with existing make scripts, when
used in combination with <option>-c</option>, the linking phase
is omitted (same as <option>--make</option>
<para>Note that GHC can only follow dependencies if it has the
source file available, so if your program includes a module for
which there is no source file, even if you have an object and an
......@@ -765,6 +774,10 @@ ghc -c Foo.hs
option</primary></indexterm> runs just the pre-processing passes
of the compiler, dumping the result in a file.</para>
<para>Note: The option <option>-C</option> is only available when
GHC is built in unregisterised mode. See <xref linkend="unreg"/>
for more details.</para>
<sect3 id="overriding-suffixes">
<title>Overriding the default behaviour for a file</title>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment