Permalink
Browse files

add generation of *.doc files as yardoc dependency, use namespace pkc…

…s11_protect_server for ProtectServer Rakefile
  • Loading branch information...
1 parent dd66402 commit 9630e9cd867496e06537b7ff1c368005aac3bf3b @larskanis committed Dec 12, 2011
Showing with 15 additions and 1 deletion.
  1. +9 −1 Rakefile
  2. +6 −0 pkcs11_protect_server/Rakefile
View
@@ -65,8 +65,16 @@ end
file 'ext/pk11_thread_funcs.c' => 'ext/pk11_thread_funcs.h'
file 'ext/pk11.h' => 'ext/pk11_thread_funcs.h'
+task :docs_of_vendor_extensions do
+ Dir['pkcs11_*'].each do |dir|
+ chdir(dir) do
+ sh "rake #{dir}:doc_files"
+ end
+ end
+end
+
desc "Generate static HTML documentation with YARD"
-task :yardoc do
+task :yardoc=>['ext/pk11_struct.doc', :docs_of_vendor_extensions] do
sh "yardoc --title \"PKCS#11/Ruby Interface\" --no-private lib/**/*.rb ext/*.c ext/*.doc pkcs11_protect_server/lib/**/*.rb pkcs11_protect_server/ext/*.c pkcs11_protect_server/ext/*.doc - pkcs11_protect_server/README_PROTECT_SERVER.rdoc"
end
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# -*- ruby -*-
+namespace :pkcs11_protect_server do
+
require 'rubygems'
require 'hoe'
require 'rake/extensiontask'
@@ -81,4 +83,8 @@ file 'ext/pk11s_const_def.inc' => 'ext/generate_constants.rb' do
end
file 'ext/pk11s.c' => ['ext/pk11s_struct_def.inc', 'ext/pk11s_struct_impl.inc', 'ext/pk11s_const_def.inc']
+task :doc_files => 'ext/pk11s_struct.doc'
+
+end # namespace :pkcs11_protect_server
+
# vim: syntax=ruby

0 comments on commit 9630e9c

Please sign in to comment.