mirror of
https://github.com/xenia-project/premake-core.git
synced 2025-02-18 18:58:43 +00:00
commit
f46a27ec6e
@ -231,6 +231,8 @@
|
||||
|
||||
utility.elements.configuration = function(cfg)
|
||||
return {
|
||||
utility.bindirs,
|
||||
utility.exepaths,
|
||||
gmake2.settings,
|
||||
gmake2.preBuildCmds,
|
||||
gmake2.preLinkCmds,
|
||||
@ -247,6 +249,21 @@
|
||||
end
|
||||
|
||||
|
||||
function utility.bindirs(cfg, toolset)
|
||||
local dirs = project.getrelative(cfg.project, cfg.bindirs)
|
||||
if #dirs > 0 then
|
||||
p.outln('EXECUTABLE_PATHS = "' .. table.concat(dirs, ":") .. '"')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function utility.exepaths(cfg, toolset)
|
||||
local dirs = project.getrelative(cfg.project, cfg.bindirs)
|
||||
if #dirs > 0 then
|
||||
p.outln('EXE_PATHS = PATH=$(EXECUTABLE_PATHS):$$PATH;')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Write out the file sets.
|
||||
@ -365,7 +382,7 @@
|
||||
function utility.outputFileRules(cfg, file)
|
||||
local outputs = table.concat(file.buildoutputs, ' ')
|
||||
|
||||
local dependencies = file.source
|
||||
local dependencies = p.esc(file.source)
|
||||
if file.buildinputs and #file.buildinputs > 0 then
|
||||
dependencies = dependencies .. " " .. table.concat(p.esc(file.buildinputs), " ")
|
||||
end
|
||||
@ -379,7 +396,11 @@
|
||||
if file.buildcommands then
|
||||
local cmds = os.translateCommandsAndPaths(file.buildcommands, cfg.project.basedir, cfg.project.location)
|
||||
for _, cmd in ipairs(cmds) do
|
||||
_p('\t$(SILENT) %s', cmd)
|
||||
if cfg.bindirs and #cfg.bindirs > 0 then
|
||||
_p('\t$(SILENT) $(EXE_PATHS) %s', cmd)
|
||||
else
|
||||
_p('\t$(SILENT) %s', cmd)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user