[Rake-devel] Building Ruby extensions with Rake

Steve Sloan steve at finagle.org
Sun May 7 19:29:52 EDT 2006


After banging my head against mkmf for a few days, I decided it was time to
get Rake to build my extensions.  I think I've gotten things working well
enough[0] to allow it to escape.

Attached are two tasks -- ExtensionTask for linking together Ruby extension
libraries, and SWIGExtensionTask for generating libraries from SWIG Interface
files -- plus rules for compiling C and C++ files.  It uses rbconfig to
determine the appropriate compiler/linker options.

First and foremost, I welcome feedback on my efforts.  I'm not sure if it's
completely Rakish (nor, for that matter, completely Rubyish) so wanted input
from any gurus.  Assuming it's at least satisfactory, I'd like to get these
into the Rake contribs directory (so I don't have to include it in my project).

Share and enjoy ...

[0] Using it as build system for RDBXML (http://rdbxml.rubyforge.org)

-- Steve
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: extensiontask.rb
Url: http://rubyforge.org/pipermail/rake-devel/attachments/20060507/adfa85c7/attachment.bat 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: swigextensiontask.rb
Url: http://rubyforge.org/pipermail/rake-devel/attachments/20060507/adfa85c7/attachment-0001.bat 


More information about the Rake-devel mailing list