%% [EMAIL PROTECTED] (John Alvord) writes:

  ja> I've been working to rework some makefiles to they work correctly
  ja> under parallel execution conditions.

  ja> all: a b c

  ja> a:

  ja> b:

  ja> c:

  ja> Lets say "a" is a rule which creates some directories which are used
  ja> by "b" and "c". How can I make sure that "b" and "c" are postponed
  ja> until "a" completes?

You must list b and c as prerequisites of a.

Alternatively you'll have to use some kind of recursive make
invocation.

There is no way to specify an ordering apart from dependencies in GNU
make (or most (all?) other makes); this is another oft-requested
feature.  Well, if not oft-requested than at least one I've often wished
for :).

For directory creation in particular I generally strongly discourage
people from doing it with rules.  Use a $(shell ...) function instead,
like this:

  __dummy := $(shell mkdir b c)

This is a kind of "BEGIN" preop declaration: it will be expanded and
executed as the makefile is being read in, before any rules are invoked.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to