Yes, this is tricky, and is only covering the case where you put `somefile.d`. In this case `rdmd` previously will add a `./somefile` to the exe, which is not suitable for Make dependency handling because for Make `somefile` and `./somefile` is not the same target (unfortunately). I think you are right about the flaw about the source file starting with "." but not "./", I guess I should check for "./". Or maybe I should just require `-of` to be present when `--makedep*` is present and get the problem off my back altogether. Is really a lot of guessing for a case nobody should use anyway.

I'm not familiar with `std.path`, what's your exact suggestion?