This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
-MD behavior does not match documentation
- To: gcc AT gcc.gnu dot org
- Subject: -MD behavior does not match documentation
- From: I Lee Hetherington <ilh AT sls.lcs.mit dot edu>
- Date: Thu, 16 Sep 1999 10:24:53 -0400
- Organization: MIT Laboratory for Computer Science
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.
--Lee Hetherington