diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-01 07:02:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-01 07:02:32 +0000 |
commit | cd2d61be00748ee28cd9c46d2336c0ae61495197 (patch) | |
tree | 22d299c7e3a6afcc5acae65e8ce4851b3a441ade | |
parent | 29530757d471c786afa57c2bd147e2fe6dcde7dd (diff) | |
download | ruby-cd2d61be00748ee28cd9c46d2336c0ae61495197.tar.gz |
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.rb | 5 |
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 ? ".-." : "_"} |