Hi all, i have a Rakefile with a rule like this :
rule '.so' => '.cc' do |t|
puts "@ Compiling #{t.source}"
output = t.source.ext("so")
output['stdlib'] = 'build'
sh "mkdir -p #{File.dirname(output)}"
sh "#{CXX} #{t.source} -o#{output} #{STDLIB_CFLAGS} #{STDLIB_LFLAGS}"
end
As you can see, it generates many .so libraries from the 'stdlib' directory (which contains the sources) to the 'build' directory where the binaries are stored.
Now the problem is, due to this "directory exchange", rake seems to not recognize the .so files as files it has generated, causing the recompilation of each .so module each time o run the rake command, even if nothing is changed.
Is there any way to solve this?
Thanks