12: def self.build(extension, directory, dest_path, results)
13: if File.basename(extension) =~ /mkrf_conf/i then
14: cmd = "#{Gem.ruby} #{File.basename extension}"
15: cmd << " #{Gem::Command.build_args.join " "}" unless Gem::Command.build_args.empty?
16: run cmd, results
17: end
18:
19:
20: dest_path = '"' + dest_path + '"' if dest_path.include?(' ')
21:
22: cmd = ENV['rake'] || "#{Gem.ruby} -rubygems #{Gem.bin_path('rake')}" rescue Gem.default_exec_format % 'rake'
23: cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}"
24:
25: run cmd, results
26:
27: results
28: end