Skip to content
This repository has been archived by the owner on Mar 26, 2023. It is now read-only.

Commit

Permalink
allow running without rdoc installed on the boostrap ruby. fixes #88
Browse files Browse the repository at this point in the history
  • Loading branch information
timfel committed Oct 28, 2011
1 parent de98c30 commit f9bf92c
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions Rakefile
Expand Up @@ -2,15 +2,30 @@


require 'rake/clean' require 'rake/clean'


# Try to support Rake 0.8.7 and 0.9.x (at least for a while) begin
if defined? Rake::VERSION # Try to support Rake 0.8.7 and 0.9.x (at least for a while)
# Rake 0.9.x if defined? Rake::VERSION
require 'rubygems' # Rake 0.9.x
gem 'rdoc' require 'rubygems'
require 'rdoc/task' gem 'rdoc'
else require 'rdoc/task'
# Rake 0.8.x else
require 'rake/rdoctask' # Rake 0.8.x
require 'rake/rdoctask'
end

Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include 'docs/*', 'LICENSES.txt'
rd.rdoc_files.include 'src/kernel/bootstrap/Maglev.rb'
rd.rdoc_files.include 'examples/**/*README.rdoc', 'examples/**/readme.txt'
end
rescue LoadError => e
puts e
puts "Generating RDoc will not work without the rdoc gem"

task :rdoc { puts "Install the rdoc gem and re-run this" }
task :rerdoc { puts "Install the rdoc gem and re-run this" }
end end


$LOAD_PATH << File.dirname(__FILE__) # For 1.9, '.' is no longer in the load path $LOAD_PATH << File.dirname(__FILE__) # For 1.9, '.' is no longer in the load path
Expand All @@ -24,13 +39,6 @@ CLEAN.include('*.out', 'log/vmunit*.out', 'log/all*.out', 'html',
'vmunit.log', 'topazerrors.log', 'gem_*_code.log') 'vmunit.log', 'topazerrors.log', 'gem_*_code.log')
CLOBBER.include('lib/ruby/site_ruby/1.8/smalltalk', 'version.txt') CLOBBER.include('lib/ruby/site_ruby/1.8/smalltalk', 'version.txt')


Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include 'docs/*', 'LICENSES.txt'
rd.rdoc_files.include 'src/kernel/bootstrap/Maglev.rb'
rd.rdoc_files.include 'examples/**/*README.rdoc', 'examples/**/readme.txt'
end

task :default => :status task :default => :status


desc "Show status of all stones" desc "Show status of all stones"
Expand Down

0 comments on commit f9bf92c

Please sign in to comment.