diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 02:41:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 02:41:31 +0000 |
commit | 506b45db9c929e37a22d6fb8c41103220438258f (patch) | |
tree | e368790d1d218617b2ab7caa302246d638e08c85 /lib | |
parent | d484b0a3b863d9ee61e3a9b6825f604aa06f845a (diff) | |
download | ruby-506b45db9c929e37a22d6fb8c41103220438258f.tar.gz |
mkmf.rb: separate timestamp files
* lib/mkmf.rb (timestamp_file): separate timestamp files for each
architectures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index db461ad07d..c20e431978 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2028,15 +2028,16 @@ preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''} end def timestamp_file(name, target_prefix = nil) - if target_prefix - pat = [] - install_dirs.each do |n, d| - pat << n if /\$\(target_prefix\)\z/ =~ d - end - name = name.gsub(/\$\((#{pat.join("|")})\)/) {$&+target_prefix} - end + pat = {} + 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!(/(\$\((?:site)?arch\))\/*/, '') + arch = $1 || '' name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"} - "$(TIMESTAMP_DIR)/.#{name}.time" + File.join("$(TIMESTAMP_DIR)", arch, "#{name.sub(/\A(?=.)/, '.')}.time") end # :startdoc: |