Skip to content

Commit

Permalink
merge revision(s) 36815,36816,36818,37414,37426,37427: [Backport #7217]
Browse files Browse the repository at this point in the history
Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
	  special character of NMAKE and BSD make.  [Bug #7265]

Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
	  make special character.

Thu Nov  8 14:16:53 2012  Nobuyoshi Nakada  <nobu@ruby-lang.org>

	* lib/mkmf.rb (create_makefile): use timestamp for destination
	  directories to make them before making or copying files there.
	  [ruby-dev:46067] [Bug #6904]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Nov 8, 2012
1 parent b5a6ad3 commit 5839603
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 10 deletions.
16 changes: 16 additions & 0 deletions ChangeLog
@@ -1,3 +1,19 @@
Thu Nov 8 14:16:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* lib/mkmf.rb (MakeMakefile#timestamp_file): use .-. instead of !, a
special character of NMAKE and BSD make. [Bug #7265]

Thu Nov 8 14:16:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* lib/mkmf.rb (MakeMakefile#timestamp_file): use ! instead of %, a GNU
make special character.

Thu Nov 8 14:16:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* lib/mkmf.rb (create_makefile): use timestamp for destination
directories to make them before making or copying files there.
[ruby-dev:46067] [Bug #6904]

Thu Nov 8 14:13:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* configure.in (visibility_option): visibility attribute is not
Expand Down
30 changes: 21 additions & 9 deletions lib/mkmf.rb
Expand Up @@ -1726,6 +1726,7 @@ def configuration(srcdir)
INSTALL_PROG = #{config_string('INSTALL_PROG') || '$(INSTALL) -m 0755'}
INSTALL_DATA = #{config_string('INSTALL_DATA') || '$(INSTALL) -m 0644'}
COPY = #{config_string('CP', &possible_command) || '@$(RUBY) -run -e cp -- -v'}
TOUCH = exit >
#### End of system configuration section. ####
Expand All @@ -1742,6 +1743,11 @@ def configuration(srcdir)
end
mk
end

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

# creates a stub Makefile.
Expand Down Expand Up @@ -2003,18 +2009,20 @@ def create_makefile(target, srcprefix = nil)
if target
f = "$(DLLIB)"
dest = "#{dir}/#{f}"
mfile.puts dir, "install-so: #{dest}"
mfile.puts dest
if $extout
mfile.print "clean-so::\n"
mfile.print "\t@-$(RM) #{fseprepl[dest]}\n"
mfile.print "\t@-$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n"
mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]}\n"
mfile.print "\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n"
else
mfile.print "#{dest}: #{f}\n\t@-$(MAKEDIRS) $(@D#{sep})\n"
mfile.print "#{dest}: #{f}\n\t-$(Q)$(MAKEDIRS) $(@D#{sep})\n"
mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} $(@D#{sep})\n"
if defined?($installed_list)
mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
end
end
mfile.print "clean-static::\n"
mfile.print "\t-$(Q)$(RM) $(STATIC_LIB)\n"
else
mfile.puts "Makefile"
end
Expand All @@ -2027,7 +2035,7 @@ def create_makefile(target, srcprefix = nil)
for dir, *files in files
unless dirs.include?(dir)
dirs << dir
mfile.print "pre-install-rb#{sfx}: #{dir}\n"
mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir)}\n"
end
for f in files
dest = "#{dir}/#{File.basename(f)}"
Expand Down Expand Up @@ -2056,7 +2064,10 @@ def create_makefile(target, srcprefix = nil)
end
end
dirs.unshift(sodir) if target and !dirs.include?(sodir)
dirs.each {|d| mfile.print "#{d}:\n\t$(Q) $(MAKEDIRS) $@\n"}
dirs.each do |d|
t = timestamp_file(d)
mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) #{d}\n\t$(Q) $(TOUCH) $@\n"
end

mfile.print <<-SITEINSTALL
Expand Down Expand Up @@ -2089,10 +2100,11 @@ def create_makefile(target, srcprefix = nil)
mfile.print "$(RUBYARCHDIR)/" if $extout
mfile.print "$(DLLIB): "
mfile.print "$(DEFFILE) " if makedef
mfile.print "$(OBJS) Makefile\n"
mfile.print "$(OBJS) Makefile"
mfile.print " #{timestamp_file('$(RUBYARCHDIR)')}" if $extout
mfile.print "\n"
mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
mfile.print "\t@-$(RM) $(@#{sep})\n"
mfile.print "\t@-$(MAKEDIRS) $(@D)\n" if $extout
mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"
link_so = LINK_SO.gsub(/^/, "\t$(Q) ")
if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===))
link_so = link_so.sub(/\bLDSHARED\b/, '\&XX')
Expand Down
2 changes: 1 addition & 1 deletion version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
#define RUBY_PATCHLEVEL 309
#define RUBY_PATCHLEVEL 310

#define RUBY_RELEASE_DATE "2012-11-08"
#define RUBY_RELEASE_YEAR 2012
Expand Down

0 comments on commit 5839603

Please sign in to comment.