mxcl/homebrew — pull request #11563 by springmeyer (2012-04-10 18:19:47+00:00)
Title: Mapnik Formula: Limit JOBS (in order to limit memory usage)

Mapnik usage of various headers, mainly boost spirit ones, leads to some cpp files requiring a lot of memory to compile - sometimes >= 1.5 GB. So, this commit reduces the number of jobs that are run in parallel.

As background: On my machine - an i7 with 8 logical cores and 8GB memory running with JOBS=6 works quite well but JOBS=8 leads the entire machine to be immediately sluggish. So, this change tries to be conservative by making JOBS=CPUS/2 which should work nicely for most all cases. The only better approach I can think of would be querying for the users available memory, but that seems like overkill.