help-make
[Top][All Lists]
Advanced

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

Re: executing a rule prior to any targets?


From: gk
Subject: Re: executing a rule prior to any targets?
Date: Sat, 19 Oct 2002 23:39:02 -0700

At 09:10 AM 10/19/2002 -0400, Paul D. Smith wrote:
  g> * I do not want to specify 'recurse' as a command line goal; I want to
  g> build $(MAKECMDGOALS) in each directory in my list:
  g> recurse :
  g>          @for dir in $(SUBDIRS); do\
  g>                  $(MAKE) -C $$dir $(MAKECMDGOALS); \
  g>          done

See the GNU make manual for some reasons why doing submakes inside a
loop like this is suboptimal.

I re-read the section on recursive use of make but found nothing there.
Could you point me to a particular section of the manual?

My idea of doing it in a loop was to avoid the stack overhead of real recursion.

Thanks,
Greg





reply via email to

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