On Tue, 6 Jan 2004 00:47:41 +0900
Dave Thomas <dave / pragprog.com> wrote:

> > Is DESTDIR effective to --ri-system?
> 
> I have no idea: it uses rbconfig:
> 
>      base    = File.join(Config::CONFIG['datadir'], "ri", version)
>      SYSDIR  = File.join(base, "system")
>      SITEDIR = File.join(base, "site")
> 
> If this isn't sufficient, what do I need to do to change it?

The first problem with using DESTDIR I've run into is that ruby may not
be installed in its final place yet when rdoc is run, leaving you
with this:

	/usr/local/bin/ruby ./bin/rdoc --all --ri-system .
	make: /usr/local/bin/ruby: Command not found

Trying to use miniruby would give you this:

	./miniruby ./bin/rdoc --all --ri-system .
	./bin/rdoc:59:in `require': No such file to load -- rdoc/rdoc (LoadError)
  	      from ./bin/rdoc:59

This gets you further:

	/miniruby -Ilib ./bin/rdoc --all --ri-system .

but then eventuall fails with this:

   	Generating RI...
	./lib/yaml.rb:17:in `require': No such file to load -- yaml/parser (LoadError)
            from ./lib/yaml.rb:17
            from ./lib/rdoc/ri/ri_descriptions.rb:1:in `require'
            from ./lib/rdoc/ri/ri_descriptions.rb:1
            from ./lib/rdoc/ri/ri_reader.rb:1:in `require'
            from ./lib/rdoc/ri/ri_reader.rb:1
            from ./lib/rdoc/generators/ri_generator.rb:46:in `require'
            from ./lib/rdoc/generators/ri_generator.rb:46
            from ./lib/rdoc/rdoc.rb:243:in `require'
            from ./lib/rdoc/rdoc.rb:243:in `document'
            from ./bin/rdoc:63

While I'm fine with building the docs here, would it be worthwhile to simply 
bundle the already built docs with the source dist? Then, they could be 
installed in the right place when DESTDIR is supplied, and there's no need to
worry about ruby being in it's final installation location.

Jim