summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-03 06:34:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-03 06:34:13 +0000
commit1165542a92724aadfa5007c47cfae7a631af669e (patch)
tree562009ea867a478fbef348d073c90e0a097452d1 /lib
parentadbf3c17f9789d97b622c9b0651ad848acaba0f0 (diff)
* lib/mkmf.rb: get rid of nil.to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb11
1 files changed, 6 insertions, 5 deletions
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:]