diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-14 05:42:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-14 05:42:14 +0000 |
commit | d1e6304a891fc5e9cc63e50520bdc798fb95b829 (patch) | |
tree | e31b2a18d929f8707d3168f73cdfb1d75363ad8a /tool | |
parent | 4fc656a2f331a91a71208d5a426fce951fa5ca82 (diff) | |
download | ruby-d1e6304a891fc5e9cc63e50520bdc798fb95b829.tar.gz |
Prefer relative directory from srcdir to top_srcdir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/update-deps | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tool/update-deps b/tool/update-deps index 9a200bf4da..4aaf812430 100755 --- a/tool/update-deps +++ b/tool/update-deps @@ -211,8 +211,9 @@ def in_makefile(target, source) end ["enc/depend", target2, source2] when %r{\Aext/} - unless File.exist?("#{File.dirname(target)}/extconf.rb") - warn "warning: not found: #{File.dirname(target)}/extconf.rb" + targetdir = File.dirname(target) + unless File.exist?("#{targetdir}/extconf.rb") + warn "warning: not found: #{targetdir}/extconf.rb" end target2 = File.basename(target) relpath = Pathname(source).relative_path_from(Pathname(target).dirname).to_s @@ -224,8 +225,9 @@ def in_makefile(target, source) when *FILES_SAME_NAME_TOP then source2 = "$(top_srcdir)/#{source}" when %r{\A\.ext/include/[^/]+/ruby/} then source2 = "$(arch_hdrdir)/ruby/#{$'}" when %r{\Ainclude/} then source2 = "$(hdrdir)/#{$'}" - when %r{\A#{Regexp.escape File.dirname(target)}/extconf\.h\z} then source2 = "$(RUBY_EXTCONF_H)" - when %r{\A#{Regexp.escape File.dirname(target)}/} then source2 = $' + when %r{\A#{Regexp.escape targetdir}/extconf\.h\z} then source2 = "$(RUBY_EXTCONF_H)" + when %r{\A#{Regexp.escape targetdir}/} then source2 = $' + when %r{\A#{Regexp.escape File.dirname(targetdir)}/} then source2 = "$(srcdir)/../#{$'}" else source2 = "$(top_srcdir)/#{source}" end ["#{File.dirname(target)}/depend", target2, source2] |