ruby-changes:39687
From: nobu <ko1@a...>
Date: Sat, 5 Sep 2015 21:29:50 +0900 (JST)
Subject: [ruby-changes:39687] nobu:r51768 (trunk): fake.rb: optimal paths
nobu 2015-09-05 21:29:29 +0900 (Sat, 05 Sep 2015) New Revision: 51768 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51768 Log: fake.rb: optimal paths * tool/fake.rb: remove redundant dot directories from joined path. Modified files: trunk/tool/fake.rb Index: tool/fake.rb =================================================================== --- tool/fake.rb (revision 51767) +++ tool/fake.rb (revision 51768) @@ -44,8 +44,9 @@ prehook = proc do |extmk| https://github.com/ruby/ruby/blob/trunk/tool/fake.rb#L44 builddir = File.join([".."]*pwd.size + dir) builddir = "." if builddir.empty? end + join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')} $topdir ||= builddir - $top_srcdir ||= File.join($topdir, srcdir) + $top_srcdir ||= join[$topdir, srcdir] $extout = '$(topdir)/.ext' $extout_prefix = '$(extout)$(target_prefix)/' config = RbConfig::CONFIG @@ -53,8 +54,8 @@ prehook = proc do |extmk| https://github.com/ruby/ruby/blob/trunk/tool/fake.rb#L54 mkconfig["builddir"] = config["builddir"] = builddir mkconfig["top_srcdir"] = $top_srcdir if $top_srcdir config["top_srcdir"] = File.expand_path($top_srcdir ||= top_srcdir) - config["rubyhdrdir"] = File.join($top_srcdir, "include") - config["rubyarchhdrdir"] = File.join(builddir, config["EXTOUT"], "include", config["arch"]) + config["rubyhdrdir"] = join[$top_srcdir, "include"] + config["rubyarchhdrdir"] = join[builddir, config["EXTOUT"], "include", config["arch"]] mkconfig["libdirname"] = "builddir" trace_var(:$ruby, posthook) untrace_var(:$extmk, prehook) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/