mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem is called.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
da90c90c8c
commit
900b08f275
3 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jun 19 14:46:18 2002 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem
|
||||||
|
is called.
|
||||||
|
|
||||||
Mon Jun 17 10:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Mon Jun 17 10:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* dln.c (dln_load): need to preserve dln_strerror() result,
|
* dln.c (dln_load): need to preserve dln_strerror() result,
|
||||||
|
|
|
@ -78,18 +78,21 @@ end
|
||||||
LINK = "@CC@ #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} @LDFLAGS@ %s %s %s conftest.c %s %s @LIBS@"
|
LINK = "@CC@ #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} @LDFLAGS@ %s %s %s conftest.c %s %s @LIBS@"
|
||||||
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s %s conftest.c"
|
CPP = "@CPP@ @CPPFLAGS@ -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s %s conftest.c"
|
||||||
|
|
||||||
$log = open('extmk.log', 'w')
|
$log = nil
|
||||||
|
|
||||||
$orgerr = $stderr.dup
|
$orgerr = $stderr.dup
|
||||||
$orgout = $stdout.dup
|
$orgout = $stdout.dup
|
||||||
|
|
||||||
def xsystem command
|
def xsystem command
|
||||||
if $DEBUG
|
if $DEBUG
|
||||||
puts command
|
puts command
|
||||||
|
$stdout.flush
|
||||||
return system(command)
|
return system(command)
|
||||||
end
|
end
|
||||||
|
$log ||= open(File.join($topdir, 'ext', 'extmk.log'), 'w')
|
||||||
$stderr.reopen($log)
|
$stderr.reopen($log)
|
||||||
$stdout.reopen($log)
|
$stdout.reopen($log)
|
||||||
puts command
|
puts command
|
||||||
|
$stdout.flush
|
||||||
r = system(command)
|
r = system(command)
|
||||||
$stderr.reopen($orgerr)
|
$stderr.reopen($orgerr)
|
||||||
$stdout.reopen($orgout)
|
$stdout.reopen($orgout)
|
||||||
|
@ -712,6 +715,7 @@ for d in Dir["#{ext_prefix}/**/*"]
|
||||||
load "#{$top_srcdir}/ext/aix_mksym.rb"
|
load "#{$top_srcdir}/ext/aix_mksym.rb"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
$stdout.flush
|
||||||
extmake(d)
|
extmake(d)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -57,8 +57,6 @@ elsif RUBY_PLATFORM =~ /-nextstep|-rhapsody|-darwin/
|
||||||
CFLAGS.gsub!( /-arch\s\w*/, '' )
|
CFLAGS.gsub!( /-arch\s\w*/, '' )
|
||||||
end
|
end
|
||||||
|
|
||||||
$log = open('mkmf.log', 'w')
|
|
||||||
|
|
||||||
if /mswin32/ =~ RUBY_PLATFORM
|
if /mswin32/ =~ RUBY_PLATFORM
|
||||||
OUTFLAG = '-Fe'
|
OUTFLAG = '-Fe'
|
||||||
else
|
else
|
||||||
|
@ -78,17 +76,22 @@ def rm_f(*files)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
$log = nil
|
||||||
|
|
||||||
$orgerr = $stderr.dup
|
$orgerr = $stderr.dup
|
||||||
$orgout = $stdout.dup
|
$orgout = $stdout.dup
|
||||||
def xsystem command
|
def xsystem command
|
||||||
Config.expand(command)
|
Config.expand(command)
|
||||||
if $DEBUG
|
if $DEBUG
|
||||||
puts command
|
puts command
|
||||||
|
$stdout.flush
|
||||||
return system(command)
|
return system(command)
|
||||||
end
|
end
|
||||||
|
$log ||= open('mkmf.log', 'w')
|
||||||
$stderr.reopen($log)
|
$stderr.reopen($log)
|
||||||
$stdout.reopen($log)
|
$stdout.reopen($log)
|
||||||
puts command
|
puts command
|
||||||
|
$stdout.flush
|
||||||
r = system(command)
|
r = system(command)
|
||||||
$stderr.reopen($orgerr)
|
$stderr.reopen($orgerr)
|
||||||
$stdout.reopen($orgout)
|
$stdout.reopen($orgout)
|
||||||
|
|
Loading…
Add table
Reference in a new issue