On Wed, 2011-04-13 at 16:30 +0300, Oleksandr Gavenko wrote:
> parallel-build:
> make -C $(dir1) & make -C $(dir2) &
Note: _never_ use the literal string "make" in a recipe. Always use
$(MAKE).
> Above example have disadvantage as main Make do not wait for spawned
> child processes.
You should instead write it as something like:
build: $(dir1) $(dir2)
$(dir1) $(dir2):
$(MAKE) -C $@
.PHONY: build $(dir1) $(dir2)
--
-------------------------------------------------------------------------------
Paul D. Smith <[email protected]> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.net
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make