Allow leaving off the src/<target>/ prefix in SOURCES=

This commit is contained in:
Vas Crabb 2022-07-01 23:19:10 +10:00
parent f04d9d605c
commit 4b66663afb

View File

@ -1436,7 +1436,11 @@ if _OPTIONS["SOURCES"] ~= nil then
for word in string.gmatch(str, '([^,]+)') do
local fullpath = path.join(MAME_DIR, word)
if (not os.isfile(fullpath)) and (not os.isdir(fullpath)) then
error("File/directory " .. word .. " does not exist")
word = path.join("src", _OPTIONS["target"], word)
fullpath = path.join(MAME_DIR, word)
if (not os.isfile(fullpath)) and (not os.isdir(fullpath)) then
error("File/directory " .. word .. " does not exist")
end
end
sourceargs = sourceargs .. " " .. word
end