Skip to content

Commit

Permalink
Some hacks to proceed with docs even if asciidoc and/or doxygen are m…
Browse files Browse the repository at this point in the history
…issing
  • Loading branch information
Jacob Harris committed Jun 17, 2008
1 parent ab90362 commit ea6bcf8
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions Rakefile
Expand Up @@ -46,7 +46,6 @@ end
CXXFLAGS = "#{THREADING_FLAGS} #{OPTIMIZATION_FLAGS} -Wall -I/usr/local/include #{MULTI_ARCH_FLAGS}"
LDFLAGS = "#{MULTI_ARCH_LDFLAGS}"


#### Default tasks

desc "Build everything"
Expand Down Expand Up @@ -333,17 +332,30 @@ end
##### Documentation

subdir 'doc' do
ASCIIDOC = "asciidoc -a toc -a numbered -a toclevels=3 -a icons"
ASCIIDOC = 'asciidoc'
ASCIIDOC_FLAGS = "-a toc -a numbered -a toclevels=3 -a icons"
ASCII_DOCS = ['Security of user switching support', 'Users guide',
'Architectural overview']

DOXYGEN = 'doxygen'

desc "Generate all documentation"
task :doc => [:rdoc, :doxygen] + ASCII_DOCS.map{ |x| "#{x}.html" }
task :doc => [:rdoc]

if PlatformInfo.find_command(DOXYGEN)
task :doc => :doxygen
end

task :doc => ASCII_DOCS.map{ |x| "#{x}.html" }

ASCII_DOCS.each do |name|
file "#{name}.html" => ["#{name}.txt"] do
sh "#{ASCIIDOC} '#{name}.txt'"
end
if PlatformInfo.find_command(ASCIIDOC)
sh "#{ASCIIDOC} #{ASCIIDOC_FLAGS} '#{name}.txt'"
else
sh "echo 'asciidoc required to build docs' > '#{name}.html'"
end
end
end

task :clobber => [:'doxygen:clobber'] do
Expand Down

0 comments on commit ea6bcf8

Please sign in to comment.