summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-03 14:44:59 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-03 14:44:59 +0000
commit3b63aee19353db475bde05c2be2c4a371b618a1e (patch)
treee514dda79e504a8039e3db1de21a06076f551b41
parent6343e30c147dc00e34e9d45ea3f74f94873b9709 (diff)
* ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
(extmake) warns a failure in extconf.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rwxr-xr-xext/extmk.rb18
2 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b78ae1e8bb..c1617bd6e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jul 3 23:43:56 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
+ (extmake) warns a failure in extconf.rb.
+
Sun Jul 3 13:44:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (ary_reject_bang): should not remove elements which are
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 3aa81547d9..5665a966a8 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -45,6 +45,10 @@ def sysquote(x)
@quote ? x.quote : x
end
+def verbose?
+ $mflags.defined?("Q") != "@"
+end
+
def extract_makefile(makefile, keep = true)
m = File.read(makefile)
if !(target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1])
@@ -64,7 +68,7 @@ def extract_makefile(makefile, keep = true)
config = CONFIG.dup
install_dirs(target_prefix).each {|var, val| config[var] = val}
FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)},
- :verbose => $mflags.defined?("Q") != "@")
+ :verbose => verbose?)
end
end
return false
@@ -161,7 +165,16 @@ def extmake(target)
Logging::logfile 'mkmf.log'
rm_f makefile
if conf
- load $0 = conf
+ unless verbose?
+ stdout, $stdout = $stdout, File.open(File::NULL, "a")
+ else
+ stdout = $stdout
+ end
+ begin
+ load $0 = conf
+ ensure
+ $stdout = stdout
+ end
else
create_makefile(target)
end
@@ -181,6 +194,7 @@ def extmake(target)
open(makefile, "w") do |f|
f.print(*dummy_makefile(CONFIG["srcdir"]))
end
+ print "Failed to configure #{target}. It will not be installed.\n"
return true
end
args = sysquote($mflags)