Browse files

Add Rawr to Rakefile if we're running JRuby

  • Loading branch information...
1 parent 5f2f948 commit c6543cc43fa258e1c138a2e091d2824e9760c7b0 @paulcbetts committed Jun 17, 2008
Showing with 15 additions and 5 deletions.
  1. +2 −0 Rakefile
  2. +13 −5 build/platform.rake
View
2 Rakefile
@@ -10,6 +10,8 @@ require 'pallet'
# Load other build files
Dir.glob("build/*.rake").each {|x| load x}
+# Include JRuby packaging, but doesn't work on MRI
+require 'rawr' if ruby_runtime == :jruby
### Constants
View
18 build/platform.rake
@@ -18,12 +18,20 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #
###########################################################################
+
+def ruby_runtime
+ # FIXME: Rubinius? IronRuby?
+ return :jruby if RUBY_PLATFORM =~ /java/
+ return :mri
+end
+
def os
- return :linux if RUBY_PLATFORM =~ /linux/
- return :osx if RUBY_PLATFORM =~ /darwin/
- return :solaris if RUBY_PLATFORM =~ /solaris/
- return :bsd if RUBY_PLATFORM =~ /bsd/
- return :windows if RUBY_PLATFORM =~ /win/
+ host_os = Config::CONFIG['host_os']
+ return :linux if host_os =~ /linux/
+ return :osx if host_os =~ /darwin/
+ return :solaris if host_os =~ /solaris/
+ return :bsd if host_os =~ /bsd/
+ return :windows if host_os =~ /win/
end
def get_install_prefix

0 comments on commit c6543cc

Please sign in to comment.