about summary refs log tree commit homepage
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 3eb0219..65862f2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,7 +3,24 @@
 require 'tempfile'
 include Rake::DSL
 
-gendocs = %w(NEWS NEWS.atom.xml)
+apidoc = {
+  'doc/Yahns.html' => 'lib/yahns.rb',
+  'doc/Yahns/ProxyPass.html' => 'lib/yahns/proxy_pass.rb'
+}
+
+task apidoc.keys[0] => apidoc.values do
+  rdoc = ENV['rdoc'] || 'rdoc'
+  system("git", "set-file-times", *(apidoc.values))
+  sh "#{rdoc} -f dark216" # dark216 requires olddoc 1.7+
+
+  apidoc.each do |dst, src|
+    src = File.stat(src)
+    File.utime(src.atime, src.mtime, dst)
+  end
+end
+
+gendocs = %W(NEWS NEWS.atom.xml #{apidoc.keys[0]})
+task html: apidoc.keys[0]
 task rsync_docs: gendocs do
   dest = ENV["RSYNC_DEST"] || "yhbt.net:/srv/yhbt/yahns/"
   top = %w(INSTALL HACKING README COPYING)
@@ -28,6 +45,7 @@ task rsync_docs: gendocs do
   files = `git ls-files Documentation/*.txt`.split(/\n/)
   files.concat(top)
   files.concat(gendocs)
+  files.concat(%w(doc/Yahns.html))
   files.concat(%w(yahns yahns-rackup yahns_config).map! { |x|
     "Documentation/#{x}.txt"
   })