Makefiles are compiled to a binary format. When available and up to date, nmake loads the compiled Makefile making it unnecessary to reread and re-parse the Makefile, which decreases the amount of time required to perform a build. Makefiles are recompiled automatically when they are out of date.
Users have seen up to 5 times faster incremental builds for up-to-date systems when the compiled Makefiles are used.
In the following example the Makefile compiles 52 C files.
Everything has been built and is up to date. The compiled
Makefile is named as the basename of the Makefile with the
$ ls -l Makefile.mo -rw-r--r-- 1 richb richb 8593 Jan 8 17:36 Makefile.mo
When nmake uses
Makefile.mo the average time to check
that this Makefile is up to date is about 0.98 seconds.
$ time nmake real 0m0.98s user 0m0.33s sys 0m0.40s
be re-parsed and interpreted causing the process to take longer.
The non-compiled case takes 42% longer.
$ rm Makefile.mo $ time nmake real 0m1.39s user 0m0.71s sys 0m0.39s
The standard make tool does not use compiled makefiles.