aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2007-11-13 14:26:57 +0000
committerAvatar Richard Brown <rbrown@exherbo.org> 2007-11-13 14:26:57 +0000
commit72833626ac5df274e559c3f66720615b26340721 (patch)
treee8419aad8b0d5a18dfd46360c4c8bc67b581d8be
parente403e004e93ea5d145abb641a2b4760c51eebd64 (diff)
downloadpaludis-72833626ac5df274e559c3f66720615b26340721.tar.gz
paludis-72833626ac5df274e559c3f66720615b26340721.tar.xz
Fix distcheck.
-rw-r--r--doc/api/ruby/Makefile.am4
-rw-r--r--doc/api/ruby/create_ruby_examples.rb10
2 files changed, 8 insertions, 6 deletions
diff --git a/doc/api/ruby/Makefile.am b/doc/api/ruby/Makefile.am
index b2703ac..df6461b 100644
--- a/doc/api/ruby/Makefile.am
+++ b/doc/api/ruby/Makefile.am
@@ -42,8 +42,8 @@ all-local : ruby
ruby : rdoc examples
examples : rdoc $(examples)
- $(RUBY) $(srcdir)/create_ruby_examples.rb $(examples)
- cp ruby_syntax.css ruby
+ $(RUBY) $(srcdir)/create_ruby_examples.rb $(srcdir) $(examples)
+ cp $(srcdir)/ruby_syntax.css ruby
rdoc : create_ruby_doc.rb
rm -rf ruby
diff --git a/doc/api/ruby/create_ruby_examples.rb b/doc/api/ruby/create_ruby_examples.rb
index 0e2f8fb..bb4507d 100644
--- a/doc/api/ruby/create_ruby_examples.rb
+++ b/doc/api/ruby/create_ruby_examples.rb
@@ -6,17 +6,19 @@ require 'syntax/convertors/html'
convertor = Syntax::Convertors::HTML.for_syntax('ruby')
+srcdir = ARGV.shift
+
topuri = '../../'
-toplinks = File.read('../toplinks.html.part.in')
-header = File.read('../../header.html.part.in')
-footer = File.read('../../footer.html.part.in')
+toplinks = File.read(srcdir + '/../toplinks.html.part.in')
+header = File.read(srcdir + '/../../header.html.part.in')
+footer = File.read(srcdir + '/../../footer.html.part.in')
css = '<link rel="stylesheet" href="ruby_syntax.css" type="text/css" />'
header.gsub!('###TOPLINKS###', toplinks)
header.gsub!('###TOPURI###', topuri)
header.gsub!("</head>", "#{css}</head>")
ARGV.each do |example_file|
- html = convertor.convert(File.read(example_file), false)
+ html = convertor.convert(File.read(srcdir + '/' + example_file), false)
File.open('ruby/' + example_file.gsub(/rb$/,'html'), 'w') do |output|
output.write header
output.write "<h1>#{example_file}</h1>"