Sha256: 4366268fcba2170452506c07aafa7b5a57d72ddb0fff8c87b5483b43dffdb2ac

Contents?: true

Size: 830 Bytes

Versions: 10

Compression:

Stored size: 830 Bytes

Contents

# We can't use Ruby's standard build procedures
# on Windows because the Ruby executable is
# built with VC++ while here we want to build
# with MingW.  So just roll our own...

require 'fileutils'
require 'rbconfig'

EXTENSION_NAME = "libxml_ruby.#{Config::CONFIG["DLEXT"]}"

# MingW insists the import library is .dll.a
EXTENSION_LIB_NAME = "libxml_ruby.dll.a"

# This is called when the Windows GEM is installed!
task :install do
  # Gems will pass these two environment variables:
  # RUBYARCHDIR=#{dest_path}
  # RUBYLIBDIR=#{dest_path}
  
  dest_path = ENV['RUBYLIBDIR']
  
  # Copy the extension
  cp(EXTENSION_NAME, dest_path)
  
  # Copy the import library (used by libxslt)
  cp(EXTENSION_LIB_NAME, dest_path)

  # Copy dllss
  Dir.glob('*.dll').each do |dll|
    cp(dll, dest_path)
  end
end

task :default => :install

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
libxml-ruby-0.9.1-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.2 ext/mingw/Rakefile
libxml-ruby-0.9.2-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.3-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.0-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.0 ext/mingw/Rakefile
libxml-ruby-0.9.1 ext/mingw/Rakefile
libxml-ruby-0.9.4 ext/mingw/Rakefile
libxml-ruby-0.9.4-x86-mswin32-60 ext/mingw/Rakefile
libxml-ruby-0.9.3 ext/mingw/Rakefile