diff options
| author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-19 05:54:24 +0000 |
|---|---|---|
| committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-19 05:54:24 +0000 |
| commit | bd80904effeb9e82582677cfc22c7b5b571af831 (patch) | |
| tree | f910132d754933660c33c2826fb8548e965d1bc4 /ext | |
| parent | 86b710d9133b124fe084bdda278deb7948c9dd90 (diff) | |
| download | ruby-bd80904effeb9e82582677cfc22c7b5b571af831.tar.gz ruby-bd80904effeb9e82582677cfc22c7b5b571af831.tar.xz ruby-bd80904effeb9e82582677cfc22c7b5b571af831.zip | |
* ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem is called.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/extmk.rb.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in index 8690e7a71..c5a929d4f 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 |
