[Rubygems-developers] pure-ruby vs. compile-on-intsall

Trans transfire at gmail.com
Wed Nov 7 12:35:35 EST 2007


On Nov 7, 2007 9:08 AM, Trans <transfire at gmail.com> wrote:

>   if ENV['NORUBYEXT'] == 'true'
>     # Rubygems is sending all output to dev/null :(
>     STDOUT << "NORUBYEXT option is set to true. Native extension will
> be omitted."
>     File.open('Makefile', 'w') do |f|
>       f << "all:\n"
>       f << "install:\n"
>     end
>   else
>     if (/mswin/ =~ RUBY_PLATFORM) and ENV['make'].nil?
>       $LIBS += " msvcprt.lib"
>       create_makefile(extension_name, "tmail/#{arch}")
>     else
>       $CFLAGS += " -D_FILE_OFFSET_BITS=64"  #???
>       create_makefile(extension_name, "tmail/#{arch}")
>     end
>   end

The top of this condition didn't quite work for windows. I had to fake
windows out by adding:

  File.open('nmake.bat', 'w'){ |f| f << 'echo' }

T.


More information about the Rubygems-developers mailing list