[libxml-devel] MEM2 to trunk

Charlie Savage cfis at savagexi.com
Wed Nov 14 22:46:12 EST 2007


> Hi Charlie, I'd prefer to take care of this simply b/c I'm going to do
> some work on the build process as a whole. But I may need some help
> along the way and certianly will need help testing it one Windows. So
> if I can call on you then, that would be great.

Sure.  Let me tell you how I did it for ruby-prof in case it helps.

First, I've attached the Rakefile I created for ruby-prof which setups 
gems for *nix and Windows.  In particular, look at line 82 and on.  It 
took me a while to puzzle through it - with a lot of inspiration from 
how RCov does it.

Second, I created a separate directory for a MingW build which contains 
a hand-crafted Makefile.  You have to do this because the standard mkmf 
built-in to Ruby assume you are linking against the same libraries Ruby 
itself was built with.  That assumption fails because Ruby on Windows is 
built with VC++.  And the reason to not use VC++ is because you then 
introduce dependencies on the right version of the C Runtime (MingW uses 
a version which is on just about every windows computer).  Thus I 
separately run the make file to build the executable - the rakefile just 
copies it over for packaging.

Third, for debugging purposes, I have a separate directory for a VC++ 
project file.  That isn't so important for building gems...but it sure 
makes it a lot easier to debug stuff on Windows.

Maybe this is easier now with mkrf, but I haven't tried it so I'm not 
sure. If only Ruby had something like Python's distutils that handles 
all these various compiler/os combinations...

Charlie





How do you want to split it?Sure
> 
> T.
> _______________________________________________
> libxml-devel mailing list
> libxml-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/libxml-devel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Rakefile
Url: http://rubyforge.org/pipermail/libxml-devel/attachments/20071114/af4d8d9c/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://rubyforge.org/pipermail/libxml-devel/attachments/20071114/af4d8d9c/attachment.bin 


More information about the libxml-devel mailing list