D-Programming-Language/tools — pull request #118 by leandro-lucarella-sociomantic (2014-02-21 01:08:08+00:00)
Title: rdmd: Add --dependfile option

The idea behind this option is to provide something similar to GCC's -MF
option, which generate a dependency file at the same time it compiles
the program. This is very useful to keep a Makefile with the
dependencies always updated:

-include .deps.mak

prog:
rdmd --build-only --dependfile=.deps.mak prog.d

On the first build .deps.mak will be created and afterwards, the only
way the dependencies could change is if prog.d or any of its
dependencies change, in which case a build will be triggered and the new
dependencies file will be generated.