diff options
author | 2016-12-08 11:46:15 +0100 | |
---|---|---|
committer | 2016-12-08 11:46:15 +0100 | |
commit | 124f30dbbc30b0153e1070a5db09e577b4af1919 (patch) | |
tree | 3f6c0a86c6e63ac971cb3436b2911a5099be687b /scripts/genie.lua | |
parent | 3408ed0ae5525882f35e0f796e6d6c17e12fe849 (diff) |
Enable building projects that are separate of MAME but use same core and lives in separate git tree (nw)
Diffstat (limited to 'scripts/genie.lua')
-rw-r--r-- | scripts/genie.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua index 7a4668e7d14..653c8b69e37 100644 --- a/scripts/genie.lua +++ b/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 |