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, 17 Oct 2003 06:11:08 -0400

"Paul D. Smith" wrote:
> I just do something like:
> 
>     MAKEDIRLIST += foo bar
>       ...
>     MAKEDIRLIST += biz
>       ...
>     MAKEDIRLIST += boz
> 
>         ...
> 
>     $(shell for d in $(MAKEDIRLIST); do ...etc)
> 
> Just put the $(shell ...) at the end and do them all at once.  You don't
> have to do them in order: remember all makefiles are read first before
> any rules are run.

I think at one point, I saw another reason why this wouldn't work, but maybe 
that reason doesn't exist anymore.  I'll have to think about this a bit more.

I also thought that:

ifneq ($(filter $(wildcard $(MAKEDIRLIST),$(MAKEDIRLIST))),)
  $(shell mkdir -p $(MAKEDIRLIST))
endif

would avoid $(shell)'ing if the directories are already there.

Thanks,
Noel




reply via email to

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