make-alpha
[Top][All Lists]
Advanced

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

Re: GSoC: OOD detection


From: Ramón García
Subject: Re: GSoC: OOD detection
Date: Mon, 16 Apr 2007 23:15:22 +0200

I am not sure if I get your method of using persistent variables. Each
target has a variable associated with it. If a file is found not out
of date, the persistent variable associated with it is empty. Is this
empty value stored? Then it is not posible to store a md5sum, which is
needed just in case, when the prerequisites change, to find out if
that compilation produced an actual change of the result or not.
Perhaps I am becomming too messy. Let us work with a concrete example.

a: a1 a2
   cat a1 a2 > a

a1: a11 a12
  cat a11 a12 | sort | uniq > a1

a2: a21 a22
  cat a21 a22 | sort | uniq > a2


(sort | uniq added in an attempt to give some minimal realism to this example).

Suppose we are using md5sum comparison. In some compilation "a1"
appears to be up to date. So the empty persistent value will be
returned by the .OUT_OF_DATE expression. If this value is stored
persistently, no md5sum will be recorded for "a1". If  "a1" actually
changes later, how can it be determined without the md5sum stored
anywhere?

I also do not understand the order of rules. Out of date determination
must be determined bottom to top, because "a" may be up to date now,
but after "a1" is rebuilt it may be no longer up to date. If "a1" is
updated, its persistent value is also updated. Suppose that this value
is the md5sum. When make goes to update target "a", how can it know
whether "a1" has been modified or not, if the persistent value with a
fresh md5sum has already been stored? The md5sum will match the file.
So the rule for "a" should not be exposed to the just obtained
persistent value, but to the previous one.

It looks like with the model that you are proposing the OUT_OF_DATE
for a target would not determine whether a rule is run, but whether
the rules for which the current target is a prerequisite would be run.
Am I right?

Could you explain how it would work with a simple Makefile?

Ramon




reply via email to

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