Commit bb074cb7 authored by Simon Marlow's avatar Simon Marlow

Add -outputdir flag (#2295)

parent a5e3c828
......@@ -680,7 +680,8 @@ getVerbFlag dflags
| verbosity dflags >= 3 = "-v"
| otherwise = ""
setObjectDir, setHiDir, setStubDir, setObjectSuf, setHiSuf, setHcSuf, parseDynLibLoaderMode,
setObjectDir, setHiDir, setStubDir, setOutputDir,
setObjectSuf, setHiSuf, setHcSuf, parseDynLibLoaderMode,
setPgmP, setPgmL, setPgmF, setPgmc, setPgmm, setPgms, setPgma, setPgml, setPgmdll, setPgmwindres,
addOptL, addOptP, addOptF, addOptc, addOptm, addOpta, addOptl, addOptwindres,
addCmdlineFramework, addHaddockOpts
......@@ -693,6 +694,7 @@ setHiDir f d = d{ hiDir = Just f}
setStubDir f d = d{ stubDir = Just f, includePaths = f : includePaths d }
-- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file
-- \#included from the .hc file when compiling with -fvia-C.
setOutputDir f = setObjectDir f . setHiDir f . setStubDir f
setObjectSuf f d = d{ objectSuf = f}
setHiSuf f d = d{ hiSuf = f}
......@@ -1198,6 +1200,7 @@ dynamic_flags = [
, Flag "hidir" (HasArg (upd . setHiDir)) Supported
, Flag "tmpdir" (HasArg (upd . setTmpDir)) Supported
, Flag "stubdir" (HasArg (upd . setStubDir)) Supported
, Flag "outputdir" (HasArg (upd . setOutputDir)) Supported
, Flag "ddump-file-prefix" (HasArg (upd . setDumpPrefixForce . Just))
Supported
......
......@@ -254,7 +254,7 @@
</row>
<row>
<entry><option>-odir</option> <replaceable>dir</replaceable></entry>
<entry>set output directory</entry>
<entry>set directory for object files</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
......@@ -276,6 +276,12 @@
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-outputdir</option> <replaceable>dir</replaceable></entry>
<entry>set output directory</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
</tbody>
</tgroup>
</informaltable>
......
......@@ -374,6 +374,20 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch`
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-outputdir</option> <replaceable>dir</replaceable>
<indexterm><primary><option>-outputdir</option></primary></indexterm>
</term>
<listitem>
<para>The <option>-outputdir</option> option is shorthand for
the combination
of <option>-odir</option>, <option>-hidir</option>,
and <option>-stubdir</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-osuf</option> <replaceable>suffix</replaceable>
......
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