Revision: 2889 http://trac.macosforge.org/projects/ruby/changeset/2889 Author: lsansonetti@apple.com Date: 2009-10-23 17:49:22 -0700 (Fri, 23 Oct 2009) Log Message: ----------- now generating and installing RDoc ri files Modified Paths: -------------- MacRuby/trunk/Rakefile MacRuby/trunk/ext/.document MacRuby/trunk/instruby.rb MacRuby/trunk/rakelib/builder.rake Modified: MacRuby/trunk/Rakefile =================================================================== --- MacRuby/trunk/Rakefile 2009-10-23 23:28:49 UTC (rev 2888) +++ MacRuby/trunk/Rakefile 2009-10-24 00:49:22 UTC (rev 2889) @@ -8,15 +8,6 @@ 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 @@ =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 Modified: MacRuby/trunk/ext/.document =================================================================== --- MacRuby/trunk/ext/.document 2009-10-23 23:28:49 UTC (rev 2888) +++ MacRuby/trunk/ext/.document 2009-10-24 00:49:22 UTC (rev 2889) @@ -4,12 +4,9 @@ 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 Modified: MacRuby/trunk/instruby.rb =================================================================== --- MacRuby/trunk/instruby.rb 2009-10-23 23:28:49 UTC (rev 2888) +++ MacRuby/trunk/instruby.rb 2009-10-24 00:49:22 UTC (rev 2889) @@ -281,20 +281,6 @@ 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 @@ 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 @@ 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 @@ 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: Modified: MacRuby/trunk/rakelib/builder.rake =================================================================== --- MacRuby/trunk/rakelib/builder.rake 2009-10-23 23:28:49 UTC (rev 2888) +++ MacRuby/trunk/rakelib/builder.rake 2009-10-24 00:49:22 UTC (rev 2889) @@ -324,7 +324,7 @@ 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 @@ 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 @@ =end perform_extensions_target(:clean) end + + desc "Clean the RDoc files" + task :doc do + rm_rf('doc') + end end
participants (1)
-
source_changes@macosforge.org