зеркало из https://github.com/github/ruby.git
mkmf.rb: architecture timestamp directories
* lib/mkmf.rb (timestamp_file): substitute TARGET_SO_DIR with RUBYARCHDIR seprately from other normal paths, to make timestamp files for architecture dependent directories separately. and remove RUBYCOMMONDIR prefix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c929094b31
Коммит
cea6c9d2f5
|
@ -2019,12 +2019,13 @@ preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''}
|
|||
end
|
||||
|
||||
def timestamp_file(name, target_prefix = nil)
|
||||
pat = {'TARGET_SO_DIR'=>'$(RUBYARCHDIR)'}
|
||||
pat = {}
|
||||
name = '$(RUBYARCHDIR)' if name == '$(TARGET_SO_DIR)'
|
||||
install_dirs.each do |n, d|
|
||||
pat[n] = $` if /\$\(target_prefix\)\z/ =~ d
|
||||
end
|
||||
name = name.gsub(/\$\((#{pat.keys.join("|")})\)/) {pat[$1]+target_prefix}
|
||||
name.sub!(/\A\$\(extout\)\//, '')
|
||||
name.sub!(/\A\$\((?:extout|RUBYCOMMONDIR)\)\/*/, '')
|
||||
name.sub!(/(\$\((?:site)?arch\))\/*/, '')
|
||||
arch = $1 || ''
|
||||
name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"}
|
||||
|
|
Загрузка…
Ссылка в новой задаче