make-alpha
[Top][All Lists]
Advanced

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

Re: Suggestion for a change in the out of date algorithm


From: Ramón García
Subject: Re: Suggestion for a change in the out of date algorithm
Date: Mon, 4 Jun 2007 19:28:07 +0200

Sure, the patch should be as isolated as posible. I think that with an
interface of comparison between target and each source would help,
because it could be placed in the same place where timestamps are
compared.

Hm.  I think the idea is useful, but the details suggested above seem
too specific to me.  In other words, I can imagine there might be a
number of different situations where you might want to be able to
evaluate a variable in the context of a file (a "different scope" as it
were) that don't have anything to do with out of date determination.

Perhaps I didn't express myself well. The intention was that the new
functions could be used for anything, not neccessary for out of date
evaluation. In fact, it was a feature of this proposed design to split
the functionality in small parts as general as posible so that they
could be used for anything else.

        $(<target>::<variable>)

I also prefer your syntax. It fits better existing usage.


The thing that concerns me about this method is that it seems to me like
you're evaluating the changed variable again every time a file is used
as a prerequisite.

Correct me if I am wrong. Wouldn't this issue be corrected by changing:

%: changed = ${changed-value md5 ${md5sum  address@hidden

into

%: changed := ${changed-value md5 ${md5sum  address@hidden

My intention was that changed-value was a special function evaluted
exactly once for each  <name> parameter, and the next times it would
remember the cached value. (Well, not just name, but name and current
target).

For example, maybe we can say that for any given file, it will have only
one value that determines its up-to-date-ness.  Then, instead of
evaluating that value again every time the file appears as a
prerequisite, make would automatically evaluate that value once, after
the file was treated as a target and its commands were successfully
invoked.

This is a slightly less general way of doing it. The only difference
is that I propose that one can define whatever function for that
determination, provided that it is invoked from .OUT_OF_DATE




reply via email to

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