This is the mail archive of the gcc@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: -MD behavior does not match documentation


I Lee Hetherington wrote:
> gcc -MD -c -o obj/foo.o src/foo.c
> 
> produces ./foo.d.  It would seem that foo.d should go into src according
> to the documentation.  An alternative might be to put it into obj, that
> is replace the .o in the output with .d, paying attention to -o.

This is why I use the SUNPRO_DEPENDENCIES environment variable.  Sadly
It's not documented, but it's the only way to get dependencies to do the
right thing when the -o name is different to the source name.  For
example, when compiling one source file to multiple target objects, with
different -D settings.  DEPENDENCIES_OUTPUT doesn't work for this.

-- Jamie


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