recursive Rake rules with multiple pre-requisites

T

ToRA

Hi,

I'm having a problem getting rake to work using rules that are
recursive and have multiple prerequisites...I've got my problem down to
a fairly simple example, at the bottom of the post.

If I run it, (assuming a lib directory exists) I get:
$rake
(in /tmp)
rake aborted!
Don't know how to build task 'blah'

(See full trace by running task with --trace)

but commenting out either of the two procs marked at #1 or #2, it can
build.

Any ideas / suggestions or is it a bug?

Cheers,

Tris

$rake --version
rake, version 0.7.1

$cat rakefile
require 'rake/clean'

CLEAN.include 'aa'
CLEAN.include 'bb'
CLEAN.include 'cc'
CLEAN.include 'lib/map.o'

task :default => "blah"

rule(/lib\/.*\.o$/ => [ proc { |x| 'aa' },
proc { |x| 'bb' }]) do |t|
sh %{touch #{t.name}}
end


rule(/blah/ => [ proc { |x| 'cc'}, #1
proc { |x| 'lib/map.o' } #2
]) do |t|
end

file 'cc' do
sh %{touch 'cc'}
end

file 'aa' do
sh %{touch 'aa'}
end

file 'bb' do
sh %{touch 'bb'}
end
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top