Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (34 sloc) 1.312 kb
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, need ...
kevwil authored
1 RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
ae5e729 @kevwil ignore mac finder files, change constant to allow compile on windows
kevwil authored
2 WIN = (RUBY_PLATFORM =~ /mswin|cygwin/)
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, need ...
kevwil authored
3 SUDO = (WIN ? "" : "sudo")
34a5aac @kevwil a better sync with the main repo, change to unified Rakefile
kevwil authored
4
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, need ...
kevwil authored
5 require 'rake'
6 require 'rake/clean'
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
macournoyer authored
7 require 'rake/extensiontask' # from rake-compiler gem
d25ad7d @josh lib/thin should expect lib/ to already be in the $LOAD_PATH. scripts req...
josh authored
8
9 $: << File.join(File.dirname(__FILE__), 'lib')
d4d9639 @macournoyer Only load what is needed in Rakefile.
macournoyer authored
10 require 'thin/version'
34a5aac @kevwil a better sync with the main repo, change to unified Rakefile
kevwil authored
11
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
macournoyer authored
12 # Load tasks in tasks/
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, need ...
kevwil authored
13 Dir['tasks/**/*.rake'].each { |rake| load rake }
348931b Add rake task to create gem
macournoyer authored
14
d50a45e @macournoyer Improve specs stability.
macournoyer authored
15 task :default => :spec
59a972c @macournoyer A couple refactorings in rake tasks.
macournoyer authored
16
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
macournoyer authored
17 Rake::ExtensionTask.new('thin_parser', Thin::GemSpec) do |ext|
2e9db13 @macournoyer Port fix for ; in path from Unicorn (http://git.bogomips.org/cgit/unicor...
macournoyer authored
18 # enable cross compilation (requires cross compile toolchain)
19 ext.cross_compile = true
20
21 # forces the Windows platform instead of the default one
22 # configure options only for cross compile
23 ext.cross_platform = %w( i386-mswin32 x86-mingw32 )
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
macournoyer authored
24 end
25
85e9ef5 @macournoyer Support multiple Ruby version (fat binaries under windows)
macournoyer authored
26 CLEAN.include %w(**/*.{o,bundle,jar,so,obj,pdb,lib,def,exp,log} ext/*/Makefile ext/*/conftest.dSYM lib/1.{8,9}})
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
macournoyer authored
27
28 desc "Compile the Ragel state machines"
29 task :ragel do
30 Dir.chdir 'ext/thin_parser' do
31 target = "parser.c"
32 File.unlink target if File.exist? target
2e9db13 @macournoyer Port fix for ; in path from Unicorn (http://git.bogomips.org/cgit/unicor...
macournoyer authored
33 sh "ragel parser.rl -G2 -o #{target}"
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
macournoyer authored
34 raise "Failed to compile Ragel state machine" unless File.exist? target
35 end
36 end
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
macournoyer authored
37
85e9ef5 @macournoyer Support multiple Ruby version (fat binaries under windows)
macournoyer authored
38 desc "Build gem packages"
39 task :gems do
40 sh "rake clean gem && rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1"
41 end
42
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
macournoyer authored
43 desc "Release version #{Thin::VERSION::STRING} gems to rubyforge"
85e9ef5 @macournoyer Support multiple Ruby version (fat binaries under windows)
macournoyer authored
44 task :release => [:tag, "gem:push"]
Something went wrong with that request. Please try again.