Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers 2

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:

MAKEFLAGS="-j4"
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." –  Simón Jan 20 '11 at 15:13
add comment

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
1  
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
add comment

Your Answer

 
discard

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.