* 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:
parent
dcb796c8d5
commit
33f78212ce
@ -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>
|
Tue Feb 17 11:33:30 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/rss/rexmlparser.rb: REXML version may be 4 digits.
|
* lib/rss/rexmlparser.rb: REXML version may be 4 digits.
|
||||||
|
16
ext/extmk.rb
16
ext/extmk.rb
@ -95,7 +95,7 @@ def extmake(target)
|
|||||||
f.print dummy_makefile($srcdir)
|
f.print dummy_makefile($srcdir)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
args = sysquote($mflags)
|
args = sysquote($mflags.map {|m| /\Aextout_prefix=\z/ =~ m ? m + $extout_prefix : m})
|
||||||
if $static
|
if $static
|
||||||
args += ["static"]
|
args += ["static"]
|
||||||
$extlist.push [$static, $target, File.basename($target), $preload]
|
$extlist.push [$static, $target, File.basename($target), $preload]
|
||||||
@ -146,7 +146,7 @@ def parse_args()
|
|||||||
end
|
end
|
||||||
$destdir = $OPT['dest-dir'] || ''
|
$destdir = $OPT['dest-dir'] || ''
|
||||||
if opt = $OPT['extout'] and !opt.empty?
|
if opt = $OPT['extout'] and !opt.empty?
|
||||||
$extout = File.expand_path(opt, $topdir)
|
$extout = opt
|
||||||
end
|
end
|
||||||
$make = $OPT['make'] || $make || 'make'
|
$make = $OPT['make'] || $make || 'make'
|
||||||
mflags = ($OPT['make-flags'] || '').strip
|
mflags = ($OPT['make-flags'] || '').strip
|
||||||
@ -180,8 +180,12 @@ def parse_args()
|
|||||||
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
|
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
|
||||||
end
|
end
|
||||||
if $extout
|
if $extout
|
||||||
$mflags << "extout=#{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)')}"
|
$absextout = File.expand_path(Config::expand($extout.dup), $topdir)
|
||||||
$mflags << "extout_prefix=#{$extout_prefix}"
|
$extout = '$(topdir)/'+$extout
|
||||||
|
unless Config::expand($extout.dup) == $absextout
|
||||||
|
$extout = $absextout
|
||||||
|
end
|
||||||
|
$mflags << ("extout=" << $extout) << "extout_prefix="
|
||||||
end
|
end
|
||||||
|
|
||||||
$message = $OPT['message']
|
$message = $OPT['message']
|
||||||
@ -271,11 +275,11 @@ exts |= Dir.glob("#{ext_prefix}/*/**/MANIFEST").collect {|d|
|
|||||||
if $extout
|
if $extout
|
||||||
if $install
|
if $install
|
||||||
Config.expand(dest = "#{$destdir}#{$rubylibdir}")
|
Config.expand(dest = "#{$destdir}#{$rubylibdir}")
|
||||||
FileUtils.cp_r($extout+"/.", dest, :verbose => true, :noop => $dryrun)
|
FileUtils.cp_r($absextout+"/.", dest, :verbose => true, :noop => $dryrun)
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
unless $ignore
|
unless $ignore
|
||||||
FileUtils.mkpath($extout)
|
FileUtils.mkpath($absextout)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -868,7 +868,7 @@ DEFFILE = #{deffile}
|
|||||||
CLEANFILES = #{$cleanfiles.join(' ')}
|
CLEANFILES = #{$cleanfiles.join(' ')}
|
||||||
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
|
DISTCLEANFILES = #{$distcleanfiles.join(' ')}
|
||||||
|
|
||||||
extout = #{$extout.sub(/#{Regexp.quote($topdir)}/, '$(topdir)') if $extout}
|
extout = #{$extout}
|
||||||
extout_prefix = #{$extout_prefix}
|
extout_prefix = #{$extout_prefix}
|
||||||
target_prefix = #{target_prefix}
|
target_prefix = #{target_prefix}
|
||||||
LOCAL_LIBS = #{$LOCAL_LIBS}
|
LOCAL_LIBS = #{$LOCAL_LIBS}
|
||||||
@ -898,7 +898,7 @@ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
mfile.print %{
|
mfile.print %{
|
||||||
CLEANLIBS = #{$extout_prefix}$(TARGET).*
|
CLEANLIBS = #{$extout_prefix}$(TARGET).{#{CONFIG['DLEXT']},#{$LIBEXT},exp,il?,tds,map}
|
||||||
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.bak
|
CLEANOBJS = *.#{$OBJEXT} *.#{$LIBEXT} *.s[ol] *.pdb *.bak
|
||||||
|
|
||||||
all: #{target ? $extout ? "install" : "$(DLLIB)" : "Makefile"}
|
all: #{target ? $extout ? "install" : "$(DLLIB)" : "Makefile"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user