mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fake.rb: optimal paths
* tool/fake.rb: remove redundant dot directories from joined path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b38b57cb54
commit
1587b32480
1 changed files with 4 additions and 3 deletions
|
@ -44,8 +44,9 @@ prehook = proc do |extmk|
|
||||||
builddir = File.join([".."]*pwd.size + dir)
|
builddir = File.join([".."]*pwd.size + dir)
|
||||||
builddir = "." if builddir.empty?
|
builddir = "." if builddir.empty?
|
||||||
end
|
end
|
||||||
|
join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')}
|
||||||
$topdir ||= builddir
|
$topdir ||= builddir
|
||||||
$top_srcdir ||= File.join($topdir, srcdir)
|
$top_srcdir ||= join[$topdir, srcdir]
|
||||||
$extout = '$(topdir)/.ext'
|
$extout = '$(topdir)/.ext'
|
||||||
$extout_prefix = '$(extout)$(target_prefix)/'
|
$extout_prefix = '$(extout)$(target_prefix)/'
|
||||||
config = RbConfig::CONFIG
|
config = RbConfig::CONFIG
|
||||||
|
@ -53,8 +54,8 @@ prehook = proc do |extmk|
|
||||||
mkconfig["builddir"] = config["builddir"] = builddir
|
mkconfig["builddir"] = config["builddir"] = builddir
|
||||||
mkconfig["top_srcdir"] = $top_srcdir if $top_srcdir
|
mkconfig["top_srcdir"] = $top_srcdir if $top_srcdir
|
||||||
config["top_srcdir"] = File.expand_path($top_srcdir ||= top_srcdir)
|
config["top_srcdir"] = File.expand_path($top_srcdir ||= top_srcdir)
|
||||||
config["rubyhdrdir"] = File.join($top_srcdir, "include")
|
config["rubyhdrdir"] = join[$top_srcdir, "include"]
|
||||||
config["rubyarchhdrdir"] = File.join(builddir, config["EXTOUT"], "include", config["arch"])
|
config["rubyarchhdrdir"] = join[builddir, config["EXTOUT"], "include", config["arch"]]
|
||||||
mkconfig["libdirname"] = "builddir"
|
mkconfig["libdirname"] = "builddir"
|
||||||
trace_var(:$ruby, posthook)
|
trace_var(:$ruby, posthook)
|
||||||
untrace_var(:$extmk, prehook)
|
untrace_var(:$extmk, prehook)
|
||||||
|
|
Loading…
Reference in a new issue