diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 04:54:52 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-06-05 04:54:52 +0000 |
commit | 21524a3fc00d0e894d0ca0b8fcb7d9c7413c5917 (patch) | |
tree | a915c1e128bf3c908a60c9ba6a96d55ce709522b /lib | |
parent | ac376af4f42ca83fc178a0f8911f542e1bc5e8f1 (diff) |
* ext/extmk.rb.in, lib/mkmf.rb (xsystem): write log file.
print command line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 8ca32c9b6c..22d2b2e002 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -37,13 +37,7 @@ elsif RUBY_PLATFORM =~ /-nextstep|-rhapsody|-darwin/ CFLAGS.gsub!( /-arch\s\w*/, '' ) end -if FileTest.readable? 'nul' - $null = open('nul', 'w') -elsif FileTest.readable? '/dev/null' - $null = open('/dev/null', 'w') -else - $null = open('test.log', 'w') -end +$log = open('mkmf.log', 'w') LINK = "#{CONFIG['CC']} -o conftest -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" CPP = "#{CONFIG['CPP']} -E %s -I#{$hdrdir} #{CFLAGS} -I#{CONFIG['includedir']} %s %s conftest.c" @@ -64,11 +58,12 @@ $orgout = $stdout.dup def xsystem command Config.expand(command) if $DEBUG - print command, "\n" + puts command return system(command) end - $stderr.reopen($null) - $stdout.reopen($null) + $stderr.reopen($log) + $stdout.reopen($log) + puts command r = system(command) $stderr.reopen($orgerr) $stdout.reopen($orgout) |