This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -MD behavior does not match documentation
- To: I Lee Hetherington <ilh at sls dot lcs dot mit dot edu>
- Subject: Re: -MD behavior does not match documentation
- From: Jamie Lokier <jamie dot lokier at cern dot ch>
- Date: Thu, 16 Sep 1999 22:58:21 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <37E0FDB5.F0BE4059@sls.lcs.mit.edu>
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