On 12/12/06, Paul Smith <[EMAIL PROTECTED]> wrote:
...
Right, exactly. However, this is a very common requirement in
recursive builds; we can't get away from it. Suppose we were to
declare the REAL prerequisites in the top-level makefile; a.o
depends on foo.h (which will be generated from one of the
subdirectory builds):
<rehash of the initial problem description in the RMCH paper>
I guess my point wasn't clear. I understand completely that declaring
full and correct dependency information is not practical in a
recursive make setup. I'm not suggesting that. The point of that
part of my comment was the .WAIT doesn't appear to be a good solution
in a non-recursive setup because in that case you can just declare the
right dependencies.
(Yes, I'm ignoring the 'ar' issue because .WAIT is a poor solution to it)
So, if we assume that you're already in a recursive make setup, is
there an acceptable solution to the problem solved by .WAIT? It
appear to me that there is. As I wrote in a previous message, this
makefile:
local_objects = a.o b.o c.o d.o
all: all-recursive .WAIT all-local
all-recursive:
$(MAKE) -C subdir all
all-local: $(local_objects)
can currently be implemented like this:
local_objects = a.o b.o c.o d.o
all: all-recursive
$(MAKE) all-local
all-recursive:
$(MAKE) -C subdir all
all-local: $(local_objects)
For bonus points, change the 'all' rule to:
all: all-recursive
$(MAKE) -s all-local
to suppress the extra "entering directory" message.
If the boat has already sailed on using recursive make, then I see no
reason not to use it in solving the problems it created.
Philip Guenther
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make