Closed frahugo closed 11 years ago
Oh by the way, I tried with extconf.rb for both libraries and it builds them both.
Take ffi-compiler out of the equation - e.g. just have the Rakefile for each of those projects create a file, and see if that works.
Well, I can confirm that it has nothing to do with ffi-compiler. This is the content of my two Rake files:
desc "do something"
task :default do
`echo "ET phone home" > anyonethere.txt`
end
And only the first one runs and creates a TXT file.
Question: is there any advantage in using a Rakefile instead of a standard extconf.rb with mkmf?
The advantages of using a Rakefile vs extconf.rb are minor: extconf.rb must generate a Makefile - that means you have to deal with the vagaries of a multitude of make implementations - with a Rakefile, you only need to deal with Rake.
Anyway, it looks like the problem you've hit is with rubygems - you can report it to them, but in the mean time, you will have to work around it by having an intermediate Rakefile that then calls rake on each of your other Rakefiles.
I need to build to separate libraries. In the gemspec, I can provide an array of extensions, as per the documentation:
Lib1 gets compiled, but nothing is ran for lib2. If I swap them, lib2 gets compiled but not lib1.
Would that be a bug in rubygems? Or does the rake task has to return or do something special?