Skip to content

Commit 2e49884

Browse files
committed
* 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
1 parent e9299bc commit 2e49884

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sat Mar 14 10:39:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* lib/mkmf.rb (CXX_EXT): checks for case-sensitive filesystem with
4+
FNM_SYSCASE rather than build_os.
5+
16
Fri Mar 13 23:03:40 2009 Tanaka Akira <akr@fsij.org>
27

38
* ext/socket/init.c (wait_connectable0): remove unreachable code.

lib/mkmf.rb

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
ORIG_LIBPATH = ENV['LIB']
1010

1111
CXX_EXT = %w[cc cxx cpp]
12-
if /mswin|bccwin|mingw|os2/ !~ CONFIG['build_os']
12+
if File::FNM_SYSCASE.zero?
1313
CXX_EXT.concat(%w[C])
1414
end
1515
SRC_EXT = %w[c m] << CXX_EXT
@@ -1189,16 +1189,16 @@ def enable_config(config, default=nil)
11891189
#
11901190
def create_header(header = "extconf.h")
11911191
message "creating %s\n", header
1192-
sym = header.tr("a-z./\055", "A-Z___")
1192+
sym = header.tr("a-z./\055", "A-Z___")
11931193
hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
1194-
for line in $defs
1195-
case line
1196-
when /^-D([^=]+)(?:=(.*))?/
1194+
for line in $defs
1195+
case line
1196+
when /^-D([^=]+)(?:=(.*))?/
11971197
hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0] : 1}\n"
1198-
when /^-U(.*)/
1198+
when /^-U(.*)/
11991199
hdr << "#undef #$1\n"
1200-
end
1201-
end
1200+
end
1201+
end
12021202
hdr << "#endif\n"
12031203
hdr = hdr.join
12041204
unless (IO.read(header) == hdr rescue false)
@@ -1527,7 +1527,7 @@ def depend_rules(depend)
15271527
# Makefile.
15281528
#
15291529
# Setting the +target_prefix+ will, in turn, install the generated binary in
1530-
# a directory under your Config::CONFIG['sitearchdir'] that mimics your local
1530+
# a directory under your RbConfig::CONFIG['sitearchdir'] that mimics your local
15311531
# filesystem when you run 'make install'.
15321532
#
15331533
# For example, given the following file tree:
@@ -1937,7 +1937,7 @@ def mkmf_failed(path)
19371937
LIBARG = config_string('LIBARG') || '-l%s'
19381938
MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || 'int main() {return 0;}'
19391939

1940-
sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if sep != "/"} || ""
1940+
sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
19411941
CLEANINGS = "
19421942
clean-rb-default::
19431943
clean-rb::

0 commit comments

Comments
 (0)