Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have defined

export MAKEOPTS="-j4"

in my ~/.profile file.

But when I do a compilation with make, this option is ignored.
I've consulted the GNU Make manual but it says nothing about this variable. Is it standard or only it works in certain distros?

share|improve this question
Where have you seen this being used? – Oli Jan 20 '11 at 12:30
up vote 1 down vote accepted
export MAKE="make -j4"

This will help invoking child make processes, but I'm afraid this wouldn't help with direct invocations, like just make all. Though a shell alias may help with the direct ones, so:

export MAKE="make $MAKEFLAGS"
alias make="make $MAKEFLAGS"
share|improve this answer
Thanks. "MAKEFLAGS" do de job. But if I set 'export MAKE="make $MAKEFLAGS"' when I do a make, it shows this warnings: "warning: -jN forced in submake: disabling jobserver mode." – Juan Simón Jan 20 '11 at 15:13

I'll be honest, before today I'd never seen MAKEOPTS.

MAKEFLAGS I know of but after some research, MAKEOPTS appears to be Gentoo- (and its children) specific.

And if it's not in the manual, it can hardly be considered standard by any stretch of the imagination.

share|improve this answer
strings /usr/bin/make | grep MAKEFLAGS shows some usage in my Ubuntu distro. – ulidtko Jan 20 '11 at 14:47
@ulidtko Please re-read. I wasn't doubting the existence of MAKEFLAGS. The question is about MAKEOPTS -- which can't be found in make. – Oli Jan 20 '11 at 18:19
you're right, I have confused MAKEOPTS in your answer. Sorry. – ulidtko Jan 20 '11 at 18:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.