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: Wed, 11 Aug 2010 01:25:19 -0700 (PDT)

Hi Paul,

I really want to find a way other than the clearmake solution.
Even if the features are filed for i don't think they would be available
readily with clearcase.

Since as you say the timestamps should not be much of a worry but multiple
dependencies
are what if we take some measure to incorporate the timestamps of all the
dependencies.

Some changes from my earlier algorithm 
See if target foo.o exists
        If Yes
          Is timestamp(foo.o)  == Avg( mtime(foo.c) , mtime(foo.h) )  +- DELTA 
          [rounded avg of the time stamp of all the dependencies. DELTA is
error range ]
              If NO [ One of the dependencies has changed ]
                   Build foo.o 
                   Set timestamp ( touch ) to the Avg(dependencies)
              If Yes
                 No need to build
       If No
          Set timestamp ( touch ) to the Avg(dependencies)

As you were suggesting that introducing such a change into gnu "make" would
require 
much effort.
Has there been any such efforts before. And what's the degree of effort
needed. Since i haven't worked 
on gnu "make" code i really can't predict weather to pursue on this or not.
As a developer of gnu "make" i would really appreciate if you can give me a
brief insight of the task before me if i were to take this up ...

I already have a solution outside clearcase where i keep track of files
being changed in the parent branch
from which we sync but it only handles moving forward in time . Personally i
really want to find
a solution other than clearmake

Thanks and regards.


Paul Smith-20 wrote:
> 
>> The two obvious solutions to this would be to
>> - either use clearcase make [has drawbacks.. doesn't involve all gnu make
>> features]
> 
> Nevertheless, this is the right answer.  If you need more GNU make
> features, file bugs with ClearCase development.
> 
> 
>> - First timestamps can't be very reliable while matching for equality[ i
>> aim
>> to have the equality with +- delta]
> 
> This isn't a problem with ClearCase because MVFS doesn't (or at least
> didn't last I used it) support sub-second timestamps, and you don't have
> to worry about different types of filesystems with different timestamp
> behaviors: they're all MVFS and work the same way.
> 
>> - 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.
> 
> Indeed.
> 
>> 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.
> 
> Solving the X part is going back to using clearmake.
> 
>> 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.
> 
> This is not a simple change, at all.  It will require very significant
> effort.  But there's no alternate solution because you cannot change the
> way ClearCase works.
> 
> As I said before that's why ClearCase, pretty much alone of all source
> code control tools, provides its own build utility.
> 
> Plus if you use clearmake you can get winkin, which is pretty neat
> actually.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-modify-algorithm-that-determines-weather-a-target-needs-rebuild-tp29378571p29406075.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]