This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Implement -MF <output-filename>


On Sat, Jan 06, 2001 at 02:07:54PM +0000, Neil Booth wrote:
> Unfortunately this complicates things w.r.t. -MD and -MMD.  The "cpp"
> and "gcc" drivers would take these latter options without an argument,
> and pass them to cpp0 with an argument.
> 
> This meant cpp0 was providing multiple ways to express the output file
> name (not to mention the vaguely documented environment variable
> OUTPUT_DEPENDENCIES and the undocumented SUNPRO_DEPENDENCIES).
> 
> So, I scrapped -MD and -MMD from cpp0 (worthwhile simplification, in
> fact), and re-did the driver specs to cause -MD and -MMD send "-M -MF"
> or "-MM -MF" instead.  This seems cleaner and more logical.  It also
> eliminates much of the confusion that existed with -MG and -MD / -MMD.
> 
> The command line -MF overrides environment variable designations,
> since this seems to be standard practice.
> 
> Zack, do you think I'm going the right way with this?  I'll wait for
> your confirmation before committing.

I like it overall.

It is difficult for me to comprehend your patch since it's got
substantial code rearrangement on top of the semantic changes.
There's no change log for gcc.c.

-MD expands to -M -MF %b.d.  %b is the basename of the input file -
no directory component.  Is this what we want?  We just went through
changing the target name in dependency output to include the
directory.  However, since -MD's always done this, we can worry about
it later.

Do we have documentation in cpp.texi for all these new options?

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]