summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-05-20 13:13:49 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-05-20 13:13:49 -0700
commit0e90924cd7b2fa4c29b32d35727f93d48c381f41 (patch)
tree3447a0a913a0c873accfba028d08e8a5ecb95563
parent5b197151b973da84651b7edf5e02e0c2727f49af (diff)
downloadlibyajl2-gem-0e90924cd7b2fa4c29b32d35727f93d48c381f41.tar.gz
lets try cleaning EXTDLDFLAGS on windows
-rw-r--r--ext/libyajl2/extconf.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/libyajl2/extconf.rb b/ext/libyajl2/extconf.rb
index ab9bb66..e492b16 100644
--- a/ext/libyajl2/extconf.rb
+++ b/ext/libyajl2/extconf.rb
@@ -44,6 +44,12 @@ module Libyajl2Build
# ENV vars can override everything
$CFLAGS = ENV['CFLAGS'] if ENV['CFLAGS']
$LDFLAGS = ENV['LDFLAGS'] if ENV['LDFLAGS']
+
+ if windows?
+ # on windows this will try to spit out a *.def that exports Init_libyajl which is wrong, we aren't a ruby lib, so we
+ # will never export that.
+ RbConfig::MAKEFILE_CONFIG['EXTDLDFLAGS'] = ''
+ end
end
def self.makemakefiles
@@ -51,11 +57,6 @@ module Libyajl2Build
dir_config("libyajl")
create_makefile("libyajl")
- # ruby on windows helpfully drops a *.def file to export Init_libyajl which we don't need because this isn't really a ruby extension
- FileUtils.rm_f(Dir["*.def"])
- # and we need to surgically remove it from the LDFLAGS
- $LDFLAGS.gsub!(/\S+.def/, ' ')
-
# we cheat and build it right away...
system("make V=1")
# ...so we can hack up what install does later and copy over the include files