diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-10 03:06:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-10 03:06:15 +0000 |
commit | 2b592580bf65040373b55ff2ccc3b59a0a231a18 (patch) | |
tree | 642a6c82599486537c3136f32cac7a644c4bf4a3 /instruby.rb | |
parent | 1b8a677b235066d91994e3490e0bce5a098196a2 (diff) | |
download | ruby-2b592580bf65040373b55ff2ccc3b59a0a231a18.tar.gz |
* include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'instruby.rb')
-rwxr-xr-x | instruby.rb | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/instruby.rb b/instruby.rb index 8327d8c570..52f81af4d5 100755 --- a/instruby.rb +++ b/instruby.rb @@ -127,7 +127,14 @@ def install_recursive(srcdir, dest, options = {}) subpath = srcdir.size..-1 Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src| next if /\A\.{1,2}\z/ =~ (base = File.basename(src)) - next if noinst and File.fnmatch?(noinst, File.basename(src)) + if noinst + base = File.basename(src) + if Array === noinst + next if noinst.any? {|n| File.fnmatch?(n, base)} + else + next if File.fnmatch?(noinst, base) + end + end d = dest + src[subpath] if File.directory?(src) makedirs(d) @@ -158,6 +165,8 @@ rubyw_install_name = CONFIG["rubyw_install_name"] version = CONFIG["ruby_version"] bindir = CONFIG["bindir"] libdir = CONFIG["libdir"] +archhdrdir = rubyhdrdir = CONFIG["rubyhdrdir"] +archhdrdir += "/" + CONFIG["arch"] rubylibdir = CONFIG["rubylibdir"] archlibdir = CONFIG["archdir"] sitelibdir = CONFIG["sitelibdir"] @@ -172,7 +181,7 @@ arc = CONFIG["LIBRUBY_A"] install?(:local, :arch, :bin) do puts "installing binary commands" - makedirs [bindir, libdir, archlibdir] + makedirs [bindir, libdir, archlibdir, archhdrdir] install ruby_install_name+exeext, bindir, :mode => 0755 if rubyw_install_name and !rubyw_install_name.empty? @@ -183,7 +192,6 @@ install?(:local, :arch, :bin) do end install lib, libdir, :mode => 0755 unless lib == arc install arc, libdir, :mode => 0644 - install "config.h", archlibdir, :mode => 0644 install "rbconfig.rb", archlibdir, :mode => 0644 if CONFIG["ARCHFILE"] for file in CONFIG["ARCHFILE"].split @@ -207,11 +215,13 @@ if $extout noinst = nil end install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst) + install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir) end install?(:ext, :comm, :'ext-comm') do puts "installing extension scripts" makedirs [rubylibdir, sitelibdir] install_recursive("#{extout}/common", rubylibdir) + install_recursive("#{extout}/include", rubyhdrdir) end end @@ -297,16 +307,13 @@ install?(:local, :arch, :lib) do puts "installing headers" Dir.chdir(srcdir) - makedirs [archlibdir] - for f in Dir["*.h"] - install f, archlibdir, :mode => 0644 - end - - if RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/ - win32libdir = File.join(archlibdir, "win32") - makedirs win32libdir - install "win32/win32.h", win32libdir, :mode => 0644 + makedirs [rubyhdrdir] + noinst = [] + unless RUBY_PLATFORM =~ /mswin32|mingw|bccwin32/ + noinst << "win32.h" end + noinst = nil if noinst.empty? + install_recursive("include", rubyhdrdir, :no_install => noinst) end install?(:local, :comm, :man) do |