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:
> 
> 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

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