2016-02-01 12:43:26 +00:00
|
|
|
# frozen_string_literal: true
|
2007-11-10 07:48:56 +00:00
|
|
|
#--
|
|
|
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
|
|
# All rights reserved.
|
|
|
|
# See LICENSE.txt for permissions.
|
|
|
|
#++
|
|
|
|
|
|
|
|
class Gem::Ext::ConfigureBuilder < Gem::Ext::Builder
|
2020-12-08 16:33:39 +09:00
|
|
|
def self.build(extension, dest_path, results, args=[], lib_dir=nil, configure_dir=Dir.pwd)
|
|
|
|
unless File.exist?(File.join(configure_dir, 'Makefile'))
|
2021-01-04 10:09:05 +09:00
|
|
|
cmd = ["sh", "./configure", "--prefix=#{dest_path}", *args]
|
2007-11-10 07:48:56 +00:00
|
|
|
|
2020-12-08 16:33:39 +09:00
|
|
|
run cmd, results, class_name, configure_dir
|
2007-11-10 07:48:56 +00:00
|
|
|
end
|
|
|
|
|
2020-12-08 16:33:39 +09:00
|
|
|
make dest_path, results, configure_dir
|
2007-11-10 07:48:56 +00:00
|
|
|
|
|
|
|
results
|
|
|
|
end
|
|
|
|
end
|