"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. _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
