Comment 6 for bug 679164

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote : Re: [Bug 679164] Re: hugin invokation of make failure on MAKEFLAGS=-j2

On 2012-03-06 tmodes <email address hidden> wrote:
> Previously Andreas wrote:
[...]
>> The correct fix is to only run clean after all has finished (make all && make clean). Removing MAKEFLAGS from the environment might not hurt but should be configurable.
>> See also <https://sourceforge.net/tracker/?func=detail&aid=2781240&group_id=77506&atid=550441>.
[...]
> I'm not sure if running several instances of nona or enblend parallel is a good idea. Both program can use several threads/core parallel. So running several instance of nona parallel can result in unwanted blocking behavior of the different threads. Also the programs needs often a lot of free memory. So when running several threads parallel this is amplified. This can be to relieved to some amount by restricting the number of threads in the preferences.
> Some idea: Would it help to call make with the -j1 switch, also "make -f makefile -j1 info test all clean"? Or do you think, that's a wrong way?
[...]

Hello,
Afaict using the -j1 switch would work, at least with my version of
make commandline arguments supercede MAKEFLAGS:
ametzler@argenau:/tmp$ env MAKEFLAGS=j2 make foo bar
foobarfoo done
bar done
ametzler@argenau:/tmp$ env MAKEFLAGS=j2 make -j1 foo bar
foofoo done
barbar done

It seems to be a matter personal preference which of the (combination)
of proposed fixes is the best one:
* pass -j1
* Don't run make in a -j2 incompatible way, use "make all && make
  clean" instead of "make all clean"
* Drop MAKEFLAGS from make's environment.

cu andreas