https://issues.dlang.org/show_bug.cgi?id=13517
--- Comment #22 from Andrei Alexandrescu <[email protected]> --- (In reply to Ketmar Dark from comment #20) > (In reply to Steven Schveighoffer from comment #17) > so it's not a "side effect", .di file has to be explicitly asked. > > > > and why build tool doesn't know about '.di'? > > I mean, the build tool knows it only as a dependency, not as a target. It > > has no idea how to build the .di file. The .di file is built as a side > > effect of building the .o file. > no, it's not a "side effect". and build tool doesn't know how to build .o > from .d too. one must provide the rule which builds .o from .d. one must > provide the rule which builds .di from .d. simple and easy. Actually it's not that simple and easy. One invocation of the compiler produces both .o and .di files. A common mistake made with rules that generate multiple files is to do https://www.gnu.org/software/make/manual/html_node/Multiple-Targets.html, which is wrong. There are a few better solutions, neither of which trivial. See e g. http://www.cmcrossroads.com/article/rules-multiple-outputs-gnu-make. --
