summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 03:53:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-20 03:53:05 +0000
commit96fc3108b597dacbc83f40fc03f8f732d630cf25 (patch)
tree187fd8f83845d0a8419e03be0196496887df4894 /ext/fiddle
parent5856a951914785b4b48f81340621d0cdb2271118 (diff)
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
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/depend2
-rw-r--r--ext/fiddle/extconf.rb16
2 files changed, 13 insertions, 5 deletions
diff --git a/ext/fiddle/depend b/ext/fiddle/depend
index 8fcb06e..fe24519 100644
--- a/ext/fiddle/depend
+++ b/ext/fiddle/depend
@@ -24,3 +24,5 @@ configure-libffi $(FFI_H):
lib: $(LIBFFI_A)
$(LIBFFI_A):
$(Q) $(SUBMAKE_LIBFFI)
+
+configure: configure-libffi
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index b3c58de..583630a 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -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: