Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow running without rdoc installed on the boostrap ruby. fixes #88

  • Loading branch information...
commit f9bf92c37c0edb4b74a6f565276bcfe7fb8b24f7 1 parent de98c30
@timfel timfel authored
Showing with 24 additions and 16 deletions.
  1. +24 −16 Rakefile
View
40 Rakefile
@@ -2,15 +2,30 @@
require 'rake/clean'
-# Try to support Rake 0.8.7 and 0.9.x (at least for a while)
-if defined? Rake::VERSION
- # Rake 0.9.x
- require 'rubygems'
- gem 'rdoc'
- require 'rdoc/task'
-else
- # Rake 0.8.x
- require 'rake/rdoctask'
+begin
+ # Try to support Rake 0.8.7 and 0.9.x (at least for a while)
+ if defined? Rake::VERSION
+ # Rake 0.9.x
+ require 'rubygems'
+ gem 'rdoc'
+ require 'rdoc/task'
+ else
+ # 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
$LOAD_PATH << File.dirname(__FILE__) # For 1.9, '.' is no longer in the load path
@@ -24,13 +39,6 @@ CLEAN.include('*.out', 'log/vmunit*.out', 'log/all*.out', 'html',
'vmunit.log', 'topazerrors.log', 'gem_*_code.log')
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
desc "Show status of all stones"
Please sign in to comment.
Something went wrong with that request. Please try again.