This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: -MD and -MMD
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: -MD and -MMD
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Thu, 11 Jan 2001 18:22:02 +0000
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <87u276f2bj.fsf@creche.redhat.com>
Tom Tromey wrote:-
> I've noticed that neither -MD nor -MMD is documented in invoke.texi.
> Is this intentional? I'm worried that this lack of documentation
> might mean that these switches are deprecated. If that's the case,
> I'd like to argue against deprecating them.
No, a mistake. I'd removed them from invoke.texi, thinking it was
cpp.texi because they mentioned a @var{file} in the documentation. I
noticed this mistake yesterday, but just hadn't gone round to putting
it back. Fixed below.
I'm quite happy to support -MD and -MMD from the drivers, but wish to
deprecate the argument-taking versions handled by the stand-alone
preprocessors. They are no longer documented.
> I've also noticed that the long forms of these options
> (--write-dependencies and --write-user-dependencies) are not mentioned
> in the docs.
>
> If this is just an oversight I'd like to know; I'll submit a patch.
I'll leave this bit to you.
Neil.
* invoke.texi: Restore the drivers' switches -MD and -MMD.
Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/invoke.texi,v
retrieving revision 1.260
diff -u -p -r1.260 invoke.texi
--- invoke.texi 2001/01/10 21:40:13 1.260
+++ invoke.texi 2001/01/11 18:20:58
@@ -3317,6 +3317,25 @@ Like @samp{-M}, but mention only the fil
"@var{file}"}. System header files included with @samp{#include
<@var{file}>} are omitted.
+@item -MD
+@findex -MD
+Like @samp{-M} but the dependency information is written to a file
+rather than stdout. @code{gcc} will use the same file name and
+directory as the object file, but with the suffix ".d" instead.
+
+This is in addition to compiling the main file as specified ---
+@samp{-MD} does not inhibit ordinary compilation the way @samp{-M} does,
+unless you also specify @samp{-MG}.
+
+With Mach, you can use the utility @code{md} to merge multiple
+dependency files into a single dependency file suitable for using with
+the @samp{make} command.
+
+@item -MMD @var{file}
+@findex -MMD
+Like @samp{-MD} except mention only user header files, not system
+-header files.
+
@item -MF @var{file}
@findex -MF
When used with @samp{-M} or @samp{-MM}, specifies a file to write the