mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Make all variables in root target file available to ninja commands
Ideally we would have a section with “public” variables, but that will require making the format more complex, so for now, everything gets declared as a variable in the ninja build file, even though for now, we really just need to export APP_MIN_OS.
This commit is contained in:
@@ -381,9 +381,11 @@ SHELL
|
||||
end
|
||||
|
||||
def to_s
|
||||
width = @variables.map { |key, value| key.length }.max { |lhs, rhs| lhs <=> rhs }
|
||||
res = @variables.map { |key, value| format("%-#{width}s = %s\n", key, value) }.join
|
||||
res << "\n" unless @variables.empty?
|
||||
variables = @context.to_h.merge(@variables)
|
||||
|
||||
width = variables.map { |key, value| key.length }.max { |lhs, rhs| lhs <=> rhs }
|
||||
res = variables.map { |key, value| format("%-#{width}s = %s\n", key, value) }.join
|
||||
res << "\n" unless variables.empty?
|
||||
|
||||
@rules.map do |name, values|
|
||||
flags = values.map { |k, v| " #{k} = #{v}" }.join("\n")
|
||||
|
||||
Reference in New Issue
Block a user