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: [CPP patch]: -M default name


Zack Weinberg wrote:-

> I'm not sure how it does work now, but here's how I think it should
> work: if -M[M] and not -MT, turn -o into -MQ.  i.e.
> 
> (cpp|gcc) -M foo.c -o foo.o
> 
> means
> 
> gcc -E -M foo.c -MQ foo.o

Right, that's what I'm aiming for; gcc will do this after the patch
but cpp won't.  I'll come back to cpp.

> > Note the specs change - the specs currently instruct the driver to
> > delete the output file in case of an error, which is just as bad as
> > truncating it, so I'm removing that.
> 
> Um.  No.  If you don't delete the output file, then when you restart
> make, it will think the output file is up to date when it isn't.

I don't understand - by output file I meant the ".o" file, which
shouldn't even be touched by the command line above (i.e. command
lines with -M or -MM).  If it was out of date before, it will still be
out of date, no?

Neil.

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