summaryrefslogtreecommitdiff
path: root/ext/extmk.rb.in
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-19 05:54:24 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-19 05:54:24 +0000
commitfa1f7befa95c930a68f4b7ace4a4e6e1dd221773 (patch)
treef910132d754933660c33c2826fb8548e965d1bc4 /ext/extmk.rb.in
parent772f420a18ba30a5e7a0cf03827fc958cf25db95 (diff)
* 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/trunk@2584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb.in')
-rw-r--r--ext/extmk.rb.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index 8690e7a..c5a929d 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -80,18 +80,21 @@ end
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"
-$log = open('extmk.log', 'w')
-
+$log = nil
$orgerr = $stderr.dup
$orgout = $stdout.dup
+
def xsystem command
if $DEBUG
puts command
+ $stdout.flush
return system(command)
end
+ $log ||= open(File.join($topdir, 'ext', 'extmk.log'), 'w')
$stderr.reopen($log)
$stdout.reopen($log)
puts command
+ $stdout.flush
r = system(command)
$stderr.reopen($orgerr)
$stdout.reopen($orgout)
@@ -780,6 +783,7 @@ for d in Dir["#{ext_prefix}/**/*"]
load "#{$top_srcdir}/ext/aix_mksym.rb"
end
end
+ $stdout.flush
extmake(d)
end