even more checking of performance of different method dispatching
[jruby.git] / Rakefile
blob3a13d465800633a48a8bef764f5d5d3d63e79b79
1 task :default => [:build]
3 File.open("default.build.properties") do |props|
4   props.each_line do |line|
5     # skip comments
6     next if line =~ /^\W*#/
7     
8     # build const name
9     name, value = line.split("=")
10     name.gsub!(".", "_").upcase!
11     Object.const_set(name.to_sym, value)
12     
13     # substitute embedded props
14     value.chop!.gsub!(/\$\{([^}]+)\}/) do |embed|
15       Object.const_get($1.gsub!(".", "_").upcase!)
16     end
17   end
18 end
20 def ant(*args)
21   system "ant -logger org.apache.tools.ant.NoBannerLogger #{args.join(' ')}"
22 end
24 desc "Build JRuby"
25 task :build do
26   ant "jar"
27 end
28 task :jar => :build
30 desc "Alias for test:short"
31 task :test => "test:short"
33 desc "Alias for spec:ci"
34 task :spec => "spec:ci"
36 namespace :test do
37   desc "Run the basic set of tests"
38   task :short do
39     ant "test"
40   end
41   
42   desc "Run the complete set of tests (will take a while)"
43   task :all do
44     ant "test-all"
45   end
46 end
48 namespace :spec do
49   desc "Run the rubyspecs expected to pass (version-frozen)"
50   task :ci do
51     ant "spec"
52   end
53   
54   desc "Run all the specs including failures (version-frozen)"
55   task :all do
56     ant "spec-all"
57   end
58 end
60 desc "Clean all built output"
61 task :clean do
62   delete_files = FileList.new do |fl|
63     fl.
64       include("#{BUILD_DIR}/**").
65       exclude("#{BUILD_DIR}/rubyspec").
66       include(DIST_DIR).
67       include(API_DOCS_DIR)
68   end
69   
70   delete_files.each {|files| rm_rf files, :verbose => true}
71 end
73 desc "Generate sources, compile and add to jar file"
74 task :gen do
75   mkdir_p 'src_gen'
76   system 'apt -nocompile -cp lib/jruby.jar:build_lib/asm-3.0.jar:build_lib/asm-util-3.0.jar -factory org.jruby.anno.AnnotationBinder src/org/jruby/*.java'
77   system 'javac -cp lib/jruby.jar src_gen/*.java'
78   system 'jar -uf lib/jruby.jar -C src_gen .'
79 end