Sorry for not being clearer. In the first run, make has access to everything, and since some-funny-script.sh is maintained by some other team, it's possible that it will access everything. That's what I meant by my question. But I think you answered my clumsy question anyway :)
So I think what you want cannot be done easily in Bazel. There are multiple problems:
* you cannot run dep-gen in the analysis phase (where dependencies are calculated), that phase is completely functional and isolated, it cannot run commands, it cannot read files, it can only create the action graph with computed dependencies.
* we have .d file parsing and handling implemented, but only for C++ rules, and it happens behind the scenes, you cannot provide your custom .d file.
* you could use repository_rule to create .d files and produce BUILD files based on that. But from what I assume, it will be nontrivial. But this approach might be worth investigating.
But from my experience, maintaining dependencies explicitly is not a bottleneck at all, and you'd get all these nice features bazel has. Can you maybe elaborate on why this is a problem? Do you have too many dependencies? Or other teams don't want to transition to bazel?