summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-01 07:02:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-01 07:02:32 +0000
commitcea6c9d2f548d3fea8af0d912306b271d7ec8001 (patch)
tree22d299c7e3a6afcc5acae65e8ce4851b3a441ade
parentc929094b31e1a59d7a752dabb0c0d2388638541b (diff)
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
-rw-r--r--lib/mkmf.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index ae0974670c..8eb2b29ba5 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -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 ? ".-." : "_"}