ruby-changes:36823
From: nobu <ko1@a...>
Date: Sat, 20 Dec 2014 12:53:10 +0900 (JST)
Subject: [ruby-changes:36823] nobu:r48904 (trunk): fiddle: configure in mflags
nobu 2014-12-20 12:53:05 +0900 (Sat, 20 Dec 2014) New Revision: 48904 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48904 Log: 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. Modified files: trunk/ext/fiddle/depend trunk/ext/fiddle/extconf.rb Index: ext/fiddle/depend =================================================================== --- ext/fiddle/depend (revision 48903) +++ ext/fiddle/depend (revision 48904) @@ -24,3 +24,5 @@ configure-libffi $(FFI_H): https://github.com/ruby/ruby/blob/trunk/ext/fiddle/depend#L24 lib: $(LIBFFI_A) $(LIBFFI_A): $(Q) $(SUBMAKE_LIBFFI) + +configure: configure-libffi Index: ext/fiddle/extconf.rb =================================================================== --- ext/fiddle/extconf.rb (revision 48903) +++ ext/fiddle/extconf.rb (revision 48904) @@ -80,9 +80,11 @@ create_makefile 'fiddle' do |conf| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L80 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| https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L92 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: -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/