When multiple .c (.cpp?) files are mentioned on the command line, GCC places only a single one in the MD output:
$ echo "int main() { return 0; }" > a.c $ echo "int foo() { return 0; }" > b.c $ gcc -MD a.c b.c $ cat a.d a.o: a.c b.c was lost, but should be listed. -- Summary: gcc -MD misses multiple command line source files Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: wsnyder at wsnyder dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45166