1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2007-06-10 07:34:51 +00:00
parent 8e8a3a07b1
commit 4d2421d58b
2 changed files with 12 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Sun Jun 10 16:36:22 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* instruby.rb (install_recursive): add :glob option rather than
using FNM_DOTMACH.
Sun Jun 10 16:10:58 2007 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_beginendblock.rb: typo.

View file

@ -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