summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-02 19:18:13 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-03-02 19:18:13 +0900
commit72811deaa8be9101e2be7533118f136cef78dbb4 (patch)
tree67bec4e7482188974344e44ae014324f8e0d9ffe /ext
parent14355dde831b4988eee2f9a63defc30d29116fb8 (diff)
downloadruby-72811deaa8be9101e2be7533118f136cef78dbb4.tar.gz
MSWin: Use MESSAGE_BEGIN/MESSAGE_END instead of bare `echo`
To strip enclosing double quotes.
Diffstat (limited to 'ext')
-rwxr-xr-xext/extmk.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index cab9a519c1..d6a4b80bf7 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -764,6 +764,13 @@ begin
mf.macro "NOTE_MESG", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb skip]
mf.macro "NOTE_NAME", %w[$(RUBY) $(top_srcdir)/tool/lib/colorize.rb fail]
%w[RM RMDIRS RMDIR RMALL].each {|w| mf.macro w, [RbConfig::CONFIG[w]]}
+ if $nmake
+ message = ['@(for %I in (', ') do @echo.%~I)']
+ else
+ message = ['@for line in', '; do echo "$$line"; done']
+ end
+ mf.macro "MESSAGE_BEGIN", [message.first]
+ mf.macro "MESSAGE_END", [message.last]
mf.puts
targets = %w[all install static install-so install-rb clean distclean realclean]
targets.each do |tgt|
@@ -826,15 +833,17 @@ begin
fails.each do |ext, (parent, err)|
abandon ||= mandatory_exts[ext]
mf.puts %Q<\t@$(NOTE_NAME) "#{ext}:">
+ mf.puts "\t$(MESSAGE_BEGIN) \\"
if parent
- mf.puts %Q<\t@echo "\tCould not be configured. It will not be installed.">
+ mf.puts %Q<\t"\tCould not be configured. It will not be installed." \\>
err and err.scan(/.+/) do |ee|
- mf.puts %Q<\t@echo "\t#{ee.gsub(/["`$^]/, '\\\\\\&')}">
+ mf.puts %Q<\t"\t#{ee.gsub(/["`$^]/, '\\\\\\&')}" \\>
end
- mf.puts %Q<\t@echo "\tCheck #{ext_prefix}/#{ext}/mkmf.log for more details.">
+ mf.puts %Q<\t"\tCheck #{ext_prefix}/#{ext}/mkmf.log for more details." \\>
else
- mf.puts %Q<\t@echo "\tSkipped because its parent was not configured.">
+ mf.puts %Q<\t"\tSkipped because its parent was not configured." \\>
end
+ mf.puts "\t$(MESSAGE_END)"
end
mf.puts "note:\n"
mf.puts %Q<\t@$(NOTE_MESG) "*** Fix the problems, then remove these directories and try again if you want.">