Let the D compiler print the dependencies.

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Wed Dec 27 06:32:04 PST 2006


While thinking about build tools and IDE integration, why not let the D
compiler have a switch to print the dependencies?

# dmd t.d -c -deps
depends: std.string

This has the advantage, that if there is a change in the rules how
version/debug/static-if are evaluated, the build tool does not need to
know about them. The build tool can use different compilers and compiler
versions and can ask the compiler for the list of dependencies for a
given module.

-deps
Prints the dependencies, each in one line, starting with "depends: ".
-deps=filename
Prints the dependencies into the given file, each in one line without
additional text.

Does this make sense?
What do you think?

Frank



More information about the Digitalmars-d mailing list