From 484e94a89c84cea432e4aad8ec365632ea913365 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 31 Dec 2010 02:46:50 +0000 Subject: * configure.in (warnflags), lib/mkmf.rb (configuration): turn warnings into errors only for bundled extensions. [ruby-core:33815] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index c25270dbc6..d7964d61cb 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1658,6 +1658,10 @@ VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} end possible_command = (proc {|s| s if /top_srcdir/ !~ s} unless $extmk) extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " " + if warnflags = CONFIG['warnflags'] and CONFIG['GCC'] == 'yes' and !$extmk + # turn warnings into errors only for bundled extensions. + warnflags = warnflags.gsub(/(?:\A|\s)-Werror=/, '\1-W') + end mk << %{ CC = #{CONFIG['CC']} CXX = #{CONFIG['CXX']} @@ -1672,7 +1676,7 @@ RUBY_EXTCONF_H = #{$extconf_h} cflags = #{CONFIG['cflags']} optflags = #{CONFIG['optflags']} debugflags = #{CONFIG['debugflags']} -warnflags = #{CONFIG['warnflags']} +warnflags = #{warnflags} CFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} #$CFLAGS #$ARCH_FLAG INCFLAGS = -I. #$INCFLAGS DEFS = #{CONFIG['DEFS']} -- cgit v1.2.3