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

ruby-changes:3888

From: ko1@a...
Date: Tue, 5 Feb 2008 11:14:43 +0900 (JST)
Subject: [ruby-changes:3888] nobu - Ruby:r15377 (ruby_1_8, trunk): * lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.

nobu	2008-02-05 11:14:17 +0900 (Tue, 05 Feb 2008)

  New Revision: 15377

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/lib/mkmf.rb
    branches/ruby_1_8/version.h
    trunk/ChangeLog
    trunk/lib/mkmf.rb
    trunk/version.h

  Log:
    * lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.
    
    * lib/mkmf.rb (install_files): rejects files matching to
      $NONINSTALLFILES.
    
    * lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
      temporary filse.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/mkmf.rb?r1=15377&r2=15376&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/version.h?r1=15377&r2=15376&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15377&r2=15376&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15377&r2=15376&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/mkmf.rb?r1=15377&r2=15376&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/version.h?r1=15377&r2=15376&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15376)
+++ ChangeLog	(revision 15377)
@@ -1,3 +1,13 @@
+Tue Feb  5 11:14:11 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.
+
+	* lib/mkmf.rb (install_files): rejects files matching to
+	  $NONINSTALLFILES.
+
+	* lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
+	  temporary filse.
+
 Mon Feb  4 21:52:06 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/delegate.rb (DelegateClass): use define_method instead of
Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 15376)
+++ lib/mkmf.rb	(revision 15377)
@@ -96,11 +96,13 @@
   [dir_re('rubyhdrdir'), "$(RUBYHDRDIR)"],
   [dir_re('sitehdrdir'), "$(SITEHDRDIR)"],
   [dir_re('vendorhdrdir'), "$(VENDORHDRDIR)"],
+  [dir_re('bindir'), "$(BINDIR)"],
 ]
 
 def install_dirs(target_prefix = nil)
   if $extout
     dirs = [
+      ['BINDIR',        '$(extout)/bin'],
       ['RUBYCOMMONDIR', '$(extout)/common'],
       ['RUBYLIBDIR',    '$(RUBYCOMMONDIR)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(extout)/$(arch)$(target_prefix)'],
@@ -111,6 +113,7 @@
     ]
   elsif $extmk
     dirs = [
+      ['BINDIR',        '$(bindir)'],
       ['RUBYCOMMONDIR', '$(rubylibdir)'],
       ['RUBYLIBDIR',    '$(rubylibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(archdir)$(target_prefix)'],
@@ -119,6 +122,7 @@
     ]
   elsif $configure_args.has_key?('--vendor')
     dirs = [
+      ['BINDIR',        '$(bindir)'],
       ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
       ['RUBYLIBDIR',    '$(vendorlibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(vendorarchdir)$(target_prefix)'],
@@ -127,6 +131,7 @@
     ]
   else
     dirs = [
+      ['BINDIR',        '$(bindir)'],
       ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
       ['RUBYLIBDIR',    '$(sitelibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(sitearchdir)$(target_prefix)'],
@@ -550,13 +555,14 @@
 
 def install_files(mfile, ifiles, map = nil, srcprefix = nil)
   ifiles or return
+  ifiles.empty? and return
   srcprefix ||= '$(srcdir)'
   RbConfig::expand(srcdir = srcprefix.dup)
   dirs = []
   path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]}
   ifiles.each do |files, dir, prefix|
     dir = map_dir(dir, map)
-    prefix = %r|\A#{Regexp.quote(prefix)}/?| if prefix
+    prefix &&= %r|\A#{Regexp.quote(prefix)}/?|
     if /\A\.\// =~ files
       # install files which are in current working directory.
       files = files[2..-1]
@@ -570,6 +576,10 @@
     Dir.glob(files) do |fx|
       f = fx
       f[0..len] = "" if len
+      case File.basename(f)
+      when *$NONINSTALLFILES
+        next
+      end
       d = File.dirname(f)
       d.sub!(prefix, "") if prefix
       d = (d.empty? || d == ".") ? dir : File.join(dir, d)
@@ -1634,7 +1644,8 @@
   $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"]
   $DEFLIBPATH.unshift(".")
   $LIBPATH = []
-  $INSTALLFILES = nil
+  $INSTALLFILES = []
+  $NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
   $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
 
   $objs = nil
Index: version.h
===================================================================
--- version.h	(revision 15376)
+++ version.h	(revision 15377)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.9.0"
-#define RUBY_RELEASE_DATE "2008-02-04"
+#define RUBY_RELEASE_DATE "2008-02-05"
 #define RUBY_VERSION_CODE 190
-#define RUBY_RELEASE_CODE 20080204
+#define RUBY_RELEASE_CODE 20080205
 #define RUBY_PATCHLEVEL 0
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 0
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 4
+#define RUBY_RELEASE_DAY 5
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 15376)
+++ ruby_1_8/ChangeLog	(revision 15377)
@@ -1,3 +1,13 @@
+Tue Feb  5 11:14:11 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.
+
+	* lib/mkmf.rb (install_files): rejects files matching to
+	  $NONINSTALLFILES.
+
+	* lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
+	  temporary filse.
+
 Mon Feb  4 16:44:24 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (darwin): NSIG is not defined if _XOPEN_SOURCE > 500L.
Index: ruby_1_8/version.h
===================================================================
--- ruby_1_8/version.h	(revision 15376)
+++ ruby_1_8/version.h	(revision 15377)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2008-02-04"
+#define RUBY_RELEASE_DATE "2008-02-05"
 #define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20080204
+#define RUBY_RELEASE_CODE 20080205
 #define RUBY_PATCHLEVEL 5000
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 6
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 4
+#define RUBY_RELEASE_DAY 5
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8/lib/mkmf.rb
===================================================================
--- ruby_1_8/lib/mkmf.rb	(revision 15376)
+++ ruby_1_8/lib/mkmf.rb	(revision 15377)
@@ -73,16 +73,18 @@
 
 INSTALL_DIRS = [
   [dir_re('commondir'), "$(RUBYCOMMONDIR)"],
-  [dir_re("sitedir"), "$(RUBYCOMMONDIR)"],
+  [dir_re('sitedir'), "$(RUBYCOMMONDIR)"],
   [dir_re('rubylibdir'), "$(RUBYLIBDIR)"],
   [dir_re('archdir'), "$(RUBYARCHDIR)"],
   [dir_re('sitelibdir'), "$(RUBYLIBDIR)"],
-  [dir_re('sitearchdir'), "$(RUBYARCHDIR)"]
+  [dir_re('sitearchdir'), "$(RUBYARCHDIR)"],
+  [dir_re('bindir'), "$(BINDIR)"],
 ]
 
 def install_dirs(target_prefix = nil)
   if $extout
     dirs = [
+      ['BINDIR',        '$(extout)/bin'],
       ['RUBYCOMMONDIR', '$(extout)/common'],
       ['RUBYLIBDIR',    '$(RUBYCOMMONDIR)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(extout)/$(arch)$(target_prefix)'],
@@ -91,12 +93,14 @@
     ]
   elsif $extmk
     dirs = [
+      ['BINDIR',        '$(bindir)'],
       ['RUBYCOMMONDIR', '$(rubylibdir)'],
       ['RUBYLIBDIR',    '$(rubylibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(archdir)$(target_prefix)'],
     ]
   else
     dirs = [
+      ['BINDIR',        '$(bindir)'],
       ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
       ['RUBYLIBDIR',    '$(sitelibdir)$(target_prefix)'],
       ['RUBYARCHDIR',   '$(sitearchdir)$(target_prefix)'],
@@ -498,13 +502,14 @@
 
 def install_files(mfile, ifiles, map = nil, srcprefix = nil)
   ifiles or return
+  ifiles.empty? and return
   srcprefix ||= '$(srcdir)'
   Config::expand(srcdir = srcprefix.dup)
   dirs = []
   path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]}
   ifiles.each do |files, dir, prefix|
     dir = map_dir(dir, map)
-    prefix = %r|\A#{Regexp.quote(prefix)}/?| if prefix
+    prefix &&= %r|\A#{Regexp.quote(prefix)}/?|
     if /\A\.\// =~ files
       # install files which are in current working directory.
       files = files[2..-1]
@@ -517,6 +522,10 @@
     f = nil
     Dir.glob(files) do |f|
       f[0..len] = "" if len
+      case File.basename(f)
+      when *$NONINSTALLFILES
+        next
+      end
       d = File.dirname(f)
       d.sub!(prefix, "") if prefix
       d = (d.empty? || d == ".") ? dir : File.join(dir, d)
@@ -1548,7 +1557,8 @@
   $DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"]
   $DEFLIBPATH.unshift(".")
   $LIBPATH = []
-  $INSTALLFILES = nil
+  $INSTALLFILES = []
+  $NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
 
   $objs = nil
   $srcs = nil

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

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