aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-21 17:54:52 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-10-21 17:54:52 +0000
commitec08464a55494151c4dfb9ca6f9e5a7f1a99d3e7 (patch)
treec13fccf74cf6154f5ecb37027079200615c9e10e
parentbfcdd9741453b8d8845a2bc253ae93dcb03c7e2a (diff)
downloadpaludis-ec08464a55494151c4dfb9ca6f9e5a7f1a99d3e7.tar.gz
paludis-ec08464a55494151c4dfb9ca6f9e5a7f1a99d3e7.tar.xz
Fix out of tree build
-rw-r--r--doc/api/ruby/Makefile.am3
-rw-r--r--doc/api/ruby/create_ruby_doc.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/api/ruby/Makefile.am b/doc/api/ruby/Makefile.am
index 4d60113..e3cfb31 100644
--- a/doc/api/ruby/Makefile.am
+++ b/doc/api/ruby/Makefile.am
@@ -29,7 +29,8 @@ 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
+ env TOP_SRCDIR="$(top_srcdir)" $(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
diff --git a/doc/api/ruby/create_ruby_doc.rb b/doc/api/ruby/create_ruby_doc.rb
index 231d43b..9901d54 100644
--- a/doc/api/ruby/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(ENV["TOP_SRCDIR"] + "/#{header}")
match = Regexp.new(/enum\s+#{type}\s+\{([^}]+)\}/)#, Regexp::MULTILINE)
if file =~ match
enum = $1