Stefan Lang wrote:

> Rant allows you to give a block to create the prerequisite name(s)
> on the fly. The following works with Rant:
> 
> ############## Rantfile ############################################
> desc "Make ERB templates from Kwartz html and plogic files"
> SRC = FileList['app/views/**/*.html']
> OBJ = SRC.sub_ext('rhtml')
> task :templates => OBJ
> 
> rhtml_sources = lambda { |target|
>     [target.sub_ext("html"), target.sub_ext("plogic")]
> }
> gen Rule, '.rhtml' => rhtml_sources do |t|
>     sys "kwartz -Rails -e -p #{t.prerequisites[1]} --extract=content
> #{t.prerequisites[0]} > #{t.name}"
> end
> ####################################################################
> 
> To convert the Rakefile to an Rantfile I've:
> * replaced calls to `ext' with calls to `sub_ext'
> * replaced `rule' with `gen Rule, '

Thanks Stefan!

So there is no solution using Rake? Would have been nice since Rails comes
preinstalled with Rake. That means all devs will have to install Rant, too.
Okay, if there is no other way..


Greetings,
Martin