Flag fields containing command lines and expand tokens during baking
This commit is contained in:
parent
5d327279cc
commit
d645ba7c8f
@ -68,6 +68,7 @@
|
||||
scope = { "config", "rule" },
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
api.alias("buildcommands", "buildCommands")
|
||||
@ -128,6 +129,7 @@
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
|
||||
@ -572,6 +574,7 @@
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
@ -586,6 +589,7 @@
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
@ -600,6 +604,7 @@
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
@ -620,6 +625,7 @@
|
||||
scope = "config",
|
||||
kind = "list:string",
|
||||
tokens = true,
|
||||
commands = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
|
@ -203,10 +203,11 @@
|
||||
end
|
||||
end
|
||||
|
||||
if #prj.prebuildcommands > 0 or #prj.postbuildcommands > 0 then
|
||||
local cfg = project.getfirstconfig(prj)
|
||||
if #cfg.prebuildcommands > 0 or #cfg.postbuildcommands > 0 then
|
||||
_p(1,'<PropertyGroup>')
|
||||
output("Pre", prj.prebuildcommands)
|
||||
output("Post", prj.postbuildcommands)
|
||||
output("Pre", cfg.prebuildcommands)
|
||||
output("Post", cfg.postbuildcommands)
|
||||
_p(1,'</PropertyGroup>')
|
||||
end
|
||||
end
|
||||
|
@ -489,6 +489,13 @@
|
||||
ctx.location = ctx.location or prj.location
|
||||
context.basedir(ctx, ctx.location)
|
||||
|
||||
-- Translate any tokens in command line fields
|
||||
for f in p.field.each() do
|
||||
if f.commands then
|
||||
ctx[f.name] = os.translateCommand(ctx[f.name])
|
||||
end
|
||||
end
|
||||
|
||||
-- Fill in a few calculated for the configuration, including the long
|
||||
-- and short names and the build and link target.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user