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: Sam Steingold
Subject: Re: how to create a single rule to build a directory as necessary
Date: Tue, 22 Sep 2009 11:44:21 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

Hi,
I, too, am struggling with rebuilding a directory.
it appears that the rule:

gllib: config.status
        mkdir -p gllib; cd gllib; make

is wrong because the script "mkdir ..." is always executed, regardless of whether config.status has changed or not.
So, what is the right way to handle this?
thanks
Sam

Kristof Provost wrote:
Making directories with GNU make has a couple of gotchas.
See http://www.cmcrossroads.com/content/view/6936/120/ for the full
explanation.

this link is dead.

I think the main issue here is that the timestamp on a directory is
updated whenever files are added/removed from it. That would lead to
make performing unnecessary rebuilds.

what I observe is even worse: the second make in "make; make" always does do something!

The entire 'Ask Mr. Make' series is worth reading if you're dealing with
advanced make.
See http://www.cmcrossroads.com/content/category/8/147/268/.

this link is dead too.





reply via email to

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