Skip to content
Browse files

Rakefile w/ precompile task

  • Loading branch information...
1 parent 28e46b5 commit 7adb023dcd11bb6f47e4cd73794d4e1b50e2e258 @jberkel jberkel committed
Showing with 20 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +19 −0 Rakefile
View
1 .gitignore
@@ -1,4 +1,5 @@
bin
gen
+tmp
nbproject/private
local.properties
View
19 Rakefile
@@ -0,0 +1,19 @@
+require 'rake/clean'
+
+stdlib = File.join(File.dirname(__FILE__), "libs/jruby-stdlib.jar")
+stdlib_precompiled = File.join(File.dirname(__FILE__), "libs/jruby-stdlib-precompiled.jar")
+dirs = ['tmp/ruby', 'tmp/precompiled']
+
+CLEAN << 'tmp'
+dirs.each { |d| directory d }
+
+file stdlib_precompiled => :compile_stdlib
+
+desc "precompile ruby stdlib"
+task :compile_stdlib => [:clean, *dirs] do
+ Dir.chdir('tmp/ruby') {
+ sh "jar xfv #{stdlib}"
+ sh "jrubyc . -t ../precompiled"
+ }
+ sh "jar cfv libs/jruby-stdlib-precompiled.jar -C tmp/precompiled ."
+end

0 comments on commit 7adb023

Please sign in to comment.
Something went wrong with that request. Please try again.