From 4d2421d58b1da845f9dbf09ce78555398106756f Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 10 Jun 2007 07:34:51 +0000 Subject: [PATCH] * instruby.rb (install_recursive): add :glob option rather than using FNM_DOTMACH. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ instruby.rb | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c3dc7ddc4..ba46389c72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 10 16:36:22 2007 Nobuyoshi Nakada + + * instruby.rb (install_recursive): add :glob option rather than + using FNM_DOTMACH. + Sun Jun 10 16:10:58 2007 NAKAMURA Usaku * test/ruby/test_beginendblock.rb: typo. diff --git a/instruby.rb b/instruby.rb index 04add9346e..e910e15602 100755 --- a/instruby.rb +++ b/instruby.rb @@ -123,11 +123,12 @@ def makedirs(dirs) end def install_recursive(srcdir, dest, options = {}) - noinst = options.delete(:no_install) + noinst = options[:no_install] + glob = options[:glob] || "*" subpath = srcdir.size..-1 - Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src| + Dir.glob("#{srcdir}/**/#{glob}") do |src| case base = File.basename(src) - when /\A\.{1,2}\z/, /\A\.\#/, /\A\#.*\#\z/, /~\z/, /\A\.svn\z/ + when /\A\#.*\#\z/, /~\z/ next end if noinst @@ -217,13 +218,13 @@ if $extout noinst = nil end install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst) - install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir) + install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h") end install?(:ext, :comm, :'ext-comm') do puts "installing extension scripts" makedirs [rubylibdir, sitelibdir] install_recursive("#{extout}/common", rubylibdir) - install_recursive("#{extout}/include/ruby", rubyhdrdir + "/ruby") + install_recursive("#{extout}/include/ruby", rubyhdrdir + "/ruby", :glob => "*.h") end end @@ -315,7 +316,7 @@ install?(:local, :arch, :lib) do noinst << "win32.h" end noinst = nil if noinst.empty? - install_recursive("include", rubyhdrdir, :no_install => noinst) + install_recursive("include", rubyhdrdir, :no_install => noinst, :glob => "*.h") end install?(:local, :comm, :man) do