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:
parent
8e8a3a07b1
commit
4d2421d58b
2 changed files with 12 additions and 6 deletions
|
@ -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>
|
Sun Jun 10 16:10:58 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* test/ruby/test_beginendblock.rb: typo.
|
* test/ruby/test_beginendblock.rb: typo.
|
||||||
|
|
13
instruby.rb
13
instruby.rb
|
@ -123,11 +123,12 @@ def makedirs(dirs)
|
||||||
end
|
end
|
||||||
|
|
||||||
def install_recursive(srcdir, dest, options = {})
|
def install_recursive(srcdir, dest, options = {})
|
||||||
noinst = options.delete(:no_install)
|
noinst = options[:no_install]
|
||||||
|
glob = options[:glob] || "*"
|
||||||
subpath = srcdir.size..-1
|
subpath = srcdir.size..-1
|
||||||
Dir.glob("#{srcdir}/**/*", File::FNM_DOTMATCH) do |src|
|
Dir.glob("#{srcdir}/**/#{glob}") do |src|
|
||||||
case base = File.basename(src)
|
case base = File.basename(src)
|
||||||
when /\A\.{1,2}\z/, /\A\.\#/, /\A\#.*\#\z/, /~\z/, /\A\.svn\z/
|
when /\A\#.*\#\z/, /~\z/
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if noinst
|
if noinst
|
||||||
|
@ -217,13 +218,13 @@ if $extout
|
||||||
noinst = nil
|
noinst = nil
|
||||||
end
|
end
|
||||||
install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst)
|
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
|
end
|
||||||
install?(:ext, :comm, :'ext-comm') do
|
install?(:ext, :comm, :'ext-comm') do
|
||||||
puts "installing extension scripts"
|
puts "installing extension scripts"
|
||||||
makedirs [rubylibdir, sitelibdir]
|
makedirs [rubylibdir, sitelibdir]
|
||||||
install_recursive("#{extout}/common", rubylibdir)
|
install_recursive("#{extout}/common", rubylibdir)
|
||||||
install_recursive("#{extout}/include/ruby", rubyhdrdir + "/ruby")
|
install_recursive("#{extout}/include/ruby", rubyhdrdir + "/ruby", :glob => "*.h")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -315,7 +316,7 @@ install?(:local, :arch, :lib) do
|
||||||
noinst << "win32.h"
|
noinst << "win32.h"
|
||||||
end
|
end
|
||||||
noinst = nil if noinst.empty?
|
noinst = nil if noinst.empty?
|
||||||
install_recursive("include", rubyhdrdir, :no_install => noinst)
|
install_recursive("include", rubyhdrdir, :no_install => noinst, :glob => "*.h")
|
||||||
end
|
end
|
||||||
|
|
||||||
install?(:local, :comm, :man) do
|
install?(:local, :comm, :man) do
|
||||||
|
|
Loading…
Reference in a new issue