¿Cómo configuro los valores predeterminados para make?

I'm the lucky owner of a 8 core Intel CPU, and I compile allot of stuff, mostly with make.

A make this run fast I usually use the -j 8 setting, telling make that it can run 8-way parallel -- however, sometimes I forget the -j 8 and feel the need to start hitting myself as my compilation runs way to slow.

how do I set -j 8, and similar stuff as the defaults for make?


preguntado el 10 de marzo de 12 a las 14:03

Which make and platform? GNU on Linux? -

@JoachimIsaksson: make on OSX -

1 Respuestas

You can set the environment variable MAKEFLAGS to values you want to have "always set":


respondido 10 mar '12, 14:03

is there a way to set it inside that makefile? - Martín Kristiansen

Not for that instance of make. The set up of parallelism happens right when make first starts up, so by the time the makefile is parsed it's too late. - Científico loco

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.