gcc can output Makefile-compatible dependency files with the -MD -MF combo, or -MMD -MF which leaves out system files (such as stdio.h). dmd has -deps, but the output format is unusable by GNU make and requires transformation.
This feature is necessary in order to have Make and Ninja compatible dependency generation done by the compiler.
Comment #1 by andrej.mitrovich — 2015-02-17T12:50:41Z
Doesn't RDMD already support this feature? I thought it did..
Comment #2 by atila.neves — 2015-02-17T14:16:35Z
Huh, so it does, I just tried it out. However:
1. It has too much information, it turns out. The gcc equivalent just churns out foo.o: foo.c foo.h bar.h ...
rdmd includes the compiler, the .conf file and transitive dependencies.
2. It requires rdmd to be installed. Which it probably is, but...
Comment #3 by atila.neves — 2015-02-17T16:58:35Z
Another issue is that rdmd builds an executable. I need this to be done as a single file is compiled. Just like gcc.
Comment #4 by atila.neves — 2020-07-02T09:41:33Z
*** Issue 16746 has been marked as a duplicate of this issue. ***