bug-make
[Top][All Lists]
Advanced

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

Re: Detecting parallel builds


From: Philip Prindeville
Subject: Re: Detecting parallel builds
Date: Sat, 09 Apr 2011 11:32:14 -0700
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

On 4/9/11 5:44 AM, David Boyce wrote:
> On Fri, Apr 8, 2011 at 7:58 PM, Philip Prindeville <address@hidden> wrote:
>> Didn't hear back, so I assume there is no easy way to detect (currently) a 
>> parallel build.
> 
> There was a response by Edward Welbourne - didn't you see it? It's not
> a documented/supported solution but I believe if you find any of -j,
> --jobs, or --jobserver-fds in $(MAKEFLAGS) the build is parallel.
> Since the latter two both match --jobs%, this should boil down to two
> nested findstring function calls on the MAKEFLAGS value.
> 
> David Boyce

I didn't see it, but I might not have been in copy.

I just tried that:

address@hidden ~/openwrt2]$ cat /tmp/Makefile
$(info MAKEFLAGS=$(MAKEFLAGS))
$(info MFLAGS=$(MFLAGS))
$(info MAKE=$(MAKE))

PBUILD:=$(if $(filter --jobs% -j%,$(MAKEFLAGS)),y,)

all:
        @echo PBUILD=$(PBUILD)
        @$(MAKE) -f /tmp/Makefile stop

stop:

address@hidden ~/openwrt2]$ make -j5 -f /tmp/Makefile
MAKEFLAGS=
MFLAGS=
MAKE=make
PBUILD=
MAKEFLAGS=w
MFLAGS=-w
MAKE=make
make[1]: Entering directory `/home/philipp/openwrt2'
make[1]: Nothing to be done for `stop'.
make[1]: Leaving directory `/home/philipp/openwrt2'
address@hidden ~/openwrt2]$

Not sure what I'm missing...





reply via email to

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