# What is wrong with this Rakefile?

**URL:** <https://www.ruby-forum.com/t/what-is-wrong-with-this-rakefile/74661>\
**Category:** Ruby\
**Created:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/what-is-wrong-with-this-rakefile/74661 "2006-11-07T10:51:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozizus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/ac8455/32.png) [@ozizus](https://www.ruby-forum.com/u/ozizus)\
**Post date:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/what-is-wrong-with-this-rakefile/74661/1 "2006-11-07T10:51:57Z")

</div>

when I do “rake debug” rake gives this error:  
“rake aborted! Don’t know how to build task ‘crb\diriterate.crb.cpp’”  
I just cant see what I do wrong. I have \*.crb.cpp files in the crb  
folder and \*.cpp files in the lzz folder. All I want is to produce  
cpp&h files for lzz files, while producing lzz files from \*.crb.cpp  
files…

# the rakefile.rb is:

# directories

crbdir = “crb”  
lzzdir = “lzz”  
cppoutdir = “cpp\_produced”  
cpporigdir = “cpp\_orig”

olddir = Dir.pwd  
Dir.chdir crbdir

LZZFILES = []  
CPPFILES = []  
CRBFILES = Dir[’\*.crb.cpp’]  
CRBFILES.each do |fn|  
parts = fn.split(’.’)  
parts.delete\_at(-2)  
LZZFILES \<\< parts.join(’.’)  
CPPFILES \<\< parts.join(’.’)  
end

Dir.chdir olddir

for i in 0…LZZFILES.length-1  
file lzzdir + ‘\’ + LZZFILES[i] =\> [crbdir + ‘\’ + CRBFILES[i]] do  
sh “ruby crb.rb -i #{crbdir} -o #{lzzdir} -s #{CRBFILES[i]} -t  
#{LZZFILES[i]}”  
end  
end

for i in 0…CPPFILES.length-1  
file cppoutdir + ‘\’ + CPPFILES[i] =\> [lzzdir + ‘\’ + LZZFILES[i]]  
do  
sh “lzz -hd -sd -o #{cppoutdir} #{lzzdir}\#{LZZFILES[i]}”  
end  
end

task :debug do  
sh ‘vcbuild main.sln “Debug|Win32”’  
end

task :release do  
sh ‘vcbuild main.sln “Debug|Win32”’  
end

# dependencies

task :rundebug =\> :debug  
task :debug =\> CPPFILES.collect{|fn| cppoutdir + ‘\’ + fn}

============

thanks in advance
