update builder messages - close #77
This commit is contained in:
1 parent
658b73e4de
commit
983862a528
20 files changed
+140
-101
No files matched your search
@@ -26,17 +26,18 @@ module Rscons
|
||||
else
|
||||
@vars["_TARGET"] = @target
|
||||
@vars["_SOURCES"] = @sources
|
||||
cmd =
|
||||
case
|
||||
when @sources.first.end_with?(*@env.expand_varref("${LEXSUFFIX}"))
|
||||
"LEX"
|
||||
when @sources.first.end_with?(*@env.expand_varref("${YACCSUFFIX}"))
|
||||
"YACC"
|
||||
else
|
||||
raise "Unknown source file #{@sources.first.inspect} for CFile builder"
|
||||
end
|
||||
case
|
||||
when @sources.first.end_with?(*@env.expand_varref("${LEXSUFFIX}"))
|
||||
cmd = "LEX"
|
||||
message = "Generating lexer"
|
||||
when @sources.first.end_with?(*@env.expand_varref("${YACCSUFFIX}"))
|
||||
cmd = "YACC"
|
||||
message = "Generating parser"
|
||||
else
|
||||
raise "Unknown source file #{@sources.first.inspect} for CFile builder"
|
||||
end
|
||||
command = @env.build_command("${#{cmd}_CMD}", @vars)
|
||||
standard_command("#{cmd} #{@target}", command)
|
||||
standard_command("#{message} from #{Util.short_format_paths(@sources)} => #{@target}", command)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ module Rscons
|
||||
if @vars["CMD_STDOUT"]
|
||||
options[:stdout] = @env.expand_varref("${CMD_STDOUT}", @vars)
|
||||
end
|
||||
standard_command("#{cmd_desc} #{@target}", command, options)
|
||||
standard_command("#{cmd_desc} => #{@target}", command, options)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ module Rscons
|
||||
Ansi.write($stderr, :red, "Error: `#{@target}' already exists and is not a directory", :reset, "\n")
|
||||
false
|
||||
else
|
||||
@env.print_builder_run_message("Directory #{@target}", nil)
|
||||
print_run_message("Creating directory => #{@target}", nil)
|
||||
@cache.mkdir_p(@target)
|
||||
true
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ module Rscons
|
||||
else
|
||||
@vars["_SOURCES"] = @sources
|
||||
command = @env.build_command("${DISASM_CMD}", @vars)
|
||||
standard_command("Disassemble #{target}", command, stdout: @target)
|
||||
standard_command("Disassembling #{Util.short_format_paths(@sources)} => #{target}", command, stdout: @target)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ module Rscons
|
||||
# Check the cache and copy if necessary
|
||||
unless @cache.up_to_date?(dest, :Copy, [src], @env)
|
||||
unless printed_message
|
||||
@env.print_builder_run_message("#{name} #{@target}", nil)
|
||||
message = "#{name} #{Util.short_format_paths(@sources)} => #{@target}"
|
||||
print_run_message(message, nil)
|
||||
printed_message = true
|
||||
end
|
||||
@cache.mkdir_p(File.dirname(dest))
|
||||
|
||||
@@ -27,7 +27,7 @@ module Rscons
|
||||
@vars["_TARGET"] = @target
|
||||
@vars["_SOURCES"] = @objects
|
||||
command = @env.build_command("${ARCMD}", @vars)
|
||||
standard_command("AR #{@target}", command, sources: @objects)
|
||||
standard_command("Building static library archive => #{@target}", command, sources: @objects)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@ module Rscons
|
||||
end.first
|
||||
command = @env.build_command("${#{com_prefix}CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
standard_command("#{com_prefix} #{@target}", command)
|
||||
verb = com_prefix == "AS" ? "Assembling" : "Compiling"
|
||||
message = "#{verb} #{Util.short_format_paths(@sources)}"
|
||||
standard_command(message, command)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ module Rscons
|
||||
@vars["_DEPFILE"] = Rscons.set_suffix(target, env.expand_varref("${DEPFILESUFFIX}", vars))
|
||||
command = @env.build_command("${CPP_CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
standard_command("#{name} #{@target}", command)
|
||||
standard_command("Preprocessing #{Util.short_format_paths(@sources)} => #{@target}", command)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ module Rscons
|
||||
@vars["_SOURCES"] = @objects
|
||||
@vars["LD"] = ld
|
||||
command = @env.build_command("${LDCMD}", @vars)
|
||||
standard_command("LD #{@target}", command, sources: @objects)
|
||||
standard_command("Linking => #{@target}", command, sources: @objects)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ module Rscons
|
||||
@vars["_SOURCES"] = @objects
|
||||
@vars["SHLD"] = ld
|
||||
command = @env.build_command("${SHLDCMD}", @vars)
|
||||
standard_command("SHLD #{@target}", command, sources: @objects)
|
||||
standard_command("Linking => #{@target}", command, sources: @objects)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -80,7 +80,9 @@ module Rscons
|
||||
end.first
|
||||
command = @env.build_command("${#{com_prefix}CMD}", @vars)
|
||||
@env.produces(@target, @vars["_DEPFILE"])
|
||||
standard_command("#{com_prefix} #{@target}", command)
|
||||
verb = com_prefix == "AS" ? "Assembling" : "Compiling"
|
||||
message = "#{verb} #{Util.short_format_paths(@sources)}"
|
||||
standard_command(message, command)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user