Determining file dependencies and rule provenance in Hadrian
make build system has a few important introspection features which are invaluable when working on the build system:
make -pallows one to easily dump the entire database, which can be useful in conjunction with grep to identify where rules are defined
make -nallows one to dump all of the commands necessary to build a particular file and its dependencies
make -nWmakes it easy to determine which files a particular file would affect
I've been unable to work out how to accomplish any of this with
hadrian. Ideally we would like to have a
hadrian mode to query the rulebase for which rule is responsible for building a particular target. This would include its source location and dependencies.
It's possible that these already exist but it's not clear from the help message in what form.