[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MAKEFLAGS var does not show "-j" param ???

From: David Wuertele
Subject: Re: MAKEFLAGS var does not show "-j" param ???
Date: Wed, 12 Mar 2008 19:27:26 +0000 (UTC)
User-agent: Loom/3.14 (

Paul Smith <psmith <at>> writes:

> This is the expected result on a system that does support parallel jobs
> via the jobserver.  The special --jobserver-fds option is an
> internal-only option that parent makes pass to child makes so they can
> participate in the jobserver.  For details on the jobserver see my site
> below.
> For a bit more info see this other recent thread:

I was the OP for that recent thread.  I went and read your article about
jobserver, it was very instructive.  Thank you for that.

I still have a problem.  My makefile builds cross-compiling toolchains.  Lots of
them.  But when my "make -j LARGENUMBER" does a submake in glibc ("$(MAKE) -C
/path/to/glibc-build"), the glibc build fails to parallelize, even though there
are definitely jobs available.

The glibc makefiles have a variable called PARALLELMFLAGS.  When I call $(MAKE)
-C /path/to/glibc-build PARALLELMFLAGS="-j X", glibc parallelizes as I wish.

I want my makefile to behave as follows:
1.  if I type "make" with no "-j", I want all builds to be sequential, including
the glibc submake

2.  if I type "make -j N", I want the total number of parallel jobs to be at
least N, but I can tolerate it being larger than N.

My idea is to do something like this in my recursive call to glibc build:

        $(MAKE) -C /path/to/glibc/build $($(if $(filter -j,$(info

That will get me most of the way there.  It hardcodes the glibc parallelism to
either one or four, according to whether the top-level make was parallel or not.

Any better suggestions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]