summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-21 03:01:12 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-21 03:01:12 (GMT)
commitbdc6d41640f07d260b66eaaeea38145789227513 (patch)
treef35a75b2fd1550b09cc9aaaff59af047bde85528 /ext/extmk.rb
parent3ca61bb04e668e14da9525a7de3fc1167d1e1859 (diff)
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
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 55b0e7c..e83a0e5 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|