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: Paul D. Smith
Subject: Re: passing -j option to a sub-make
Date: Tue, 15 Oct 2002 11:03:26 -0400

%% 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 \
        ...

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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