diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-17 03:12:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-17 03:12:53 +0000 |
commit | 33f78212ceb6a09a392d23026afaa53f3ef1c00b (patch) | |
tree | 97e55d85400dc7f246b233136811ba1917909e55 /ext | |
parent | dcb796c8d5b42abb9196f215c5ca113c4bd4f60b (diff) | |
download | ruby-33f78212ceb6a09a392d23026afaa53f3ef1c00b.tar.gz |
* ext/extmk.rb (parse_args): delay expanding $(extout) until invoking
make.
* lib/mkmf.rb (CLEANLIBS): should remove files have specific
extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/extmk.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index 466dae23f3..406e31e747 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -95,7 +95,7 @@ def extmake(target) f.print dummy_makefile($srcdir) return true end - args = sysquote($mflags) + args = sysquote($mflags.map {|m| /\Aextout_prefix=\z/ =~ m ? m + $extout_prefix : m}) if $static args += ["static"] $extlist.push [$static, $target, File.basename($target), $preload] @@ -146,7 +146,7 @@ def parse_args() end $destdir = $OPT['dest-dir'] || '' if opt = $OPT['extout'] and !opt.empty? - $extout = File.expand_path(opt, $topdir) + $extout = opt end $make = $OPT['make'] || $make || 'make' mflags = ($OPT['make-flags'] || '').strip @@ -180,8 +180,12 @@ def parse_args() $mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}" end if $extout - $mflags << "extout=#{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)')}" - $mflags << "extout_prefix=#{$extout_prefix}" + $absextout = File.expand_path(Config::expand($extout.dup), $topdir) + $extout = '$(topdir)/'+$extout + unless Config::expand($extout.dup) == $absextout + $extout = $absextout + end + $mflags << ("extout=" << $extout) << "extout_prefix=" end $message = $OPT['message'] @@ -271,11 +275,11 @@ exts |= Dir.glob("#{ext_prefix}/*/**/MANIFEST").collect {|d| if $extout if $install Config.expand(dest = "#{$destdir}#{$rubylibdir}") - FileUtils.cp_r($extout+"/.", dest, :verbose => true, :noop => $dryrun) + FileUtils.cp_r($absextout+"/.", dest, :verbose => true, :noop => $dryrun) exit end unless $ignore - FileUtils.mkpath($extout) + FileUtils.mkpath($absextout) end end |