summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-27 03:45:11 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-27 03:45:11 (GMT)
commit50a585ed2573d718be7d25c1db3a470e58ca5bf0 (patch)
treee324cc9fc62e2fde425e2c6ef969483350cf2c91 /ext/fiddle
parentc92f22588edae7b592cf567112ced5a1f0a92293 (diff)
fiddle: unexpand LIBFFI_DIR
* ext/fiddle/extconf.rb: use LIBFFI_DIR instead of expanding it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/fiddle')
-rw-r--r--ext/fiddle/extconf.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index f13e414..c006439 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -140,7 +140,8 @@ types.each do |type, signed|
end
if libffi
- $LOCAL_LIBS.prepend("./#{libffi.a} ").strip!
+ $LOCAL_LIBS.prepend("./$(LIBFFI_A) ").strip!
+ $INCFLAGS.gsub!(/-I#{libffi.dir}/, '-I$(LIBFFI_DIR)')
end
create_makefile 'fiddle' do |conf|
if !libffi
@@ -161,9 +162,9 @@ create_makefile 'fiddle' do |conf|
PWD =
LIBFFI_CONFIGURE = #{cmd}
LIBFFI_ARCH = #{libffi.arch}
- LIBFFI_SRCDIR = #{libffi.srcdir}
+ LIBFFI_SRCDIR = #{libffi.srcdir.sub(libffi.dir, '$(LIBFFI_DIR)')}
LIBFFI_DIR = #{libffi.dir}
- LIBFFI_A = #{libffi.a}
+ LIBFFI_A = #{libffi.a.sub(libffi.dir, '$(LIBFFI_DIR)')}
LIBFFI_CFLAGS = #{libffi.cflags}
LIBFFI_LDFLAGS = #{libffi.ldflags}
FFI_H = $(LIBFFI_DIR)/include/ffi.h