what is wrong with this Rakefile?

O

ozizus

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 => [crbdir + '\\' + CRBFILES] do
sh "ruby crb.rb -i #{crbdir} -o #{lzzdir} -s #{CRBFILES} -t
#{LZZFILES}"
end
end

for i in 0..CPPFILES.length-1
file cppoutdir + '\\' + CPPFILES => [lzzdir + '\\' + LZZFILES]
do
sh "lzz -hd -sd -o #{cppoutdir} #{lzzdir}\\#{LZZFILES}"
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
 

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,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top