diff options
Diffstat (limited to 'docs/release/scripts/genie.lua')
-rw-r--r-- | docs/release/scripts/genie.lua | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/docs/release/scripts/genie.lua b/docs/release/scripts/genie.lua index 7a4668e7d14..e905e3b6aef 100644 --- a/docs/release/scripts/genie.lua +++ b/docs/release/scripts/genie.lua @@ -386,6 +386,11 @@ newoption { description = "Produce WebAssembly output when building with Emscripten.", } +newoption { + trigger = "PROJECT", + description = "Select projects to be built. Will look into project folder for files.", +} + dofile ("extlib.lua") if _OPTIONS["SHLIB"]=="1" then @@ -516,7 +521,14 @@ msgprecompile ("Precompiling $(subst ../,,$<)...") messageskip { "SkipCreatingMessage", "SkipBuildingMessage", "SkipCleaningMessage" } -if (_OPTIONS["SOURCES"] == nil) then +if (_OPTIONS["PROJECT"] ~= nil) then + PROJECT_DIR = path.join(path.getabsolute(".."),"projects",_OPTIONS["PROJECT"]) .. "/" + if (not os.isfile(path.join("..", "projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then + error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") + end + dofile (path.join(".." ,"projects", _OPTIONS["PROJECT"], "scripts", "target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua")) +end +if (_OPTIONS["SOURCES"] == nil and _OPTIONS["PROJECT"] == nil) then if (not os.isfile(path.join("target", _OPTIONS["target"],_OPTIONS["subtarget"] .. ".lua"))) then error("File definition for TARGET=" .. _OPTIONS["target"] .. " SUBTARGET=" .. _OPTIONS["subtarget"] .. " does not exist") end @@ -1305,6 +1317,13 @@ configuration { "Debug", "gmake" } configuration { } if (_OPTIONS["SOURCES"] ~= nil) then + local str = _OPTIONS["SOURCES"] + for word in string.gmatch(str, '([^,]+)') do + if (not os.isfile(path.join(MAME_DIR ,word))) then + print("File " .. word.. " does not exist") + os.exit() + end + end OUT_STR = os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " target " .. _OPTIONS["subtarget"]) load(OUT_STR)() os.outputof( PYTHON .. " " .. MAME_DIR .. "scripts/build/makedep.py " .. MAME_DIR .. " " .. _OPTIONS["SOURCES"] .. " drivers " .. _OPTIONS["subtarget"] .. " > ".. GEN_DIR .. _OPTIONS["target"] .. "/" .. _OPTIONS["subtarget"]..".flt") |