help-make
[Top][All Lists]
Advanced

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

Re: passing -j option to a sub-make


From: Philippe HAUTION
Subject: Re: passing -j option to a sub-make
Date: Wed, 16 Oct 2002 10:37:59 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Parent Makefile works great now.

Many thanks.

Paul D. Smith wrote:

%% Philippe HAUTION <address@hidden> writes:

 ph> LOOP = @for ssp in $(SSP); do \
 ph>           (echo $$ssp :; cd $$ssp; \
 ph>            if [[ ! -f Makefile.dep ]]; then \
 ph>              $(MAKE) depend; \
 ph>            fi; \
 ph>            $(MAKE) $@ || return 1) \
 ph>         done

 ph> debug release clean cleand cleanr refresh depend pure :
 ph>     $(LOOP)


 ph> It is running fine except in parallel mode with the -j N
 ph> option. We get this warning : "jobserver unavailable: using -j1.
 ph> Add `+' to parent make rule.".

 ph> The manual says this warning means that the parent has troubles
 ph> determining the child is a make, which is quite confusing since
 ph> the MAKE variable seems properly used.

Make only looks at the unexpanded command line and searches for the
strings '$(MAKE)' or '${MAKE}'.  It does not look at the expansion of
the command line (it cannot, since after expansion obviously there will
be no $(MAKE) or ${MAKE}... they are expanded!)

Your unexpanded command line is the string '$(LOOP)', which obviously
does not contain the text '$(MAKE)' or '${MAKE}'.

Just exactly as the error message says, you need to add a "+" to the
beginning of the rule.  Change:

LOOP = @for ssp in $(SSP); do \
       ...

to

LOOP = address@hidden ssp in $(SSP); do \
       ...


--
Philippe Haution
EDF R&D
Département Méthodes d'Optimisation et de Simulation
1 Av du Général de Gaulle
92141 Clamart CEDEX







reply via email to

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