Mkmf2.rb: a better replacement for mkmf.rb
What is mkmf.rb ?
mkmf.rb is a simple system for building and installing binary libraries for Ruby. It enables Ruby programmers to write libraries for Ruby in C while not bothering about compilation and installation details. It is provided as a standard part of Ruby.
Why does it need a replacement ?
mkmf.rb hasn't been actively developped for a long time and lacks several features:
- it does not enable the users to desinstall the libraries installed with it;
- it does not easily support specific schemes for installations, such as installation to home directories, or the specific requirements for distributions;
- it cannot build more than one binary library from one source directory;
- and, most important, it cannot handle the case when a ruby library written in C depends on some C internals of another Ruby library, which can be of great importance for speed issues.
I absolutely needed the last two features for a project of my own, and that's why I decided to write it anew, while keeping an eye on backward compatibility.
How can I use it ?
If you are developping a Ruby library, you might want to check the RDoc documentation (a tutorial should be written definitely, but I lack time for now). If you simply want to enjoy the new features of mkmf2 for an already existing library, check out the testing page.