[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$(MAKEFLAGS) and -j
From: |
Warlich, Christof |
Subject: |
$(MAKEFLAGS) and -j |
Date: |
Mon, 27 Feb 2012 16:46:23 +0100 |
Hi,
from the manual:
> The ‘-j’ option is a special case (see Parallel
> Execution<http://www.gnu.org/software/make/manual/make.html#Parallel>). If
> you set it to some numeric value ‘N’
> and your operating system supports it (most any UNIX system will; others
> typically won't), the
> parent make and all the sub-makes will communicate to ensure that there are
> only ‘N’ jobs running
> at the same time between them all. Note that any job that is marked recursive
> (see Instead
> of<http://www.gnu.org/software/make/manual/make.html#Instead-of-Execution>
> Executing Recipes) doesn't count against the total jobs (otherwise we could
> get ‘N’ sub-makes
> running and have no slots left over for any real work!)
>
> If your operating system doesn't support the above communication, then ‘-j 1’
> is always put into
> MAKEFLAGS instead of the value you specified. This is because if the ‘-j’
> option were passed down
> t o sub-makes, you would get many more jobs running in parallel than you
> asked for. If you give ‘-j’
> with no numeric argument, meaning to run as many jobs as possible in
> parallel, this is passed
> down, since multiple infinities are no more than one.
But with this Makefile:
all:
$(info MAKEFLAGS:$(MAKEFLAGS))
the -j Option is never included into $(MAKEFLAGS):
$ make -j
MAKEFLAGS:
make: F�r das Ziel �all� ist nichts zu tun.
$ make --jobs
MAKEFLAGS:
make: F�r das Ziel �all� ist nichts zu tun.
But:
$ make -k
MAKEFLAGS:k
make: F�r das Ziel �all� ist nichts zu tun.
I tried this with V3.81 and V3.82.90. How can I find out if a parent make had
the -j option set?
Cheers,
Chris
- $(MAKEFLAGS) and -j,
Warlich, Christof <=