1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00

Don't require mkmf as it defines a lot of global methods that can and will conflict

This commit is contained in:
Rodrigo Kochenburger 2012-07-25 16:38:21 -03:00
parent 4e9639aa28
commit 1eded76295

View file

@ -1,13 +1,18 @@
require 'mkmf'
require 'rbconfig'
require 'libv8/arch'
module Libv8
module_function
def config
Config::MAKEFILE_CONFIG
end
def libv8_object(name)
filename = "#{libv8_source_path}/out/#{Libv8::Arch.libv8_arch}.release/libv8_#{name}.#{$LIBEXT}"
filename = "#{libv8_source_path}/out/#{Libv8::Arch.libv8_arch}.release/libv8_#{name}.#{config['LIBEXT']}"
unless File.exists? filename
filename = "#{libv8_source_path}/out/#{Libv8::Arch.libv8_arch}.release/obj.target/tools/gyp/libv8_#{name}.#{$LIBEXT}"
filename = "#{libv8_source_path}/out/#{Libv8::Arch.libv8_arch}.release/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}"
end
return filename
end