So I have this Makefile based build system that my users feel is working too slowly. For the sake of this question lets define performance as the time it takes make to figur
Try running make
with the -d
flag. This will output debugging information outlining exactly what make
is doing and in what order, as well as why it is doing it. I use that output to find things that I would otherwise miss, such as unintentional recursive make
calls or things that are out of order and forcing certain files or parts of the source tree to be processed multiple times. My guess is that you'll be surprised at how much make
is doing behind the scenes that you weren't aware of.
One warning though. The -d
option causes make
to produce an obscene amount of output. You will definitely want to redirect output to a file. You terminal will thank you later.
If you are the source hacker type, you could build a custom version of make
that put a high-resolution timestamp on each line that was printed due to the -d
flag. This would essentially create a timeline showing you exactly how much time make
wasted on each step.