From: Jim Weirich Date: 2006-03-26T07:40:45+09:00 Subject: Re: Using Rake to compile FreeBASIC code Luis Lavena wrote: > Jim: > > After toyed with the rakefile with simple files, moved it to my project. > > my folder structure is something like this: > > my_project > code/ > shared/ > test/ > Rakefile > > Inside code is where my main code resides, and shared is a > junction/symlink to where I store code for md5, blowfish, hash, list, > etc. > > In test, I create a few test to "verify" each one of the units/modules > of my project. > > Well, with the rakefile/rules you created in previous mail, making main > a module located inside another folder fails, with this error: > > rake aborted! > Don't know how to build task 'mains/test/test_bf.o' Ok, the rule needs to bridge the gap between test/test_bf.bas and mains/test/test_bf.o. The regular expression part of the rule (the r{^mains/.*\.o$}) is fine, it should match "mains/test/test_bf.o". The list of procs are probably what's wrong. [ proc { |fn| File.basename(fn).ext('bas') }, proc { 'mains' } ] will produce the list: [ 'test_bf.bas', 'mains' ] which is wrong. What you want is: [ 'test/test_bf.bas', 'mains/test' ] So, just write two procs to produce that and put that in the rule. Also, you will probably need to add a line that will describe how to make the 'mains/test' directory (Just saying "directory 'mains/test'" is adequate). -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.