diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 6ee63855bf..26abfe33b2 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -354,7 +354,7 @@ install?(:local, :arch, :bin, :'bin-arch') do end end -install?(:local, :arch, :lib) do +install?(:local, :arch, :lib, :'lib-arch') do prepare "base libraries", libdir install lib, libdir, :mode => $prog_mode, :strip => $strip unless lib == arc @@ -398,7 +398,7 @@ install?(:ext, :arch, :'ext-arch') do end end end -install?(:ext, :arch, :hdr, :'arch-hdr') do +install?(:ext, :arch, :hdr, :'arch-hdr', :'hdr-arch') do prepare "extension headers", archhdrdir install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode) end @@ -408,7 +408,7 @@ install?(:ext, :comm, :'ext-comm') do prepare "extension scripts", sitelibdir prepare "extension scripts", vendorlibdir end -install?(:ext, :comm, :hdr, :'comm-hdr') do +install?(:ext, :comm, :hdr, :'comm-hdr', :'hdr-comm') do hdrdir = rubyhdrdir + "/ruby" prepare "extension headers", hdrdir install_recursive("#{$extout}/include/ruby", hdrdir, :glob => "*.h", :mode => $data_mode) @@ -749,7 +749,14 @@ end # :startdoc: -install?(:ext, :comm, :gem) do +install?(:ext, :comm, :gem, :'default-gem', :'default-gem-comm') do + install_default_gem('lib', srcdir) +end +install?(:ext, :arch, :gem, :'default-gem', :'default-gem-arch') do + install_default_gem('ext', srcdir) +end + +def install_default_gem(dir, srcdir) gem_dir = Gem.default_dir directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) prepare "default gems", gem_dir, directories @@ -758,7 +765,7 @@ install?(:ext, :comm, :gem) do default_spec_dir = "#{spec_dir}/default" makedirs(default_spec_dir) - gems = Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").map {|src| + gems = Dir.glob("#{srcdir}/#{dir}/**/*.gemspec").map {|src| spec = Gem::Specification.load(src) || raise("invalid spec in #{src}") file_collector = RbInstall::Specs::FileCollector.new(src) files = file_collector.collect @@ -787,7 +794,7 @@ install?(:ext, :comm, :gem) do end end -install?(:ext, :comm, :gem) do +install?(:ext, :comm, :gem, :'bundled-gem') do gem_dir = Gem.default_dir directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode) prepare "bundle gems", gem_dir, directories