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

* ext/extmk.rb, lib/mkmf.rb (with_destdir): remove drive letter before

prepending destdir on DOSISH.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-07-21 03:12:45 +00:00
parent 58f09b0916
commit 53f6b89e7e
3 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Fri Jul 21 12:11:00 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb, lib/mkmf.rb (with_destdir): remove drive letter before
prepending destdir on DOSISH.
Fri Jul 21 04:17:22 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_call): try local method look-up first for fcall, then

View file

@ -382,7 +382,10 @@ end
if $extout
RbConfig.expand(extout = "#$extout", RbConfig::CONFIG.merge("topdir"=>$topdir))
if $install
RbConfig.expand(dest = "#{$destdir}#{$rubylibdir}")
dest = RbConfig.expand($rubylibdir.dup)
unless $destdir.empty?
dest.sub!($dest_prefix_pattern, RbConfig.expand($destdir.dup))
end
FileUtils.cp_r(extout+"/.", dest, :remove_destination => true, :verbose => true, :noop => $dryrun)
exit
end

View file

@ -61,6 +61,7 @@ $netbsd = /netbsd/ =~ RUBY_PLATFORM
$os2 = /os2/ =~ RUBY_PLATFORM
$beos = /beos/ =~ RUBY_PLATFORM
$solaris = /solaris/ =~ RUBY_PLATFORM
$dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ? /\A([[:alpha:]]:)?/ : /\A/)
def config_string(key, config = CONFIG)
s = config[key] and !s.empty? and block_given? ? yield(s) : s
@ -916,7 +917,8 @@ def pkg_config(pkg)
end
def with_destdir(dir)
/^\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
dir = dir.sub($dest_prefix_pattern, '')
/\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
end
def winsep(s)
@ -946,18 +948,17 @@ topdir = #{($extmk ? CONFIG["topdir"] : $topdir).quote}
hdrdir = #{$extmk ? CONFIG["hdrdir"].quote : '$(topdir)'}
VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
}
drive = File::PATH_SEPARATOR == ';' ? /\A\w:/ : /\A/
if destdir = CONFIG["prefix"].scan(drive)[0] and !destdir.empty?
if $destdir = CONFIG["prefix"][$dest_prefix_pattern, 1]
mk << "\nDESTDIR = #{destdir}\n"
end
CONFIG.each do |key, var|
next unless /prefix$/ =~ key
mk << "#{key} = #{with_destdir(var.sub(drive, ''))}\n"
mk << "#{key} = #{with_destdir(var)}\n"
end
CONFIG.each do |key, var|
next if /^abs_/ =~ key
next unless /^(?:src|top|hdr|(.*))dir$/ =~ key and $1
mk << "#{key} = #{with_destdir(var.sub(drive, ''))}\n"
mk << "#{key} = #{with_destdir(var)}\n"
end
if !$extmk and !$configure_args.has_key?('--ruby') and
sep = config_string('BUILD_FILE_SEPARATOR')