summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-21 02:43:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-21 02:43:25 +0000
commit3ca61bb04e668e14da9525a7de3fc1167d1e1859 (patch)
treef193885db8def39ee1d25909af1c688e04bfda43 /ext/extmk.rb
parent5651313b8556b1a32ee80e33107db2dec74f1ed5 (diff)
exts.mk: refine notes [Feature #13302]
* ext/extmk.rb: split notes into header and footer, which are common, from bodies which are unique for each extensions. * template/exts.mk.tmpl: now each notes are not one line, should not unique. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-xext/extmk.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 9839017..55b0e7c 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -679,6 +679,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.puts
targets = %w[all install static install-so install-rb clean distclean realclean]
targets.each do |tgt|
@@ -720,10 +722,14 @@ begin
mf.puts "\n""note:\n"
unless fails.empty?
abandon = false
- mf.puts %Q<\t@echo "*** Following extensions are not compiled:">
+ mf.puts "note: note-body\n"
+ mf.puts "note-body:: note-header\n"
+ mf.puts "note-header:\n"
+ mf.puts %Q<\t@$(NOTE_MESG) "*** Following extensions are not compiled:">
+ mf.puts "note-body:: note-header\n"
fails.each do |ext, (parent, err)|
abandon ||= mandatory_exts[ext]
- mf.puts %Q<\t@echo "#{ext}:">
+ mf.puts %Q<\t@$(NOTE_NAME) "#{ext}:">
if parent
mf.puts %Q<\t@echo "\tCould not be configured. It will not be installed.">
err and err.scan(/.+/) do |ee|
@@ -734,7 +740,8 @@ begin
mf.puts %Q<\t@echo "\tSkipped because its parent was not configured.">
end
end
- mf.puts %Q<\t@echo "*** Fix the problems, then remove these directories and try again if you want.">
+ mf.puts "note:\n"
+ mf.puts %Q<\t@$(NOTE_MESG) "*** Fix the problems, then remove these directories and try again if you want.">
if abandon
mf.puts "\t""@exit 1"
end