Skip to content

Commit

Permalink
mkmf.rb: architecture timestamp directories
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Sep 1, 2016
1 parent c929094 commit cea6c9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/mkmf.rb
Expand Up @@ -2019,12 +2019,13 @@ def configuration(srcdir)
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 ? ".-." : "_"}
Expand Down

0 comments on commit cea6c9d

Please sign in to comment.