Skip to content
This repository
Newer
Older
100644 56 lines (44 sloc) 1.336 kb
ad5a548c »
2010-10-06 [1.9] Added a few #encoding file hints. Add 1px.gif as a schema fixtu…
1 # encoding: UTF-8
74f01216 »
2010-09-19 Initial checking.
2 require 'rake'
7120f620 »
2010-10-17 Final push for release.
3 require "rake/clean"
4 require 'rbconfig'
8e03fcbe »
2010-09-20 Get the Rakefile working and building extension by finding freetds in…
5 require 'rake/testtask'
74f01216 »
2010-09-19 Initial checking.
6 require 'rake/extensiontask'
3c973508 »
2011-04-06 Use RubyGems' PackageTask to build the gem
7 require "rubygems/package_task"
74f01216 »
2010-09-19 Initial checking.
8
39d268d7 »
2011-05-28 Note MiniPortile.
9 # My notes for cross compile native Windows gem.
10 # gcla ; bundle install ; rake compile ; rake cross compile ; rake cross native gem
11
74f01216 »
2010-09-19 Initial checking.
12 def test_libs
13 ['lib','test']
14 end
15
16 def test_files
3839fc8b »
2010-09-21 Woot! Passing a few basic tests that prove the structure and build ar…
17 Dir.glob("test/**/*_test.rb").sort
74f01216 »
2010-09-19 Initial checking.
18 end
19
7120f620 »
2010-10-17 Final push for release.
20 def gemspec
21 @clean_gemspec ||= eval(File.read(File.expand_path('../tiny_tds.gemspec', __FILE__)))
22 end
23
8e03fcbe »
2010-09-20 Get the Rakefile working and building extension by finding freetds in…
24 Rake::TestTask.new do |t|
74f01216 »
2010-09-19 Initial checking.
25 t.libs = test_libs
26 t.test_files = test_files
27 t.verbose = true
28 end
29
3c973508 »
2011-04-06 Use RubyGems' PackageTask to build the gem
30 Gem::PackageTask.new(gemspec) do |pkg|
31 pkg.need_tar = false
32 pkg.need_zip = false
49acc0be »
2010-10-17 More prep for gem release.
33 end
34
e3357052 »
2011-03-06 Allow TINYTDS_SKIP_PORTS environment var to skip ports.
35 task :compile => ["ports:freetds"] unless ENV['TINYTDS_SKIP_PORTS']
8f24f7fe »
2011-03-06 Force freetds port dependency on compile
36
49acc0be »
2010-10-17 More prep for gem release.
37 Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|
38 ext.lib_dir = 'lib/tiny_tds'
4652e0e5 »
2011-03-24 Iconv is a dep only when compiling locally. However, left in the abil…
39 ext.config_options << "--enable-iconv" unless ENV['TINYTDS_SKIP_PORTS']
ef163c53 »
2011-04-06 Make TinyTDS cross compile, enjoy
40 if RUBY_PLATFORM =~ /mswin|mingw/ then
a6137ee2 »
2011-04-06 Remove my old RVM stuff.
41 # Define target for extension (supporting fat binaries).
ef163c53 »
2011-04-06 Make TinyTDS cross compile, enjoy
42 RUBY_VERSION =~ /(\d+\.\d+)/
43 ext.lib_dir = "lib/tiny_tds/#{$1}"
44 else
45 ext.cross_compile = true
46 ext.cross_platform = ['i386-mingw32']
47 ext.cross_config_options << "--disable-lookup"
48 end
74f01216 »
2010-09-19 Initial checking.
49 end
50
51 task :build => [:clean, :compile]
52
3839fc8b »
2010-09-21 Woot! Passing a few basic tests that prove the structure and build ar…
53 task :default => [:build, :test]
74f01216 »
2010-09-19 Initial checking.
54
b9d6e065 »
2011-04-11 Defer loading ports tasks until extension is
55 Dir["tasks/*.rake"].sort.each { |f| load f }
Something went wrong with that request. Please try again.