summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-07-01 23:19:10 +1000
committer Vas Crabb <vas@vastheman.com>2022-07-01 23:19:10 +1000
commit4b66663afbb13bf8c559d18ea267718646fd9951 (patch)
treee270f02732296e3bcc0286bd9b9f2d939419e488 /scripts
parentf04d9d605c2bea16c2b8fc4cd5d32cd7e55839d4 (diff)
Allow leaving off the src/<target>/ prefix in SOURCES=
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index cef42ece7cb..22819137658 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -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