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.lcs.mit dot edu>
- Subject: Re: -MD behavior does not match documentation
- From: Richard Hadsell <hadsell AT blueskystudios dot com>
- Date: Thu, 16 Sep 1999 11:03:32 -0400
- CC: gcc AT gcc.gnu dot org
- Organization: Blue Sky Studios
- References: <37E0FDB5.F0BE4059@sls.lcs.mit.edu>
I Lee Hetherington wrote:
>
> The documentation says that -MD (and -MMD) write dependency information
> "to a file made by replacing `.c' with `.d' at the end of the input file
> names." The problem is that if the input files are in a different
> directory, the .d files are put in the current directory as in this
> example:
>
> 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.
I strongly support the alternative -- putting it in the same directory
as the other output. It's annoying to have to clean up output from the
current directory. And it would make no sense to put it into the source
directory.
--
Dick Hadsell 914-381-8400 x5446 Fax: 914-381-9790
Reply-to: hadsell@blueskystudios.com
Blue Sky Studios http://www.blueskystudios.com
1 South Road, Harrison, NY 10528