aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-21 12:51:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-21 12:51:12 +0000
commitcc4d6b4105ae12f1bd60027354c0998a6287a9e2 (patch)
tree6a71b0520a0c0a54eaf1477da96aa15503721447
parent71a401e18907e702bfe84def67393f6c6ade2e35 (diff)
downloadpaludis-cc4d6b4105ae12f1bd60027354c0998a6287a9e2.tar.gz
paludis-cc4d6b4105ae12f1bd60027354c0998a6287a9e2.tar.xz
Build Ruby docs too
-rw-r--r--doc/api/ruby/Makefile.am21
-rw-r--r--doc/api/ruby/create_ruby_doc.rb (renamed from doc/create_ruby_doc.rb)2
2 files changed, 22 insertions, 1 deletions
diff --git a/doc/api/ruby/Makefile.am b/doc/api/ruby/Makefile.am
index 053e6d6..4d60113 100644
--- a/doc/api/ruby/Makefile.am
+++ b/doc/api/ruby/Makefile.am
@@ -19,3 +19,24 @@ htmldocs-subdirs :
htmldocs-local : $(paludisapirubyhtml_DATA)
+dist_noinst_SCRIPTS = create_ruby_doc.rb
+
+if ENABLE_RUBY
+
+all-local : rdoc
+
+rdoc : ruby
+
+ruby : create_ruby_doc.rb
+ rm -fr ruby
+ $(RUBY) $(srcdir)/create_ruby_doc.rb -t "Paludis Ruby API" -m Paludis --op ruby $(top_srcdir)/ruby/*.cc
+
+install-data-local :
+ mkdir -p $(DESTDIR)$(htmldir)/api
+ cp -R ruby/ $(DESTDIR)$(htmldir)/api/
+
+endif
+
+clean-local :
+ rm -fr ruby
+
diff --git a/doc/create_ruby_doc.rb b/doc/api/ruby/create_ruby_doc.rb
index 5d34216..231d43b 100644
--- a/doc/create_ruby_doc.rb
+++ b/doc/api/ruby/create_ruby_doc.rb
@@ -55,7 +55,7 @@ module RDoc
def generate_consts(header, type, in_class)
consts = []
- file = File.read("../#{header}")
+ file = File.read("../../../#{header}")
match = Regexp.new(/enum\s+#{type}\s+\{([^}]+)\}/)#, Regexp::MULTILINE)
if file =~ match
enum = $1