diff options
author | 2016-04-27 18:59:40 +1000 | |
---|---|---|
committer | 2016-04-27 18:59:40 +1000 | |
commit | bcd8558b02cb54eab92df98f14bf07221d6d358b (patch) | |
tree | c29211cecf250a791c074dfc3e1fc9a2d9a1a593 /docs/release/scripts/build/makedep.py | |
parent | 0d70c1f8cdb9e66fd7bc5bcad128e394a2345607 (diff) |
0.173 Release Fileshbmame173
Diffstat (limited to 'docs/release/scripts/build/makedep.py')
-rw-r--r-- | docs/release/scripts/build/makedep.py | 71 |
1 files changed, 7 insertions, 64 deletions
diff --git a/docs/release/scripts/build/makedep.py b/docs/release/scripts/build/makedep.py index a80582d0161..2ce47d42cd0 100644 --- a/docs/release/scripts/build/makedep.py +++ b/docs/release/scripts/build/makedep.py @@ -167,45 +167,10 @@ def parse_file(root, srcfile, folder): return 0 def parse_file_for_drivers(root, srcfile): - try: - fp = open(root + srcfile, 'r') - except IOError: - sys.stderr.write("Unable to open source file '%s'\n" % srcfile) - return 1 - in_comment = 0 - linenum = 0 - for line in fp.readlines(): - content = '' - linenum+=1 - srcptr = 0 - while srcptr < len(line): - c = line[srcptr] - srcptr+=1 - if ord(c)==13 or ord(c)==10: - if ord(c)==13 and ord(line[srcptr])==10: - srcptr+=1 - continue - if c==' ' or ord(c)==9: - continue - if in_comment==1 and c=='*' and line[srcptr]=='/' : - srcptr+=1 - in_comment = 0 - continue - if in_comment: - continue - if c=='/' and line[srcptr]=='*' : - srcptr+=1 - in_comment = 1 - continue - if c=='/' and line[srcptr]=='/' : - break - content += c - content = content.strip() - if len(content)>0: - if content.startswith('COMP') or content.startswith('CONS') or content.startswith('GAME') or content.startswith('SYST') or content.startswith('GAMEL'): - splitname = content.split(',', 3) - if len(splitname)>1: - drivers.append(splitname[1]) + srcfile = srcfile.replace('\\','/') + if srcfile.startswith('src/mame/drivers'): + splitname = srcfile.split('/', 4) + drivers.append(splitname[3]) return 0 def parse_lua_file(srcfile): @@ -245,32 +210,13 @@ for filename in deps_files_included: for filename in sys.argv[2].rsplit(',') : parse_file_for_drivers(root,filename) - # display output if sys.argv[3]=='drivers': - # add a reference to the ___empty driver - drivers.append("___empty") - - # start with a header - print('#include "emu.h"\n') - print('#include "drivenum.h"\n') - #output the list of externs first for drv in sorted(drivers): - print("GAME_EXTERN(%s);" % drv) + print(drv) print("") - # then output the array - print("const game_driver * const driver_list::s_drivers_sorted[%d] =" % len(drivers)) - print("{") - for drv in sorted(drivers): - print("\t&GAME_NAME(%s)," % drv) - print("};") - print("") - - # also output a global count - print("int driver_list::s_driver_count = %d;\n" % len(drivers)) - if sys.argv[3]=='target': for line in components: sys.stdout.write("%s\n" % line) @@ -291,12 +237,9 @@ if sys.argv[3]=='target': sys.stdout.write(' MAME_DIR .. "src/lib/netlist",\n') sys.stdout.write(' MAME_DIR .. "3rdparty",\n') sys.stdout.write(' GEN_DIR .. "mame/layout",\n') + sys.stdout.write(' ext_includedir("zlib"),\n') + sys.stdout.write(' ext_includedir("flac"),\n') sys.stdout.write(' }\n') - sys.stdout.write(' if _OPTIONS["with-bundled-zlib"] then\n') - sys.stdout.write(' includedirs {\n') - sys.stdout.write(' MAME_DIR .. "3rdparty/zlib",\n') - sys.stdout.write(' }\n') - sys.stdout.write(' end\n') sys.stdout.write('\n') sys.stdout.write(' files{\n') for line in deps_files_included: |