Hi, I dont get what is wrong with this rakefile:
#====================================
task :default => :TTList
checkfile = "arrangement0/list.txt"
task :TTList => checkfile do
regenarate
end
#===================================
So, regenarate function regenarates bunch of files, including the
checkfile. When I call rake, it should run :TTList task, but only if
checkfile is not there. This rakefile runs :TTList even if the
checkfile exists.
I think you probably want:
task :default => checkfile
checkfile = "arrangement0/list.txt"
file checkfile do
regenarate
end
AFAIK tasks are more like functions, dependent on other tasks, which must be
done first. 'file' creates a file task, which will run in order to create
that target (checkfile).
If you want checkfile to be dependant on other files:
file checkfile => [depfile1, depfile2] do
regenarate
end
For more info, go through the tutorial:
http://onestepback.org/articles/buildingwithrake/filetasks.html
PS: regenerate, not regenarate
Les
thx.
···
On 6/17/07, ozizus <oguz@ce.yildiz.edu.tr> wrote:
--
I always thought Smalltalk would beat Java, I just didn't know it would be
called 'Ruby' when it did.
-- Kent Beck