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
It depends on what you try to measure and how complex your Makefiles are.
If you just want to measure the parsing, invoke a trivial target without dependencies.
But this doesn't work well if you have target-specific rules (e.g. due to the use of $(eval)
).
if you also want to measure the inferencing process (which I believe is much faster)
I don't see a way to invoke make
to achieve that.
If you also want to include the forking of the shell that executes the commands, things become easy again: set $(SHELL)
to something that surrounds the actual shell command execution with timing information.
Another idea is to run the make
source code itself under a profiler or to add timing messages.