[Rake-devel] 'rule' ignored (bump)
tphilipp at potion-studios.com
Wed Jun 24 09:45:54 EDT 2009
thanks for your answer. ATM I stick to generating the dependencies
dynamically, as you pointed out below. However, the rule _does_ compare
the timestamps when removing the dependency on other.x (first two lines of
I think this is the crucial part of my problem, that the rule itself works
just fine, and its proc gets evaluated, except if there is another
additional dependency - then it only gets executed when the file is
nonexistant. Not even the rule's proc gets executed anymore.
The real world problem I have is, that the additional dependency is a
C/C++ precompiled header file, so I run into that problem quite a few
times. Every translation unit in such a project depends on the PCH, and
needs an inference rule.
> On Jun 19, 2009, at 6:08 AM, Tassilo Philipp wrote:
>> Let's assume we have a bla.o.c file (just create one for this test,
>> content is unimportant), then, when invoking rake, the advanced
>> rule's proc gets evaluated, and the rule's body called, and we end
>> up with a bla.o file.
>> When invoking rake a second time, not even the rule's proc gets
>> evaluated anymore. However, from what I wanted to do, it should be
>> evaluated - e.g. in order to update bla.o when the timestamp of
>> bla.o.c has changed.
>> In the example above, bla.o only gets created when it doesn't exist
> That is certainly the current behavior of rake. The rules only get
> consulted when the file does not currently exist.
> However, you raise an interesting point. Should the rules be
> consulted for time dependencies as well?.
> I'm not sure.
> One one hand, make checks the rules when just updating a file. Since
> the rake rules were patterned on make's, this argues that rake should
> do the same.
> On the other hand, dynamically generating dependencies is much easier
> in rake, so perhaps the need for rules to handle this scenario is not
> as great.
> I'm open to discussion (and/or patches) on the topic.
> -- Jim Weirich
> -- jim.weirich at gmail.com
> Rake-devel mailing list
> Rake-devel at rubyforge.org
More information about the Rake-devel