On Nov-21, Dan Sugalski wrote: > > I was mostly thinking that some step or other in the Makefile has a > dependency on that file, and some other step creates it, but the > dependency's not explicit. I'd like to find the step(s) that require it > and make it a dependency for them, then add in a dependency for the file > for whatever step actually creates it, so things get ordered properly. It > should (hopefully) be straightforward, but...
I have other evidence of dependency entanglement -- fairly often, I do a 'make; make test' (which I think is equivalent to 'make test' both theoretically and practically), and I'll have a bunch of tests fail. Doing a 'make clean; make test' fixes the failures. (Ok, sometimes it requires a re-Configure.pl too, but that's another issue.) There is a known dependency gap due to the recursive invocation of classes/Makefile, but I don't think that is causing either of these problems. Random idea for this problem and the zillions of similar problems people face all the time with make: it would be cool to patch ccache so that it reports its cache misses. And just to be anal, add a flag saying 'for this run, do not evict things from the cache to restrict space usage.' Then, when you do a 'make' that doesn't remake enough, you could do make clean export CC="ccache --report-misses=/tmp/misses.txt --no-evictions gcc" make and you could look at the first miss to see an example of something that needed to be rebuilt, but did not have a dependency triggering it. (I can see at least one way in which this scheme is still not guaranteed to be correct -- there's a reasonable chance you would hit in the cache from an unrelated compile, and thus fail to see the first missing dependency.)