From: Leslie Viljoen Date: 2007-06-19T03:07:00+09:00 Subject: Re: can not Rake :), please help. ------=_Part_47944_3700620.1182190021907 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/17/07, ozizus wrote: > > 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. > > > -- I always thought Smalltalk would beat Java, I just didn't know it would be called 'Ruby' when it did. -- Kent Beck ------=_Part_47944_3700620.1182190021907--