Browse files

now generating and installing RDoc ri files

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2889 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 742f5b4 commit 43a7ba76681ba950b8f5a686d0f1ec43667ed09e @lrz lrz committed Oct 24, 2009
Showing with 32 additions and 38 deletions.
  1. +3 −12 Rakefile
  2. +4 −7 ext/.document
  3. +11 −18 instruby.rb
  4. +14 −1 rakelib/builder.rake
View
15 Rakefile
@@ -8,15 +8,6 @@ task :default => :all
desc "Same as framework:install"
task :install => 'framework:install'
-desc "Generate and install RDoc/RI"
-task :install_doc do
- doc_op = '.ext/rdoc'
- unless File.exist?(doc_op)
- sh "./miniruby -I./lib bin/rdoc --all --ri --op \"#{doc_op}\""
- end
- sh "./miniruby instruby.rb #{INSTRUBY_ARGS} --install=rdoc --rdoc-output=\"#{doc_op}\""
-end
-
desc "Same as macruby:build"
task :macruby => 'macruby:build'
@@ -43,10 +34,10 @@ task :test => [:sample_test, :unit_tests]
=end
desc "Clean local and extension build files"
-task :clean => ['clean:local', 'clean:rbo', 'clean:ext']
+task :clean => ['clean:local', 'clean:rbo', 'clean:ext', 'clean:doc']
-desc "Build MacRuby and extensions"
-task :all => [:macruby, 'stdlib:build', :extensions]
+desc "Build everything"
+task :all => [:macruby, 'stdlib:build', :extensions, :doc]
desc "Create an archive (GIT only)"
task :git_archive do
View
11 ext/.document
@@ -4,12 +4,9 @@ bigdecimal/bigdecimal.c
digest/digest.c
etc/etc.c
fcntl/fcntl.c
-iconv/iconv.c
-io/wait/wait.c
-nkf/lib/kconv.rb
-nkf/nkf.c
+#iconv/iconv.c
+#io/wait/wait.c
+#nkf/lib/kconv.rb
+#nkf/nkf.c
socket/socket.c
-stringio/stringio.c
-strscan/strscan.c
-win32ole
zlib/zlib.c
View
29 instruby.rb
@@ -281,20 +281,6 @@ def with_destdir(dir)
end
end
-$installing_rdoc = false
-
-install?(:rdoc) do
- if $rdocdir
- puts "installing rdoc"
-
- $installing_rdoc = true
- ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR).$(TEENY)/system')
- Config.expand(ridatadir)
- makedirs [ridatadir]
- install_recursive($rdocdir, ridatadir, :mode => $data_mode)
- end
-end
-
install?(:local, :comm, :bin, :'bin-comm') do
puts "installing command scripts"
@@ -412,6 +398,17 @@ def with_destdir(dir)
end
end
+#install?(:rdoc) do
+ if $rdocdir
+ puts "installing rdoc"
+
+ ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR).$(TEENY)/system')
+ Config.expand(ridatadir)
+ makedirs [ridatadir]
+ install_recursive($rdocdir, ridatadir, :mode => $data_mode)
+ end
+#end
+
install?(:local, :data) do
puts "installing data files"
destination_dir = datadir.clone
@@ -450,8 +447,6 @@ def install_stuff(what, from, to, mode)
Dir.glob(File.join(to, '**', '.svn')).each { |x| rm_rf(x) }
end
-unless $installing_rdoc
-
install_stuff('Xcode 3.x templates', 'misc/xcode-templates',
'/Library/Application Support/Developer/3.0/Xcode', 0755)
install_stuff('Xcode templates', 'misc/xcode-templates',
@@ -522,6 +517,4 @@ def install_stuff(what, from, to, mode)
llc_dest = File.join(CONFIG['bindir'], 'llc')
install('/usr/local/bin/llc', llc_dest, :mode => $prog_mode)
-end # unless $installing_rdoc
-
# vi:set sw=2:
View
15 rakelib/builder.rake
@@ -324,7 +324,7 @@ EXTOUT = (ENV['EXTOUT'] or ".ext")
INSTALLED_LIST = '.installed.list'
SCRIPT_ARGS = "--make=\"/usr/bin/make\" --dest-dir=\"#{DESTDIR}\" --extout=\"#{EXTOUT}\" --mflags=\"\" --make-flags=\"\""
EXTMK_ARGS = "#{SCRIPT_ARGS} --extension --extstatic"
-INSTRUBY_ARGS = "#{SCRIPT_ARGS} --data-mode=0644 --prog-mode=0755 --installed-list #{INSTALLED_LIST} --mantype=\"doc\" --sym-dest-dir=\"#{SYM_INSTDIR}\""
+INSTRUBY_ARGS = "#{SCRIPT_ARGS} --data-mode=0644 --prog-mode=0755 --installed-list #{INSTALLED_LIST} --mantype=\"doc\" --sym-dest-dir=\"#{SYM_INSTDIR}\" --rdoc-output=\"doc\""
EXTENSIONS = ['ripper', 'digest', 'etc', 'readline', 'libyaml', 'fcntl', 'socket', 'zlib', 'bigdecimal'].sort
def perform_extensions_target(target)
@@ -360,6 +360,14 @@ task :extensions => [:miniruby, "macruby:static"] do
perform_extensions_target(:all)
end
+desc "Generate RDoc files"
+task :doc => [:macruby, :extensions] do
+ doc_op = './doc'
+ unless File.exist?(doc_op)
+ sh "DYLD_LIBRARY_PATH=. ./macruby -I. -I./lib -I./ext/libyaml -I./ext/etc bin/rdoc --ri --op \"#{doc_op}\""
+ end
+end
+
AOT_STDLIB = [
'rbconfig.rb',
'lib/date.rb',
@@ -481,4 +489,9 @@ namespace :clean do
=end
perform_extensions_target(:clean)
end
+
+ desc "Clean the RDoc files"
+ task :doc do
+ rm_rf('doc')
+ end
end

0 comments on commit 43a7ba7

Please sign in to comment.