Hello mailing list,

I'm working with rake 0.8.1, and I have a problem with advanced rules as they 
are outlined in the documentation. In my case, I try to calculate the name of a 
.c file's path from an .o file path:

rule '.o' => [ proc { |p| getCSourcePath(p) } ] do |t|
    (do some stuff...)
end

If there is no .o file at all, this works like a charm. The proc will be called 
calculating the source file's path, etc.. However, if the .o file exists, the 
rule won't be executed anymore, even with the source file having a more recent 
timestamp than the object file.

Another thing I noticed is that running rake -P doesn't list the source file as 
a prerequisite of the object file at all.

So, to put it in a nutshell, rake only seems to run the proc used to calculate 
the source file's path if the rule itself will be executed anyway (which seems 
kind of wrong to me, since it should always check the prerequisites).
So, my question is: Do I overlook something obvious, or is this behaviour 
intended ?

Thanks in advance, and thanks for writing rake in the first place, it's a great 
tool
Tassilo
_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel

Reply via email to