mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fiddle: configure in mflags
* ext/fiddle/extconf.rb: configure is already in mflags, use system instead of xsystem which requires a string, and logging libffi configure output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5856a95191
commit
96fc3108b5
2 changed files with 13 additions and 5 deletions
|
@ -24,3 +24,5 @@ configure-libffi $(FFI_H):
|
|||
lib: $(LIBFFI_A)
|
||||
$(LIBFFI_A):
|
||||
$(Q) $(SUBMAKE_LIBFFI)
|
||||
|
||||
configure: configure-libffi
|
||||
|
|
|
@ -80,9 +80,11 @@ create_makefile 'fiddle' do |conf|
|
|||
else
|
||||
submake = "cd $(LIBFFI_DIR) && \\\n\t\t" << "#{config_string("exec")} $(MAKE)".strip
|
||||
end
|
||||
conf << <<-MK.gsub(/^ +/, '')
|
||||
sep = "/"
|
||||
seprpl = config_string('BUILD_FILE_SEPARATOR') {|s| sep = s; ":/=#{s}" if s != "/"} || ""
|
||||
conf << <<-MK.gsub(/^ +/, '')
|
||||
PWD =
|
||||
LIBFFI_CONFIGURE = $(LIBFFI_SRCDIR)/configure#{/'-C'/ =~ CONFIG['configure_args'] ? ' -C' : ''}
|
||||
LIBFFI_CONFIGURE = $(LIBFFI_SRCDIR#{seprpl})#{sep}configure#{/'-C'/ =~ CONFIG['configure_args'] ? ' -C' : ''}
|
||||
LIBFFI_ARCH = #{RbConfig::CONFIG['arch'].sub(/\Ax64-(?=mingw|mswin)/, 'x86_64-')}
|
||||
LIBFFI_SRCDIR = #{libffi_srcdir}
|
||||
LIBFFI_DIR = #{bundled}
|
||||
|
@ -90,12 +92,16 @@ create_makefile 'fiddle' do |conf|
|
|||
LIBFFI_CFLAGS = #{libffi_cflags}
|
||||
FFI_H = #{bundled && '$(LIBFFI_DIR)/include/ffi.h'}
|
||||
SUBMAKE_LIBFFI = #{submake}
|
||||
MK
|
||||
MK
|
||||
end
|
||||
|
||||
if bundled
|
||||
xsystem([$make, 'configure-libffi', *sysquote($mflags)]) or
|
||||
raise "failed to configure libffi. Please install libffi."
|
||||
args = [$make, *sysquote($mflags)]
|
||||
Logging::open do
|
||||
Logging.message("%p\n", args)
|
||||
system(*args) or
|
||||
raise "failed to configure libffi. Please install libffi."
|
||||
end
|
||||
end
|
||||
|
||||
# :startdoc:
|
||||
|
|
Loading…
Reference in a new issue