help-make
[Top][All Lists]
Advanced

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

Re: how to create a single rule to build a directory as necessary


From: Paul Smith
Subject: Re: how to create a single rule to build a directory as necessary
Date: Tue, 22 Sep 2009 14:16:17 -0400

On Tue, 2009-09-22 at 10:24 -0600, John Calcote wrote:
> On 9/22/2009 10:18 AM, Paul Smith wrote:
> > So, in your case, running the command "mkdir -p gllib; cd gllib;
> > make" (which by the way, is not well-formed; it should be:
> >
> >     mkdir -p $@ &&  cd $@ &&  $(MAKE)
> >    
> 
> I'm kinda curious to know what $(MAKE) is expected to do in this case. 
> You just created the directory, so it's empty. cd'ing into it and 
> running make won't really amount to much, will it?

Heh.  Good point.  The first time, at least, this must rely on builtin
rules.  However, make even without a makefile is smart enough to do
things like check out a makefile from RCS or similar, then operate on
that.

Also, you can set the environment variable MAKEFILES to makefiles that
contain other rules.

But, most likely this is not what really appears in the makefile.





reply via email to

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