public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* dependencies for sources in sub dirs.
@ 2005-11-10  0:17 Tobias Grimm
  2005-11-10 12:42 ` John Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Tobias Grimm @ 2005-11-10  0:17 UTC (permalink / raw)
  To: gcc-help

Hello!

Using gcc 4.0.2, I have the following problem:

Calling "gcc -MM src/foo.c" results in:

foo.o: src/foo.c src/bar.h

But IMHO that's wrong. The manpage says:

       -MT target
           Change the target of the rule emitted by dependency
generation.  By
           default CPP takes the name of the main input file, including any
           path, deletes any file suffix such as .c, and appends the plat-
           form's usual object suffix.  The result is the target.

"By default CPP takes the name of the main input file, including any
path" !!!

So I would assume to get this:

src/foo.o: src/foo.c src/bar.h

But I don't and so the generated dependencies are useless.

Is this a bug in gcc or the manpage, or am I doing something wrong? How
can I force gcc to include the path in the target? -MT is not an option,
because I have several different subdirectories.

Hope someone knows an answer....

Regards,

Tobias

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-10 13:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-10  0:17 dependencies for sources in sub dirs Tobias Grimm
2005-11-10 12:42 ` John Love-Jensen
2005-11-10 13:26   ` Tobias Grimm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).