Expand {...} macros in pre|post build commands for codelite
function m.preBuild(cfg)
if #cfg.prebuildcommands > 0 then
_p(3, '<PreBuild>')
- for _, commands in ipairs(cfg.prebuildcommands) do
+ local commands = os.translateCommandsAndPaths(cfg.prebuildcommands, cfg.project.basedir, cfg.project.location)
+ for _, command in ipairs(commands) do
_x(4, '<Command Enabled="yes">%s</Command>',
- p.esc(commands))
+ p.esc(command))
end
_p(3, '</PreBuild>')
end
function m.postBuild(cfg)
if #cfg.postbuildcommands > 0 then
_p(3, '<PostBuild>')
- for _, commands in ipairs(cfg.postbuildcommands) do
+ local commands = os.translateCommandsAndPaths(cfg.postbuildcommands, cfg.project.basedir, cfg.project.location)
+ for _, command in ipairs(commands) do
_x(4, '<Command Enabled="yes">%s</Command>',
- p.esc(commands))
+ p.esc(command))
end
_p(3, '</PostBuild>')
end
