ruby-changes:41376
From: nobu <ko1@a...>
Date: Thu, 7 Jan 2016 12:06:58 +0900 (JST)
Subject: [ruby-changes:41376] nobu:r53448 (trunk): mkmf.rb: library installation messages
nobu 2016-01-07 12:06:58 +0900 (Thu, 07 Jan 2016) New Revision: 53448 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53448 Log: mkmf.rb: library installation messages * lib/mkmf.rb (configuration, dummy_makefile, create_makefile): show library installation messages only when any files need to be updated. Modified files: trunk/ext/extmk.rb trunk/ext/ripper/depend trunk/lib/mkmf.rb Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 53447) +++ lib/mkmf.rb (revision 53448) @@ -1895,8 +1895,8 @@ SHELL = /bin/sh https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L1895 V = 0 Q1 = $(V:1=) Q = $(Q1:0=@) -ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) -ECHO = $(ECHO1:0=@echo) +ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']}) +ECHO = $(ECHO1:0=@ echo) NULLCMD = #{CONFIG['NULLCMD']} #### Start of system configuration section. #### @@ -2040,6 +2040,7 @@ CLEANFILES = #{$cleanfiles.join(' ')} https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2040 DISTCLEANFILES = #{$distcleanfiles.join(' ')} all install static install-so install-rb: Makefile + @$(NULLCMD) .PHONY: all install static install-so install-rb .PHONY: clean clean-so clean-static clean-rb @@ -2339,10 +2340,12 @@ static: #{$extmk && !$static ? "all" : " https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2340 else mfile.puts "Makefile" end - mfile.print("install-rb: pre-install-rb install-rb-default\n") - mfile.print("install-rb-default: pre-install-rb-default\n") + mfile.print("install-rb: pre-install-rb do-install-rb install-rb-default\n") + mfile.print("install-rb-default: pre-install-rb-default do-install-rb-default\n") mfile.print("pre-install-rb: Makefile\n") mfile.print("pre-install-rb-default: Makefile\n") + mfile.print("do-install-rb:\n") + mfile.print("do-install-rb-default:\n") for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]] files = install_files(mfile, i, nil, srcprefix) or next for dir, *files in files @@ -2352,7 +2355,7 @@ static: #{$extmk && !$static ? "all" : " https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2355 end for f in files dest = "#{dir}/#{File.basename(f)}" - mfile.print("install-rb#{sfx}: #{dest}\n") + mfile.print("do-install-rb#{sfx}: #{dest}\n") mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n") mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D)\n") if defined?($installed_list) and !$extout @@ -2368,7 +2371,13 @@ static: #{$extmk && !$static ? "all" : " https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2371 if files.empty? mfile.print("\t@$(NULLCMD)\n") else - mfile.print("\t$(ECHO) installing#{sfx.sub(/^-/, " ")} #{target} libraries\n") + q = "$(MAKE) -q do-install-rb#{sfx}" + if $nmake + mfile.print "!if \"$(Q)\" == \"@\"\n\t@#{q} || \\\n!endif\n\t" + else + mfile.print "\t$(Q:@=@#{q} || )" + end + mfile.print "$(ECHO:@=) installing#{sfx.sub(/^-/, " ")} #{target} libraries\n" end if $extout dirs.uniq! Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 53447) +++ ext/extmk.rb (revision 53448) @@ -89,7 +89,7 @@ def extract_makefile(makefile, keep = tr https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L89 return keep end installrb = {} - m.scan(/^install-rb-default:.*[ \t](\S+)(?:[ \t].*)?\n\1:[ \t]*(\S+)/) {installrb[$2] = $1} + m.scan(/^(?:do-)?install-rb-default:.*[ \t](\S+)(?:[ \t].*)?\n\1:[ \t]*(\S+)/) {installrb[$2] = $1} oldrb = installrb.keys.sort newrb = install_rb(nil, "").collect {|d, *f| f}.flatten.sort if target_prefix = m[/^target_prefix[ \t]*=[ \t]*\/(.*)/, 1] Index: ext/ripper/depend =================================================================== --- ext/ripper/depend (revision 53447) +++ ext/ripper/depend (revision 53448) @@ -24,9 +24,12 @@ ripper.y: $(srcdir)/tools/preproc.rb $(t https://github.com/ruby/ruby/blob/trunk/ext/ripper/depend#L24 $(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@ $(Q) $(RM) ripper.tmp.y -check: $(GEN) $(SRC1) $(SRC2) +check: .eventids2.check + +.eventids2.check: $(GEN) $(SRC1) $(SRC2) $(ECHO) checking $(SRC1) and $(SRC2) $(Q) $(RUBY) $(GEN) --mode=check --ids1src=$(SRC1) --ids2src=$(SRC2) + @exit > $@ eventids1.c: $(srcdir)/tools/generate.rb $(SRC1) $(ECHO) generating $@ from $(SRC1) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/