Skip to content
Newer
Older
100644 36 lines (28 sloc) 1.22 KB
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, ne…
kevwil authored Jan 17, 2008
1 RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
ae5e729 @kevwil ignore mac finder files, change constant to allow compile on windows
kevwil authored Jan 21, 2008
2 WIN = (RUBY_PLATFORM =~ /mswin|cygwin/)
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, ne…
kevwil authored Jan 17, 2008
3 SUDO = (WIN ? "" : "sudo")
34a5aac @kevwil a better sync with the main repo, change to unified Rakefile
kevwil authored Jan 13, 2008
4
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, ne…
kevwil authored Jan 17, 2008
5 require 'rake'
6 require 'rake/clean'
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
authored Sep 5, 2009
7 require 'rake/extensiontask' # from rake-compiler gem
d25ad7d @josh lib/thin should expect lib/ to already be in the $LOAD_PATH. scripts …
josh authored Sep 5, 2009
8
9 $: << File.join(File.dirname(__FILE__), 'lib')
10 require 'thin'
34a5aac @kevwil a better sync with the main repo, change to unified Rakefile
kevwil authored Jan 14, 2008
11
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
authored Sep 6, 2009
12 # Load tasks in tasks/
6134e43 @kevwil sync with main repo, tweak rakefile(s) again for better win32 gem, ne…
kevwil authored Jan 17, 2008
13 Dir['tasks/**/*.rake'].each { |rake| load rake }
348931b Add rake task to create gem
macournoyer authored Nov 15, 2007
14
d50a45e @macournoyer Improve specs stability.
authored Jan 20, 2008
15 task :default => :spec
59a972c @macournoyer A couple refactorings in rake tasks.
authored Mar 2, 2008
16
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
authored Sep 5, 2009
17 Rake::ExtensionTask.new('thin_parser', Thin::GemSpec) do |ext|
18 ext.cross_compile = true # enable cross compilation (requires cross compile toolchain)
19 ext.cross_platform = 'i386-mswin32' # forces the Windows platform instead of the default one
20 # configure options only for cross compile
21 end
22
23 CLEAN.include %w(**/*.{o,bundle,jar,so,obj,pdb,lib,def,exp,log} ext/*/Makefile ext/*/conftest.dSYM)
9d4f025 @macournoyer Replace custom extension tasks w/ rake-compiler
authored Sep 6, 2009
24
25 desc "Compile the Ragel state machines"
26 task :ragel do
27 Dir.chdir 'ext/thin_parser' do
28 target = "parser.c"
29 File.unlink target if File.exist? target
30 sh "ragel parser.rl | rlgen-cd -G2 -o #{target}"
31 raise "Failed to compile Ragel state machine" unless File.exist? target
32 end
33 end
4ad001c @macournoyer Make cross compiling to win32 work under OS X, w00t!
authored Sep 6, 2009
34
35 desc "Release version #{Thin::VERSION::STRING} gems to rubyforge"
36 task :release => [:clean, :cross, :native, :gem, :tag, "gem:upload"]
Something went wrong with that request. Please try again.