diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/mkmf.rb | 11 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,7 @@ +Sun Sep 3 15:32:44 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb: get rid of nil.to_s. + Sun Sep 3 06:24:38 2006 Tanaka Akira <akr@fsij.org> * ext/socket/socket.c (ruby_connect): sockerrlen should be socklen_t. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 43ba202bed..35e42e5441 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -536,7 +536,7 @@ end def checking_for(m, fmt = nil) f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim - m = "checking #{'for ' if /\Acheck/ !~ f}#{m}... " + m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... " message "%s", m a = r = nil Logging::postpone do @@ -1067,7 +1067,7 @@ LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC RUBY_EXTCONF_H = #{$extconf_h} -CFLAGS = #{CONFIG['CCDLFLAGS'] unless $static} #$CFLAGS #$ARCH_FLAG +CFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} #$CFLAGS #$ARCH_FLAG INCFLAGS = -I. #$INCFLAGS CPPFLAGS = #{extconf_h}#{$CPPFLAGS} CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']} @@ -1092,7 +1092,7 @@ COPY = #{config_string('CP') || '@$(RUBY) -run -e cp -- -v'} #### End of system configuration section. #### -preload = #{$preload.join(" ") if $preload} +preload = #{$preload ? $preload.join(' ') : ''} } if $nmake == ?b mk.each do |x| @@ -1187,6 +1187,7 @@ def create_makefile(target, srcprefix = nil) deffile = "$(TARGET)-$(arch).def" end end + origdef ||= '' libpath = libpathflag(libpath) @@ -1441,7 +1442,7 @@ MESSAGE def mkmf_failed(path) unless $makefile_created or File.exist?("Makefile") - opts = $arg_config.collect {|t, n| "\t#{t}#{"=#{n}" if n}\n"} + opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"} abort "*** #{path} failed ***\n" + FailedMessage + opts.join end end @@ -1487,7 +1488,7 @@ end config_string('COMMON_HEADERS') do |s| Shellwords.shellwords(s).each {|s| hdr << "#include <#{s}>"} end -COMMON_HEADERS = (hdr.join("\n") unless hdr.empty?) +COMMON_HEADERS = hdr.join("\n") COMMON_LIBS = config_string('COMMON_LIBS', &split) || [] COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:] |