On Tue, Jan 21, 2003 at 11:37:35PM +0900, Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: [RFC] mkmf.rb - add files to clean and distclean targets"
>     on 03/01/21, Alexander Bokovoy <a.bokovoy / sam-solutions.net> writes:
> 
> |Attached. The patch is against mid-November CVS (I haven't tried against
> |current CVS).
> 
> Thank you.  But I don't understand purpose of the following
This is an attempt to make Ruby FHS-compliant. The result is that:

$prefix/lib/ruby is used to install architecture-specific linked objects
(libraries and compiled extensions).

$prefix/share/ruby is used to install architecture-independent files
(Ruby-source components of extensions and their data).

So:
> RUBY_LIB_PREFIX
RUBY_LIB_PREFIX="${prefix}/share/ruby"
This is the top directory under which library sources (*.rb) will be installed
in subdirectories depending on Ruby version. Files placed in RUBY_LIB_PREFIX directly
would be available for all Ruby versions installed on this box and usually
they represent the script code which is version-independent.

> RUBY_LIB_PREFIX2
RUBY_LIB_PREFIX2="${prefix}/lib/ruby"
This is the top directory under which compiled extensions (*.so) and headers
for development are installed in subdirectories depending on Ruby version
and architecture of the system.

> RUBY_LIB_PATH
> RUBY_LIB_PATH2
Subdirectories of (RUBY_LIB_PREFIX,RUBY_LIB_PREFIX2) but for concrete
version of Ruby: (/usr/share/ruby/1.7,/usr/lib/ruby/1.7). These are
directories at which Config::CONFIG["rubylibdir"] and 
Config::CONFIG["archdir"] point.

> RUBY_SITE_LIB_PATH2
Site-install for non-compiled sources (*.rb) for concrete version of Ruby:
RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}"
This is Config::CONFIG["sitelibdir"] when VENDOR_SPECIFIC constant isn't
defined (or evaluates to false).

and
> RUBY_SITE_LIB_PATH3
(same as RUBY_SITE_LIB_PATH2 but for compiled extensions)
RUBY_SITE_LIB_PATH3="`echo ${RUBY_SITE_LIB_PATH2}|sed -e 's@/share/@/lib/@;'`"
This is component of Config::CONFIG["sitearchdir"] when VENDOR_SPECIFIC constant isn't
defined or evaluates to false.

For 1.7 they would be (/usr/local/share/ruby/1.7,/usr/local/lib/ruby/1.7)

> RUBY_VENDOR_LIB_PATH
> RUBY_VENDOR_LIB_PATH2
These are produced and used similar to RUBY_LIB_PATH{,2} but for
vendor-specific paths for this concrete version of Ruby. They are
internally to export RUBY_VENDOR_LIB, RUBY_VENDOR_LIB2.

For 1.7 they would be (/usr/share/ruby/vendor_ruby,/usr/lib/ruby/vendor_ruby)

> RUBY_ARCHLIB
Architecture-dependant path for concrete version of Ruby. For
i586-linux-gnu and Ruby 1.7 this would be /usr/lib/ruby/i586-linux-gnu.
This is where actual compiled extensions (*.so) are installed.

> RUBY_SITE_ARCHLIB
This is Config::CONFIG["sitearchdir", site-specific directory for
installing compiled extensions (*.so) for concrete Ruby version. For
i586-linux-gnu and Ruby 1.7 this would be
/usr/local/lib/ruby/i586-linux-gnu.

> RUBY_VENDOR_ARCHLIB
This is vendor-specific directory for installing compiled extensions
(*.so) for concrete Ruby version. For i586-linux-gnu and Ruby 1.7
this would be /usr/lib/ruby/vendor_ruby/i586-linux-gnu.


-- 
/ Alexander Bokovoy
---
Usually, when a lot of men get together, it's called a war.
		-- Mel Brooks, "The Listener"