Skip to content

Commit

Permalink
mkmf.rb: timestamp directory
Browse files Browse the repository at this point in the history
* lib/mkmf.rb (timestamp_file): gather timestamp files in one
  directory from each extension directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Apr 8, 2013
1 parent 53fdb9e commit 46eddae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/mkmf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ def configuration(srcdir)

def timestamp_file(name)
name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"}
"./.#{name}.time"
"$(TIMESTAMP_DIR)/.#{name}.time"
end
# :startdoc:

Expand Down Expand Up @@ -2174,6 +2174,7 @@ def create_makefile(target, srcprefix = nil)
EXTSTATIC = #{$static || ""}
STATIC_LIB = #{staticlib unless $static.nil?}
#{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""}
TIMESTAMP_DIR = #{$extout ? '$(extout)/.timestamp' : '.'}
" #"
# TODO: fixme
install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
Expand Down Expand Up @@ -2267,7 +2268,7 @@ def create_makefile(target, srcprefix = nil)
dirs.unshift(sodir) if target and !dirs.include?(sodir)
dirs.each do |d|
t = timestamp_file(d)
mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) #{d}\n\t$(Q) $(TOUCH) $@\n"
mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n"
end

mfile.print <<-SITEINSTALL
Expand Down

0 comments on commit 46eddae

Please sign in to comment.