summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-05-20 15:05:08 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-05-20 15:05:08 -0700
commit33a894338130cc437fccee3d5be5806a06d6f2cc (patch)
tree0d9ada417c4b0a1f1646e87b7345d27770d89771
parentbecc5385d0685e897a28d94bd0985b21a6f14100 (diff)
downloadlibyajl2-gem-33a894338130cc437fccee3d5be5806a06d6f2cc.tar.gz
rename to yajl.dll before build runs
-rw-r--r--ext/libyajl2/extconf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/libyajl2/extconf.rb b/ext/libyajl2/extconf.rb
index e97511b..bbc2f71 100644
--- a/ext/libyajl2/extconf.rb
+++ b/ext/libyajl2/extconf.rb
@@ -62,6 +62,11 @@ module Libyajl2Build
system("make V=1")
# ...so we can hack up what install does later and copy over the include files
+ # not sure why ruby windows produces .so's instead of .dll's
+ if windows?
+ FileUtils.mv "libyajl.so", "yajl.dll"
+ end
+
File.open("Makefile", "w+") do |f|
f.write <<EOF
TARGET = libyajl
@@ -73,7 +78,7 @@ EOF
f.write <<EOF
install:
\tmkdir -p #{prefix}/lib
-\tcp $(DLLIB) #{prefix}/lib/yajl.dll
+\tcp yajl.dll #{prefix}/lib/yajl.dll
\tcp yajl.dll.a #{prefix}/lib/yajl.dll.a
\tmkdir -p #{prefix}/include/yajl
\tcp yajl/*.h #{prefix}/include/yajl