From f0cc22e99024eefe2867fb47bea1ad6b9da36d6a Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 5 Feb 2008 02:14:17 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++++ lib/mkmf.rb | 15 +++++++++++++-- version.h | 6 +++--- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24ad19d3f5..9c15289d5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Tue Feb 5 11:14:11 2008 Nobuyoshi Nakada + + * 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 * lib/delegate.rb (DelegateClass): use define_method instead of diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 53b19a27a5..96696b1f3b 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -96,11 +96,13 @@ INSTALL_DIRS = [ [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 @@ def install_dirs(target_prefix = nil) ] elsif $extmk dirs = [ + ['BINDIR', '$(bindir)'], ['RUBYCOMMONDIR', '$(rubylibdir)'], ['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(archdir)$(target_prefix)'], @@ -119,6 +122,7 @@ def install_dirs(target_prefix = nil) ] 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 @@ def install_dirs(target_prefix = nil) ] else dirs = [ + ['BINDIR', '$(bindir)'], ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], @@ -550,13 +555,14 @@ end 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 @@ def install_files(mfile, ifiles, map = nil, srcprefix = nil) 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 @@ def init_mkmf(config = CONFIG) $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 diff --git a/version.h b/version.h index c462cc60ed..d6fbfeac12 100644 --- a/version.h +++ b/version.h @@ -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[];