help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exception to Paul's Second Rule?


From: Noel Yap
Subject: Re: exception to Paul's Second Rule?
Date: Fri, 24 Oct 2003 09:17:22 -0400

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]