summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-06-30 00:37:49 +1000
committer Vas Crabb <vas@vastheman.com>2022-06-30 00:37:49 +1000
commitc51c443be11b4069b36c80dccd4960808d649227 (patch)
tree7138ec74c7a4d024ff8e037df2d0640a7bc18553 /scripts
parentda028cd724b3c50c6493b1b3fa6301268646ff65 (diff)
-Added support for directory names in SOURCES=
-Retired the messshared project (combined with shared). -bus/nubus: Added table of video modes for Mac monitor sense values.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/makedep.py29
-rw-r--r--scripts/genie.lua5
-rw-r--r--scripts/target/mame/mame.lua8
3 files changed, 24 insertions, 18 deletions
diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py
index 18da0a2981e..07406423ff2 100755
--- a/scripts/build/makedep.py
+++ b/scripts/build/makedep.py
@@ -722,7 +722,7 @@ def scan_source_dependencies(root, sources):
parser = CppParser(handler)
seen = set('/'.join(x for x in split_path(source) if x) for source in sources)
remaining = list([(x, 0) for x in seen])
- default_roots = ((('src', 'devices'), 0), (('src', 'mame', 'shared'), 0), (('src', 'mame', 'messshared'), 0), (('src', 'lib'), 0))
+ default_roots = ((('src', 'devices'), 0), (('src', 'mame', 'shared'), 0), (('src', 'lib'), 0))
while remaining:
source, depth = remaining.pop()
components = tuple(source.split('/'))
@@ -768,7 +768,6 @@ def write_project(options, projectfile, mappings, sources, single):
' MAME_DIR .. "src/emu",\n' \
' MAME_DIR .. "src/devices",\n' \
' MAME_DIR .. "src/mame/shared",\n' \
- ' MAME_DIR .. "src/mame/messshared",\n' \
' MAME_DIR .. "src/lib",\n' \
' MAME_DIR .. "src/lib/util",\n' \
' MAME_DIR .. "src/lib/netlist",\n' \
@@ -821,7 +820,6 @@ def write_project(options, projectfile, mappings, sources, single):
' MAME_DIR .. "src/emu",\n' \
' MAME_DIR .. "src/devices",\n' \
' MAME_DIR .. "src/mame/shared",\n' \
- ' MAME_DIR .. "src/mame/messshared",\n' \
' MAME_DIR .. "src/lib",\n' \
' MAME_DIR .. "src/lib/util",\n' \
' MAME_DIR .. "src/lib/netlist",\n' \
@@ -839,12 +837,10 @@ def write_project(options, projectfile, mappings, sources, single):
'function linkProjects_mame_%s(_target, _subtarget)\n' \
' links {\n' % (options.target, ))
for lib in libnames:
- if (lib != 'shared') and (lib != 'messshared'):
+ if lib != 'shared':
projectfile.write(' "%s",\n' % (lib, ))
if 'shared' in libraries:
projectfile.write(' "shared",\n')
- if 'messshared' in libraries:
- projectfile.write(' "messshared",\n')
projectfile.write(
' }\n' \
'end\n' \
@@ -861,12 +857,29 @@ def write_project(options, projectfile, mappings, sources, single):
projectfile.write('end\n')
+def collect_sources(root, sources):
+ result = [ ]
+ for source in sources:
+ fullpath = os.path.join(root, source)
+ if os.path.isdir(fullpath):
+ for subdir, dirs, files in os.walk(fullpath):
+ for candidate in files:
+ if os.path.splitext(candidate)[1] == '.cpp':
+ if subdir != fullpath:
+ result.append(os.path.join(source, os.path.relpath(subdir, fullpath), candidate))
+ else:
+ result.append(os.path.join(source, candidate))
+ else:
+ result.append(source)
+ return result
+
+
def write_filter(options, filterfile):
sources = set()
DriverFilter().parse_list(options.list, lambda n: sources.add(n), lambda n: None)
drivers = set()
- for source in options.sources:
+ for source in collect_sources(options.root, options.sources):
components = tuple(x for x in split_path(source) if x)
if (len(components) > 3) and (components[:2] == ('src', 'mame')):
ext = os.path.splitext(components[-1])[1].lower()
@@ -881,7 +894,7 @@ if __name__ == '__main__':
options = parse_command_line()
if options.command == 'sourcesproject':
header_to_optional = collect_lua_directives(options)
- source_dependencies = scan_source_dependencies(options.root, options.sources)
+ source_dependencies = scan_source_dependencies(options.root, collect_sources(options.root, options.sources))
write_project(options, sys.stdout, header_to_optional, source_dependencies, True)
elif options.command == 'filterproject':
header_to_optional = collect_lua_directives(options)
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 6a3eca5014e..cef42ece7cb 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1434,8 +1434,9 @@ if _OPTIONS["SOURCES"] ~= nil then
local str = _OPTIONS["SOURCES"]
local sourceargs = ""
for word in string.gmatch(str, '([^,]+)') do
- if not os.isfile(path.join(MAME_DIR, word)) then
- error("File " .. word .. " does not exist")
+ 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")
end
sourceargs = sourceargs .. " " .. word
end
diff --git a/scripts/target/mame/mame.lua b/scripts/target/mame/mame.lua
index c92e9c651ed..2a47c1ac1d4 100644
--- a/scripts/target/mame/mame.lua
+++ b/scripts/target/mame/mame.lua
@@ -1603,7 +1603,6 @@ function linkProjects_mame_mame(_target, _subtarget)
"zpa",
"zvt",
"shared", -- must stay near the end
- "messshared", -- must stay near the end
}
end
@@ -1621,7 +1620,6 @@ function createMAMEProjects(_target, _subtarget, _name)
MAME_DIR .. "src/emu",
MAME_DIR .. "src/devices",
MAME_DIR .. "src/mame/shared",
- MAME_DIR .. "src/mame/messshared",
MAME_DIR .. "src/lib",
MAME_DIR .. "src/lib/util",
MAME_DIR .. "3rdparty",
@@ -1653,12 +1651,6 @@ files {
MAME_DIR .. "src/mame/shared/*.cpp",
}
-createMAMEProjects(_target, _subtarget, "messshared")
-files {
- MAME_DIR .. "src/mame/messshared/*.h",
- MAME_DIR .. "src/mame/messshared/*.cpp",
-}
-
--------------------------------------------------
-- manufacturer-specific groupings for drivers
--------------------------------------------------