[前][次][番号順一覧][スレッド一覧]

ruby-changes:14147

From: nobu <ko1@a...>
Date: Mon, 30 Nov 2009 16:54:50 +0900 (JST)
Subject: [ruby-changes:14147] Ruby:r25964 (ruby_1_8, trunk): * configure.in, win32/Makefile.sub (EXECUTABLE_EXTS): moved from

nobu	2009-11-30 16:54:26 +0900 (Mon, 30 Nov 2009)

  New Revision: 25964

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25964

  Log:
    * configure.in, win32/Makefile.sub (EXECUTABLE_EXTS): moved from
      dln.c:dln_find_1().
    
    * lib/mkmf.rb (def find_executable0): use EXECUTABLE_EXTS, not
      only EXEEXT.  [ruby-core:26821]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/configure.in
    branches/ruby_1_8/dln.c
    branches/ruby_1_8/lib/mkmf.rb
    branches/ruby_1_8/version.h
    branches/ruby_1_8/win32/Makefile.sub
    trunk/ChangeLog
    trunk/configure.in
    trunk/dln.c
    trunk/lib/mkmf.rb
    trunk/win32/Makefile.sub

Index: configure.in
===================================================================
--- configure.in	(revision 25963)
+++ configure.in	(revision 25964)
@@ -2175,6 +2175,12 @@
 LDFLAGS="-L. $LDFLAGS"
 AC_SUBST(ARCHFILE)
 
+if test "$EXEEXT" = .exe; then
+    EXECUTABLE_EXTS='".exe",".com",".cmd",".bat"'
+    AC_DEFINE_UNQUOTED(EXECUTABLE_EXTS, $EXECUTABLE_EXTS)
+    AC_SUBST(EXECUTABLE_EXTS)
+fi
+
 dnl }
 dnl build section {
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25963)
+++ ChangeLog	(revision 25964)
@@ -1,3 +1,11 @@
+Mon Nov 30 16:54:22 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in, win32/Makefile.sub (EXECUTABLE_EXTS): moved from
+	  dln.c:dln_find_1().
+
+	* lib/mkmf.rb (def find_executable0): use EXECUTABLE_EXTS, not
+	  only EXEEXT.  [ruby-core:26821]
+
 Mon Nov 30 11:00:12 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parser_yylex): suppress an extra error message after
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 25963)
+++ lib/mkmf.rb	(revision 25964)
@@ -1123,10 +1123,12 @@
 # Internal use only.
 #
 def find_executable0(bin, path = nil)
-  ext = config_string('EXEEXT')
+  exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
   if File.expand_path(bin) == bin
     return bin if File.executable?(bin)
-    ext and File.executable?(file = bin + ext) and return file
+    if exts
+      exts.each {|ext| File.executable?(file = bin + ext) and return file}
+    end
     return nil
   end
   if path ||= ENV['PATH']
@@ -1137,7 +1139,9 @@
   file = nil
   path.each do |dir|
     return file if File.executable?(file = File.join(dir, bin))
-    return file if ext and File.executable?(file << ext)
+    if exts
+      exts.each {|ext| File.executable?(ext = file + ext) and return ext}
+    end
   end
   nil
 end
Index: win32/Makefile.sub
===================================================================
--- win32/Makefile.sub	(revision 25963)
+++ win32/Makefile.sub	(revision 25964)
@@ -242,6 +242,7 @@
 LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -implib:dummy.lib -def:$(RUBYDEF)
 
 EXEEXT = .exe
+EXECUTABLE_EXTS = ".exe",".com",".cmd",".bat"
 !if !defined(PROGRAM)
 PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
 !endif
@@ -563,6 +564,7 @@
 #define DEFAULT_KCODE KCODE_NONE
 #define LOAD_RELATIVE 1
 #define DLEXT ".so"
+#define EXECUTABLE_EXTS $(EXECUTABLE_EXTS)
 #define RUBY_LIB_VERSION_STYLE 3	/* full */
 #define RUBY_LIB_PREFIX "/lib/$(RUBY_BASE_NAME)"
 #define RUBY_LIB RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION
@@ -662,6 +664,7 @@
 s,@ALLOCA@,$(ALLOCA),;t t
 s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
 s,@EXEEXT@,.exe,;t t
+s,@EXECUTABLE_EXTS@,$(EXECUTABLE_EXTS),;t t
 s,@OBJEXT@,$(OBJEXT),;t t
 s,@XCFLAGS@,$(XCFLAGS),;t t
 s,@XLDFLAGS@,$(XLDFLAGS),;t t
Index: dln.c
===================================================================
--- dln.c	(revision 25963)
+++ dln.c	(revision 25964)
@@ -1552,7 +1552,7 @@
     size_t i, fspace;
 #ifdef DOSISH
     static const char extension[][5] = {
-	".exe", ".com", ".cmd", ".bat",
+	EXECUTABLE_EXTS,
     };
     size_t j;
     int is_abs = 0, has_path = 0;
Index: ruby_1_8/dln.c
===================================================================
--- ruby_1_8/dln.c	(revision 25963)
+++ ruby_1_8/dln.c	(revision 25964)
@@ -1703,7 +1703,7 @@
     size_t i, fspace;
 #ifdef DOSISH
     static const char extension[][5] = {
-	".exe", ".com", ".cmd", ".bat",
+	EXECUTABLE_EXTS,
     };
     size_t j;
     int is_abs = 0, has_path = 0;
Index: ruby_1_8/configure.in
===================================================================
--- ruby_1_8/configure.in	(revision 25963)
+++ ruby_1_8/configure.in	(revision 25964)
@@ -1606,6 +1606,12 @@
 LDFLAGS="-L. $LDFLAGS"
 AC_SUBST(ARCHFILE)
 
+if test "$EXEEXT" = .exe; then
+    EXECUTABLE_EXTS='".exe",".com",".cmd",".bat"'
+    AC_DEFINE_UNQUOTED(EXECUTABLE_EXTS, $EXECUTABLE_EXTS)
+    AC_SUBST(EXECUTABLE_EXTS)
+fi
+
 dnl build rdoc index if requested
 RDOCTARGET=""
 AC_ARG_ENABLE(install-doc,
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 25963)
+++ ruby_1_8/ChangeLog	(revision 25964)
@@ -1,3 +1,11 @@
+Mon Nov 30 16:54:22 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in, win32/Makefile.sub (EXECUTABLE_EXTS): moved from
+	  dln.c:dln_find_1().
+
+	* lib/mkmf.rb (def find_executable0): use EXECUTABLE_EXTS, not
+	  only EXEEXT.  [ruby-core:26821]
+
 Thu Nov 26 00:01:58 2009  NAKAMURA, Hiroshi  <nahi@r...>
 
 	* test/digest/test_digest_extend.rb: Added tests for current digest
Index: ruby_1_8/version.h
===================================================================
--- ruby_1_8/version.h	(revision 25963)
+++ ruby_1_8/version.h	(revision 25964)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.8.8"
-#define RUBY_RELEASE_DATE "2009-11-26"
+#define RUBY_RELEASE_DATE "2009-11-30"
 #define RUBY_VERSION_CODE 188
-#define RUBY_RELEASE_CODE 20091126
+#define RUBY_RELEASE_CODE 20091130
 #define RUBY_PATCHLEVEL -1
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 8
 #define RUBY_RELEASE_YEAR 2009
 #define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 26
+#define RUBY_RELEASE_DAY 30
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8/lib/mkmf.rb
===================================================================
--- ruby_1_8/lib/mkmf.rb	(revision 25963)
+++ ruby_1_8/lib/mkmf.rb	(revision 25964)
@@ -1003,10 +1003,12 @@
 # Internal use only.
 #
 def find_executable0(bin, path = nil)
-  ext = config_string('EXEEXT')
+  exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
   if File.expand_path(bin) == bin
     return bin if File.executable?(bin)
-    ext and File.executable?(file = bin + ext) and return file
+    if exts
+      exts.each {|ext| File.executable?(file = bin + ext) and return file}
+    end
     return nil
   end
   if path ||= ENV['PATH']
@@ -1017,7 +1019,9 @@
   file = nil
   path.each do |dir|
     return file if File.executable?(file = File.join(dir, bin))
-    return file if ext and File.executable?(file << ext)
+    if exts
+      exts.each {|ext| File.executable?(ext = file + ext) and return ext}
+    end
   end
   nil
 end
Index: ruby_1_8/win32/Makefile.sub
===================================================================
--- ruby_1_8/win32/Makefile.sub	(revision 25963)
+++ ruby_1_8/win32/Makefile.sub	(revision 25964)
@@ -191,6 +191,7 @@
 LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -def:$(RUBYDEF)
 
 EXEEXT = .exe
+EXECUTABLE_EXTS = ".exe",".com",".cmd",".bat"
 !if !defined(PROGRAM)
 PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
 !endif
@@ -408,6 +409,7 @@
 #define DEFAULT_KCODE KCODE_NONE
 #define DLEXT ".so"
 #define DLEXT2 ".dll"
+#define EXECUTABLE_EXTS $(EXECUTABLE_EXTS)
 #define RUBY_LIB "/lib/ruby/$(ruby_version)"
 #define RUBY_SITE_LIB "/lib/ruby/site_ruby"
 #define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(ruby_version)"
@@ -512,6 +514,7 @@
 s,@XLDFLAGS@,$(XLDFLAGS),;t t
 s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH),;t t
 s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
+s,@EXECUTABLE_EXTS@,$(EXECUTABLE_EXTS),;t t
 s,@STATIC@,$(STATIC),;t t
 s,@CCDLFLAGS@,,;t t
 s,@LDSHARED@,$(LDSHARED),;t t

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]