Benoit Poulot-Cazajous wrote:
> You can also use something like this :
> 
> .PRECIOUS: %/.
> %/.:; mkdir -p $@
> 
> $(OBJDIR)/%.o: %.c | $(OBJDIR)/.
>         ...

Funny, I came to the same realization yesterday.  Also, I'm taking Paul's advice that 
the pattern rules don't really need to have this dependency since, in my layout, each 
library already knows what the targets, and therefore directories, will be and can
create static dependencies with something like:

      $(foreach d,$($(__FILE__).derived),$(eval $(d): | $(dir $(d)).))

> or something like this :
> 
> .PRECIOUS: %/.
> %/.:; mkdir -p $@
> 
> DIRSTOCREATE = some dirs to/create
> .SECONDARY .PHONY: mkalldirs
> mkalldirs: | $(DIRSTOCREATE:%=%/.)
> %.o: %.c mkalldirs

Since I'm aiming for a minimal, complete, non-recursive build, this solution won't do.

Thanks,
Noel
-- 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive 
confidentiality or privilege, and use is prohibited.


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

Reply via email to