diff options
Diffstat (limited to 'tool/update-deps')
-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] |