summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 01:39:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 01:39:15 +0000
commit2e498843b6bbcc474824823dd3f9e65f9ab38907 (patch)
tree5d92a0efacc2e4c8f839e70ee9372703df768c5f
parente9299bc22feb48fa092a2a83acf85351f14980a3 (diff)
* lib/mkmf.rb (CXX_EXT): checks for case-sensitive filesystem with
FNM_SYSCASE rather than build_os. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb20
2 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 39082a5d1b5..0750de38748 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Mar 14 10:39:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (CXX_EXT): checks for case-sensitive filesystem with
+ FNM_SYSCASE rather than build_os.
+
Fri Mar 13 23:03:40 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/init.c (wait_connectable0): remove unreachable code.
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 4d0a0dfa930..cfc5453ac9f 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -9,7 +9,7 @@ CONFIG = RbConfig::MAKEFILE_CONFIG
ORIG_LIBPATH = ENV['LIB']
CXX_EXT = %w[cc cxx cpp]
-if /mswin|bccwin|mingw|os2/ !~ CONFIG['build_os']
+if File::FNM_SYSCASE.zero?
CXX_EXT.concat(%w[C])
end
SRC_EXT = %w[c m] << CXX_EXT
@@ -1189,16 +1189,16 @@ end
#
def create_header(header = "extconf.h")
message "creating %s\n", header
- sym = header.tr("a-z./\055", "A-Z___")
+ sym = header.tr("a-z./\055", "A-Z___")
hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
- for line in $defs
- case line
- when /^-D([^=]+)(?:=(.*))?/
+ for line in $defs
+ case line
+ when /^-D([^=]+)(?:=(.*))?/
hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0] : 1}\n"
- when /^-U(.*)/
+ when /^-U(.*)/
hdr << "#undef #$1\n"
- end
- end
+ end
+ end
hdr << "#endif\n"
hdr = hdr.join
unless (IO.read(header) == hdr rescue false)
@@ -1527,7 +1527,7 @@ end
# Makefile.
#
# Setting the +target_prefix+ will, in turn, install the generated binary in
-# a directory under your Config::CONFIG['sitearchdir'] that mimics your local
+# a directory under your RbConfig::CONFIG['sitearchdir'] that mimics your local
# filesystem when you run 'make install'.
#
# For example, given the following file tree:
@@ -1937,7 +1937,7 @@ RPATHFLAG = config_string('RPATHFLAG') || ''
LIBARG = config_string('LIBARG') || '-l%s'
MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || 'int main() {return 0;}'
-sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if sep != "/"} || ""
+sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
CLEANINGS = "
clean-rb-default::
clean-rb::