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

* 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
This commit is contained in:
nobu 2004-02-17 03:12:53 +00:00
parent dcb796c8d5
commit 33f78212ce
3 changed files with 20 additions and 8 deletions

View file

@ -1,3 +1,11 @@
Tue Feb 17 12:12:47 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (parse_args): delay expanding $(extout) until invoking
make.
* lib/mkmf.rb (CLEANLIBS): should remove files have specific
extensions.
Tue Feb 17 11:33:30 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rss/rexmlparser.rb: REXML version may be 4 digits.

View file

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

View file

@ -868,7 +868,7 @@ DEFFILE = #{deffile}
CLEANFILES = #{$cleanfiles.join(' ')}
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
extout = #{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)') if $extout}
extout = #{$extout}
extout_prefix = #{$extout_prefix}
target_prefix = #{target_prefix}
LOCAL_LIBS = #{$LOCAL_LIBS}
@ -898,7 +898,7 @@ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
}
end
mfile.print %{
CLEANLIBS = #{$extout_prefix}$(TARGET).*
CLEANLIBS = #{$extout_prefix}$(TARGET).{#{CONFIG['DLEXT']},#{$LIBEXT},exp,il?,tds,map}
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.bak
all: #{target ? $extout ? "install" : "$(DLLIB)" : "Makefile"}