DaZoner <bugmenot / world.com> [2005-03-30 04:19]:
> I've read the rake docs online and I've got a very simple rakefile to work. 
> Now I'd like to make it more complex and I can't figure out how to do it. 
> Can anyone let me know if what I want to do is possible and how to do it?
> 
> Why doesn't the following rakefile print "Making ..."?
>
> task :default => [:build]
> 
> task :build do
>   print "In build\n"
>   file "newzip.zip"  do |t|
>     print "Making ",t.name,"\n"
>   end
> end

Because rake doesn't see the need to invoke the "newzip.zip" task.
Your build task does *not* depend on the "newzip.zip" task! :)

The following line would add that dependency:
task :build => ["newzip.zip"]

> Also I'd like to give the filetask prereq's saying only do this step if the 
> file is out of date with *.rb and data/*.dat. Can I do this? Does it look 
> like this?
> 
> file "zipfile.zip" => ["*.rb","data/*.dat"] do |t|
> end

Yep. This looks like Rake's PackageTask would also help :]

-- 
Regards,
Tilman