Update the build system to auto-generate correct dependencies when the target
isn't in the current directory.