what is wrong with this Rakefile?

Discussion in 'Ruby' started by ozizus, Nov 1, 2006.

  1. ozizus

    ozizus Guest

    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
     
    ozizus, Nov 1, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Menard
    Replies:
    6
    Views:
    187
    Jim Menard
    Jun 14, 2004
  2. T. Onoma

    Don't know how to rake Rakefile

    T. Onoma, Aug 23, 2004, in forum: Ruby
    Replies:
    8
    Views:
    180
    James Britt
    Aug 23, 2004
  3. mikshir
    Replies:
    0
    Views:
    138
    mikshir
    Sep 8, 2006
  4. John Gabriele
    Replies:
    1
    Views:
    180
    Suraj Kurapati
    Dec 5, 2006
  5. Bira
    Replies:
    1
    Views:
    124
    Richard Conroy
    Oct 13, 2006
Loading...

Share This Page