D-Programming-Language/tools — pull request #146 by CyberShadow (2014-09-08 13:33:03+00:00)
Title: rdmd: Don't recompile the program if only current directory changes

Use the absolute path to the root .d file instead.

It is certainly possible that the build result will depend on
the current directory. For example, if the root file imports
other modules, these will be sought in the current directory
first. However, this is an unlikely use case, and can be
simulated using e.g. --force or -I%CD%.

On the other hand, having your script be rebuilt every time
it is run from a different directory is an unnecessary waste
of time and disk space.