From bdc6d41640f07d260b66eaaeea38145789227513 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 21 Apr 2017 03:01:12 +0000 Subject: ext/extmk.rb: colorize notes [Feature #13302] * common.mk (build-ext): pass variables to colorize. * ext/extmk.rb: colorize notes with tool/colorize.rb. * tool/colorize.rb: extract from tool/generic_erb.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'ext/extmk.rb') diff --git a/ext/extmk.rb b/ext/extmk.rb index 55b0e7c83c..e83a0e5d8c 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -411,12 +411,15 @@ elsif sep = config_string('BUILD_FILE_SEPARATOR') else $ruby = '$(topdir)/miniruby' + EXEEXT end -$ruby << " -I'$(topdir)'" +$ruby = [$ruby] +$ruby << "-I'$(topdir)'" unless CROSS_COMPILING - $ruby << " -I'$(top_srcdir)/lib'" - $ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout + $ruby << "-I'$(top_srcdir)/lib'" + $ruby << "-I'$(extout)/$(arch)'" << "-I'$(extout)/common'" if $extout ENV["RUBYLIB"] = "-" end +topruby = $ruby +$ruby = topruby.join(' ') $mflags << "ruby=#$ruby" MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)} @@ -658,6 +661,8 @@ begin puts end + mf.macro "ruby", topruby + mf.macro "RUBY", ["$(ruby)"] mf.macro "extensions", exts mf.macro "EXTOBJS", $extlist.empty? ? ["dmyext.#{$OBJEXT}"] : ["ext/extinit.#{$OBJEXT}", *$extobjs] mf.macro "EXTLIBS", $extlibs @@ -679,8 +684,8 @@ begin submakeopts << 'UPDATE_LIBRARIES="$(UPDATE_LIBRARIES)"' submakeopts << 'SHOWFLAGS=' mf.macro "SUBMAKEOPTS", submakeopts - mf.macro "NOTE_MESG", %w[echo] - mf.macro "NOTE_NAME", %w[echo] + mf.macro "NOTE_MESG", %w[$(RUBY) $(top_srcdir)/tool/colorize.rb skip] + mf.macro "NOTE_NAME", %w[$(RUBY) $(top_srcdir)/tool/colorize.rb fail] mf.puts targets = %w[all install static install-so install-rb clean distclean realclean] targets.each do |tgt| -- cgit v1.2.3