Also modify dependency generation to be a side-effect of compilation. It's still not quite perfect in picking up some changes (in particular just after a commit, no files have changed but the git identification is now different).