<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,6 +6,8 @@ $:.unshift &quot;lib&quot; if File.directory? &quot;lib&quot;
 require 'rcov/rcovtask'
 require 'rake/testtask'
 require 'rake/rdoctask'
+require 'rake/gempackagetask'
+require 'rake/clean'
 
 # Use the specified rcov executable instead of the one in $PATH
 # (this way we get a sort of informal functional test).
@@ -83,4 +85,101 @@ task :install do
   sh &quot;sudo ruby setup.rb install&quot;
 end
 
+
+PKG_FILES = [&quot;bin/rcov&quot;, &quot;lib/rcov.rb&quot;, &quot;lib/rcov/lowlevel.rb&quot;, &quot;lib/rcov/xx.rb&quot;, &quot;lib/rcov/version.rb&quot;, &quot;lib/rcov/rant.rb&quot;, &quot;lib/rcov/report.rb&quot;, &quot;lib/rcov/rcovtask.rb&quot;, &quot;ext/rcovrt/extconf.rb&quot;, &quot;ext/rcovrt/rcovrt.c&quot;, &quot;ext/rcovrt/callsite.c&quot;, &quot;LEGAL&quot;, &quot;LICENSE&quot;, &quot;Rakefile&quot;, &quot;Rantfile&quot;, &quot;README.rake&quot;, &quot;README.rant&quot;, &quot;README.emacs&quot;, &quot;README.en&quot;, &quot;README.vim&quot;, &quot;README.API&quot;, &quot;THANKS&quot;, &quot;test/functional_test.rb&quot;, &quot;test/file_statistics_test.rb&quot;, &quot;test/assets/sample_03.rb&quot;, &quot;test/assets/sample_05-new.rb&quot;, &quot;test/code_coverage_analyzer_test.rb&quot;, &quot;test/assets/sample_04.rb&quot;, &quot;test/assets/sample_02.rb&quot;, &quot;test/assets/sample_05-old.rb&quot;, &quot;test/assets/sample_01.rb&quot;, &quot;test/turn_off_rcovrt.rb&quot;, &quot;test/call_site_analyzer_test.rb&quot;, &quot;test/assets/sample_05.rb&quot;, &quot;rcov.vim&quot;, &quot;rcov.el&quot;, &quot;setup.rb&quot;, &quot;BLURB&quot;, &quot;CHANGES&quot;]
+
+# gem management tasks  Use these to build the java code before creating the gem package
+# this code can also be used to generate the MRI gem.  But I left the gemspec file in too.
+spec = Gem::Specification.new do |s|
+  s.name = %q{rcov}
+  s.version = &quot;0.8.1.2.0&quot;
+
+  s.required_rubygems_version = nil if s.respond_to? :required_rubygems_version=
+  s.authors = [&quot;Mauricio Fernandez&quot;]
+  s.cert_chain = nil
+  s.date = %q{2007-11-21}
+  s.default_executable = %q{rcov}
+  s.description = %q{rcov is a code coverage tool for Ruby. It is commonly used for viewing overall test unit coverage of target code.  It features fast execution (20-300 times faster than previous tools), multiple analysis modes, XHTML and several kinds of text reports, easy automation with Rake via a RcovTask, fairly accurate coverage information through code linkage inference using simple heuristics, colorblind-friendliness...}
+  s.email = %q{mfp@acm.org}
+  s.executables = [&quot;rcov&quot;]
+  s.extensions = [&quot;ext/rcovrt/extconf.rb&quot;]
+  s.platform = Gem::Platform::RUBY
+  s.extra_rdoc_files = [&quot;README.API&quot;, &quot;README.rake&quot;, &quot;README.rant&quot;, &quot;README.vim&quot;]
+  s.files = PKG_FILES
+  s.has_rdoc = true
+  s.homepage = %q{http://eigenclass.org/hiki.rb?rcov}
+  s.rdoc_options = [&quot;--main&quot;, &quot;README.API&quot;, &quot;--title&quot;, &quot;rcov code coverage tool&quot;]
+  s.require_paths = [&quot;lib&quot;]
+  s.required_ruby_version = Gem::Requirement.new(&quot;&gt; 0.0.0&quot;)
+  s.rubygems_version = %q{1.2.0}
+  s.summary = %q{Code coverage analysis tool for Ruby}
+  s.test_files = [&quot;test/functional_test.rb&quot;, &quot;test/file_statistics_test.rb&quot;, &quot;test/code_coverage_analyzer_test.rb&quot;, &quot;test/call_site_analyzer_test.rb&quot;]
+
+  if s.respond_to? :specification_version then
+    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+    s.specification_version = 1
+
+    if current_version &gt;= 3 then
+    else
+    end
+  else
+  end
+end
+
+#tasks added in to support generating the JRuby gem.
+if RUBY_PLATFORM == 'java'
+  spec.platform = &quot;jruby&quot;
+  spec.extensions = []
+  #add the jruby extension to the file list
+  PKG_FILES &lt;&lt; &quot;lib/rcovrt.jar&quot;  
+  
+  def java_classpath_arg
+    begin
+      require 'java'
+      classpath = java.lang.System.getProperty('java.class.path')
+    rescue LoadError
+    end
+  
+    if classpath.empty?
+      classpath = FileList[&quot;#{ENV['JRUBY_HOME']}/lib/*.jar&quot;].join(File::PATH_SEPARATOR)
+    end
+  
+    classpath ? &quot;-cp #{classpath}&quot; : &quot;&quot;
+  end
+  
+  
+  CLEAN.include [&quot;ext/java/classes&quot;, &quot;lib/rcovrt.jar&quot;, &quot;pkg&quot;]
+  
+  def compile_java
+    mkdir_p &quot;ext/java/classes&quot;
+    sh &quot;javac -g -target 1.5 -source 1.5 -d ext/java/classes #{java_classpath_arg} #{FileList['ext/java/src/**/*.java'].join(' ')}&quot;
+  end
+  
+  def make_jar
+    require 'fileutils'
+    lib = File.join(File.dirname(__FILE__), 'lib')
+    FileUtils.mkdir(lib) unless File.exists? lib
+    sh &quot;jar cf lib/rcovrt.jar -C ext/java/classes/ .&quot; 
+  end
+  
+  file 'lib/rcovrt.jar' =&gt; FileList[&quot;ext/java/src/*.java&quot;] do
+    compile_java
+    make_jar
+  end
+  
+  desc &quot;compile the java extension and put it into the lib directory&quot;
+  task :java_compile =&gt; [&quot;lib/rcovrt.jar&quot;]
+  
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+  p.need_tar = true
+  p.gem_spec = spec  
+end
+
+#extend the gem task to include the java_compile
+if RUBY_PLATFORM == 'java'
+  Rake::Task[&quot;pkg&quot;].enhance([&quot;java_compile&quot;])
+end
+
 # vim: set sw=2 ft=ruby:</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,13 @@
-require 'mkmf'
-
-dir_config(&quot;gcov&quot;)
-if ENV[&quot;USE_GCOV&quot;] and Config::CONFIG['CC'] =~ /gcc/ and 
-  have_library(&quot;gcov&quot;, &quot;__gcov_open&quot;)
-
-  $CFLAGS &lt;&lt; &quot; -fprofile-arcs -ftest-coverage&quot;
-  create_makefile(&quot;rcovrt&quot;)
-else
-  create_makefile(&quot;rcovrt&quot;)
-end
+unless RUBY_PLATFORM == 'java' then
+  require 'mkmf'
+  
+  dir_config(&quot;gcov&quot;)
+  if ENV[&quot;USE_GCOV&quot;] and Config::CONFIG['CC'] =~ /gcc/ and 
+    have_library(&quot;gcov&quot;, &quot;__gcov_open&quot;)
+  
+    $CFLAGS &lt;&lt; &quot; -fprofile-arcs -ftest-coverage&quot;
+    create_makefile(&quot;rcovrt&quot;)
+  else
+    create_makefile(&quot;rcovrt&quot;)
+  end
+end
\ No newline at end of file</diff>
      <filename>ext/rcovrt/extconf.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1255,7 +1255,7 @@ class Installer
   alias setup_dir_lib noop
 
   def setup_dir_ext(rel)
-    make if extdir?(curr_srcdir())
+    make if extdir?(curr_srcdir()) and File.exist?(&quot;#{curr_srcdir()}/Makefile&quot;)
   end
 
   alias setup_dir_data noop</diff>
      <filename>setup.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2a2ab233797b3cd1d92347afbde02ec376399121</id>
    </parent>
  </parents>
  <author>
    <name>Jay McGaffigan</name>
    <email>home@jay-mcgaffigans-macbook-pro.local</email>
  </author>
  <url>http://github.com/relevance/rcov/commit/ff8ed57eef7cf5dbc2246840142990d8199808db</url>
  <id>ff8ed57eef7cf5dbc2246840142990d8199808db</id>
  <committed-date>2008-07-30T12:52:53-07:00</committed-date>
  <authored-date>2008-07-30T12:52:53-07:00</authored-date>
  <message>update to Rake for suporting gems</message>
  <tree>a4c9fcbf6effd44a56c6a7ce3efe6bc5c254123f</tree>
  <committer>
    <name>Jay McGaffigan</name>
    <email>home@jay-mcgaffigans-macbook-pro.local</email>
  </committer>
</commit>
