[r2488]: trunk / src / framework / pre-doc.rb Maximize Restore History

Download this file

pre-doc.rb    45 lines (42 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# vim:sw=4:ts=8
require 'fileutils'
# Objective-C documents by "headerdoc"
hd2html = `xcrun -f headerdoc2html`.chomp
gatherhd = `xcrun -f gatherheaderdoc`.chomp
if hd2html.length > 0 && File.exist?(hd2html)
FileUtils.rm_r('../doc/objc/', :force => true)
cmd = %W(#{hd2html} -o ../doc/objc)
cmd += %w(src/objc/RubyCocoa.h src/objc/RBRuntime.h src/objc/RBObject.h)
command(cmd.join(' '))
cmd = %W(#{gatherhd} ../doc/objc RubyCocoa.html)
command(cmd.join(' '))
end
# Ruby documents by "yard"
yardoc = `which yardoc`.chomp
if yardoc.length > 0 && File.exist?(yardoc)
FileUtils.rm_r('../doc/ruby/', :force => true)
cmd = %W(#{yardoc} -o ../doc/ruby --markup markdown
--load ./tool/yard_objc_register.rb
--title "RubyCocoa\ Documentation"
)
# defined in Ruby
cmd += Dir.glob("src/ruby/**/*.rb")
cmd -= %w(src/ruby/osx/objc/cocoa.rb
src/ruby/osx/foundation.rb
src/ruby/osx/appkit.rb
src/ruby/osx/coredate.rb
src/ruby/osx/qtkit.rb
src/ruby/osx/addressbook.rb
src/ruby/osx/webkit.rb
src/ruby/osx/objc/foundation.rb
src/ruby/osx/objc/oc_attachments.rb
src/ruby/osx/objc/oc_all.rb)
# defined in Objective-C
cmd += %w(src/objc/cls_objcid.m
src/objc/cls_objcptr.m
src/objc/mdl_bundle_support.m
src/objc/mdl_objwrapper.m
src/objc/mdl_osxobjc.m
src/objc/BridgeSupport.m)
command(cmd.join(' '))
end