[Top][All Lists]
[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: |
Thu, 16 Oct 2003 16:52:02 -0400 |
"Paul D. Smith" wrote:
> I don't see how this is that useful. I prefer the very straightforward:
>
> OBJDIR = ../../foo/bar
>
> $(shell [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR))
>
> The downside is directories are created which you might not need, but
> it's quite a bit simpler and more reliable.
I'm trying to modularize the makefile so the value of OBJDIR (which is way more
than just one directory) is split among several included makefiles. I think
shelling in each one isn't too elegant. Also, as hacked in the examples, make
already knows the
directory name of the thing it's building. Since the thing it's building is
dependent on the existence of the directory, wouldn't dependency rules be the
best way to represent that?
Of course, the hack itself wouldn't be necessary if something like $$(@D)
existed for pattern rules. Would it make sense to have a feature like this?
Thanks,
Noel
--
NOTICE: If received in error, please destroy and notify sender. Sender does
not waive confidentiality or privilege, and use is prohibited.
- exception to Paul's Second Rule?, Noel Yap, 2003/10/16
- Re: exception to Paul's Second Rule?, Noel Yap, 2003/10/16
- Re: exception to Paul's Second Rule?, Paul D. Smith, 2003/10/16
- Re: exception to Paul's Second Rule?, Noel Yap, 2003/10/16
- Re: exception to Paul's Second Rule?, Paul D. Smith, 2003/10/16
- Re: exception to Paul's Second Rule?, Noel Yap, 2003/10/17