Allow extra make options to be passed to the Gem compilation.
This adds the variable GEM_MAKEFLAGS
to the Gem make
commands in externals/Makefile, allowing extra make options to be passed down from the toplevel make to the Gem compilation.
Its main purpose is to speed up Gem compilation on systems with multiple cpus. This can be done now by running the toplevel make with something like make GEM_MAKEFLAGS=-j8
to take advantage of parallel builds there.
E.g., on my 2018 Lenovo X1, make GEM_MAKEFLAGS=-j8
cuts down the total build time from 18m39s to 12m36s, which is a substantial improvement. And who would want to wait 6 extra minutes for Gem to finish building, while all those extra cpus are sitting there doing nothing? ;-)
Ideally, we should have make -j8
just work, but this seems impossible with the "hall of mirrors" that is our current build system. (You may recall that I had a stab at this some time last year, and failed miserably.) So this is the best that we can get right now, and it's just a minimal and unobtrusive change (and won't affect the build in any way if GEM_MAKEFLAGS
is not specified).