make.py icon indicating copy to clipboard operation
make.py copied to clipboard

Disable feature "Targets are automatically rebuilt when their rules' command lines change"?

Open JeffreyBenjaminBrown opened this issue 6 years ago • 1 comments

I'm experimenting with different ways of getting something done, and the fact that each time I change the recipe to something I believe is equivalent, it gets rebuilt, is slowing me down a lot.

JeffreyBenjaminBrown avatar Nov 22 '19 22:11 JeffreyBenjaminBrown

I think that in general, that feature is very valuable and essential for reliable incremental builds--the fact that make doesn't do it is really annoying for me, whenever I have to use it. Are you just asking for an option to disable it? I'm not sure that would be useful enough to keep an option around... I'd expect almost all tools to have different output from different command line arguments (otherwise what's the point in changing them?).

It should work to just delete the self.cmds entry from the tuple on line 195 of make.py, which disables the signature checking for just the commands, but not for all the other important aspects of the rule:

-        info = (self.targets, self.deps, self.cwd, self.cmds, self.d_file, self.msvc_show_includes)
+        info = (self.targets, self.deps, self.cwd, self.d_file, self.msvc_show_includes)

This should be considered fairly dangerous though, since it might cause weird rebuild issues in the future if you're not careful.

Would it instead be more useful to have hash-based dependency checking instead of/in addition to timestamp-based checking? That's something that is definitely useful, and is on the roadmap.

zwegner avatar Nov 23 '19 01:11 zwegner