3 ms·
Besides performance, I do enjoy the feedback of incremental builds. It's not a huge deal but it's not uncommon that I spot a problem just because the build does
by simias 7y ago
Besides performance, I do enjoy the feedback of incremental builds. It's not a
huge deal but it's not uncommon that I spot a problem just because the build
doesn't behave in the way I expected. Out of the top of my head:
- I forget to add a dependency to the Makefile, I modify said file and
notice that `make` doesn't do anything, hinting that something is wrong. If
the build system rebuilds everything every time I probably won't notice the
problem immediately.
- I edit code in a project but run make in the wrong location (because I'm
working on two projects at one for instance). Again, make will tell me that
there's nothing to do when I make changes.
- I run the latest build and it behaves in an unexpected way, I'm thinking that
maybe I haven't actually built the last version of the source so the code I'm
looking at isn't what's being executed. If I run "make" and I see that it
starts rebuilding some artifacts I know that I'm out of date and need to try
again. If nothing happens then I need to stop looking for excuse and actually
start debugging.
- I pull code written by other people (or apply a patch, or unstash old
changes). Running make will give me some insight on what parts of the
codebase have been impacted. If I see that it's rebuilding something I didn't
expect to change it'll probably catch my eye and get me to double check what
happened.
So I definitely wouldn't trade a Makefile for a shell script, especially since
if you build system can easily be replaced by a simple script you'll probably be
able to do just fine with a very basic Makefile.