mkrf 0.1.1 Released

Posted by kev Thu, 17 Aug 2006 20:23:00 GMT

Today I tagged mkrf’s 0.1.1 release. It fixes several of the shortcomings of it’s predecessor.

The most obvious change is that the Mkrf::Generator constructor now takes the name of the library without a file extension. The generator will now figure out what file extension makes sense on the build system.

The second change development-wise is that you can now inject your own code into the generated Rakefile as a string set in the additional_code attribute. Yes this smells. I’m not very happy with it at the moment either but it seemed the simplest clean way to allow for things like gem specs. If you have a better way to implement this, by all means, tell me about it and we’ll make it better together.

Another change that I’d been avoiding a while is adding proper logging. Initially it uglied up my code a bit, but after some refactoring I’m mostly satisfied. mkrf.log will now tell you all about it’s quest to find the libraries and headers on your system. The logger is set to the “info” severity level by default, but you can tweak it easily:

Mkrf::Generator.new('somelib') do |g|
  g.logger.level = Logger::WARN
end

On my (quickly growing) list of things to do is a proper writeup on using mkrf for you extensions. I expect that if you’re familiar with mkmf it shouldn’t be hard to wrap your brain around it.

Posted in ,  | no comments

Comments

Comments are disabled