help-make
[Top][All Lists]
Advanced

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

Re: How to modify algorithm that determines weather a target needs rebui


From: mirage1987
Subject: Re: How to modify algorithm that determines weather a target needs rebuild
Date: Mon, 9 Aug 2010 22:06:04 -0700 (PDT)

Hi,

My apologies if i ended up making it an X-Y problem.
Let me elaborate on my exact requirements this time around:

I have my codebase residing on clearcase. Since i am using a dynamic view
the MVFS provides me with files based on the timestamp at which they were
last checked in.
Unless i check them out into my local repository the files will point to the
older time.
Since the build tool works on timestamps to decide weather to build a target
or not
this could lead to problems. Doing an update of my workspace could silently
bring in files
with changes older than my last build and hence the build tool would fail to
recognize that
the source files have changed. Since clearcase also allows for moving back
and forth in time 
using freezeview the problem becomes even more scary.
The two obvious solutions to this would be to
- either use clearcase make [has drawbacks.. doesn't involve all gnu make
features]
- use snapshot views with copy out [too slow for big codebases]

As such i wanted to find a different solution to the problem by approaching
it from the angle of
"make". Since i cannot modify the time of the source files [in clearcase] i
wanted to change
the timestamp of the target itself so that make could know what to build.
This will insure that any change in the file (timestamp) would invoke a
build on the target.

But now i find [reading the discussions above] that the solution has some
drawbacks.
- First timestamps can't be very reliable while matching for equality[ i aim
to have the equality with +- delta]
- Another is "How to i handle multiple dependencies with equality"
   That is one question that perhaps presents a roadblock to the equality
approach.. I can't think of any solution to overcome that.

But i am thinking of an alternate approach:
- With each <target-dependencies> rule i'll do the following 
See if timestamp of any of the dependencies has changed. If yes build.
I can do this by either storing the older timestamps <may be their sum/
checksum of timestamps> in an external file [as pointed by TODD] and
comparing them with the present
And check for equality ( may be +- delta if i go for the sum)

I can't figure out the way to solve the 'X' part of the problem [may be you
guys can suggest better]
so i resorted to solving the 'Y' part.
Please let me know in case what i talked above is feasible without much
affecting the performance or complexity of the "make" process. Or any
alternate solution could help.

Thanks again for your replies.
 



-- 
View this message in context: 
http://old.nabble.com/How-to-modify-algorithm-that-determines-weather-a-target-needs-rebuild-tp29378571p29394292.html
Sent from the Gnu - Make - Help mailing list archive at Nabble.com.




reply via email to

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