Christophe Lyon writes:
Sure, it's not difficult to replace
all: all-subdir all-local
by
all:
$(MAKE) all-subdir
$(MAKE) all-local
but, I don't want to introduce *recursive* calls to make.
If you want to call a third party Makefile, you've got no choice. You
already have a recursive make, parallel or not.
BTW your example won't build those two targets in parallel, even if parallel
compilation is possible. I'd consider the way you've done this to be bad
practice. Instead I'd have
all: all-subdir all-local
.PHONY all-subdir all-local
all-subdir:
$(MAKE) <whatever>
all-local:
$(MAKE) <whatever2>
If I wanted to make it clear that these had to be serialized, I'd just add
all-local: all-subdir
I find that prettier than the .WAIT syntax. Beauty is in the eye of the
beholder in this case, but what I like about the above method is that it
does what you are talking about right now.
I find this ugly
(I'm sure you know the famous paper "Recurvise Make considered harmful),
it
introduces unnecessary calls to make and exposes dependencies several
times.
Recursion in Makefiles is horrible but you usually have no choice if you're
calling a third party Makefile.
Writing
all: all-subdir .WAIT all-local
is just as easy, and it's more obvious to understand why it is written
this
way.
Call me obtuse, but I still dislike this syntax.
_______________________________________________
Help-make mailing list
Help-make@gnu.org
http://lists.gnu.org/mailman/listinfo/help-make