[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: executing a rule prior to any targets?
From: |
Philip Guenther |
Subject: |
Re: executing a rule prior to any targets? |
Date: |
Sun, 20 Oct 2002 01:57:57 -0700 |
address@hidden (gk) writes:
>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?
I don't know what Paul was referring to in the manual, but I will
suggest that you read, if you haven't already, the "Recursive Make
Considered Harmful" paper by Peter Miller:
http://owlsoft.ne.client2.attbi.com/build/rmch/recu-make-cons-harm.html
Last winter I converted a good sized project (150 directories, building
61 libraries and 48 executables, totalling ~1000 source files) from
recursive make to whole-project make with automatic dependency
generation. Having done so, I feel the advantages are hard to oversell,
starting with time saved by each developer not having to fight with the
build system.
(There are things I would like to change about how I made that
conversion, but when it
a) is actually correct, dependency-wise, and
b) takes less than two seconds to read everything and start building,
it becomes hard to justify spending much time tweaking it...)
Philip Guenther
address@hidden
- executing a rule prior to any targets?, gk, 2002/10/18
- Re: executing a rule prior to any targets?, Paul D. Smith, 2002/10/19
- Re: executing a rule prior to any targets?, gk, 2002/10/19
- Re: executing a rule prior to any targets?, Paul D. Smith, 2002/10/19
- Re: executing a rule prior to any targets?, gk, 2002/10/20
- Re: executing a rule prior to any targets?,
Philip Guenther <=
- Recursive Make Considered Harmful (was: Re: executing a rule prior to any targets?), gk, 2002/10/20
- Re: Recursive Make Considered Harmful (was: Re: executing a rule prior to any targets?), Philip Guenther, 2002/10/20
- Re: Recursive Make Considered Harmful (was: Re: executing a rule prior to any targets?), gk, 2002/10/23
- Re: Recursive Make Considered Harmful (was: Re: executing a rule prior to any targets?), Philip Guenther, 2002/10/24
- Re: Recursive Make Considered Harmful (was: Re: executing a rule prior to any targets?), gk, 2002/10/24
- Re: Recursive Make Considered Harmful (was: Re: executing arule prior to any targets?), Johan Bezem, 2002/10/24
- Re: Recursive Make Considered Harmful [Long Post], Johan Bezem, 2002/10/22
- Re: Recursive Make Considered Harmful [Long Post], gk, 2002/10/24
- Re: Recursive Make Considered Harmful, gk, 2002/10/25
- Re: executing a rule prior to any targets?, Paul D. Smith, 2002/10/20