help-make
[Top][All Lists]
Advanced

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

Re: Using make to create directories


From: Paul Smith
Subject: Re: Using make to create directories
Date: Fri, 2 Oct 2009 12:56:28 -0400

On Fri, 2009-10-02 at 16:56 +0100, Ian Lynagh wrote:
> On Fri, Oct 02, 2009 at 09:13:44AM -0400, Paul Smith wrote:
> > On Fri, 2009-10-02 at 14:00 +0100, Ian Lynagh wrote:
> > > 
> > > but I don't want to have to have an explicit rule for every directory;
> > 
> > Why don't you just use "mkdir -p"?
> > 
> >     default: a/b/c/
> > 
> >     a/b/c/ : ; mkdir -p $@
> 
> Actually, I can't get this to work either:
> 
> # ----------------
> q : foo/bar/
>       echo bye
> 
> %/ :
>       echo hi
> # ----------------
> 
> $ make           
> make: *** No rule to make target `foo/bar', needed by `q'.  Stop.

Make strips trailing slashes, to canonicalize names.  Use something like
this instead:

        default: a/b/c/.; echo bye

        %/. : ; echo hi






reply via email to

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