tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make -j max_jobs
In article <20100422182856.GB21239%netbsd.org@localhost>,
David Holland <dholland-tech%netbsd.org@localhost> wrote:
>On Wed, Apr 21, 2010 at 10:06:00PM -0700, Simon J. Gerraty wrote:
> > If you run make with -j8 etc,
> > "-j" and "8" are placed in .MAKEFLAGS as two separate words.
> > So to get max_jobs you need something like:
> >
> > _NJOBS := ${.MAKEFLAGS:C,.*-j *([1-9][0-9]*).*,\1,W}
> >
> > would it be more useful to set say .MAKE.JOBS or .MAKE.MAX_JOBS to the
> > actual arg value as in:
>
>Yes. I've been trying to think if there's a better way to provide
>make's status information than an arbitrary collection of .MAKE.*
>variables, but I haven't come up with anything yet.
>
> > case 'B':
> > compatMake = TRUE;
> > Var_Append(MAKEFLAGS, "-B", VAR_GLOBAL);
> > + Var_Set(MAKE_MODE, "compat", VAR_GLOBAL, 0);
> > break;
>
>Is this right? Aren't we currently in compat mode *unless* -j is used?
>
>(as I've said elsewhere I don't think such linkage is a good idea, but
>that's a different discussion)
We are not in compat mode; being in compat mode would imply one shell
invocation per target command, instead we have one invocation per target.
christos
Home |
Main Index |
Thread Index |
Old Index