diff options
author | 2016-01-27 08:35:08 +0100 | |
---|---|---|
committer | 2016-01-27 08:35:08 +0100 | |
commit | 0d1e14b771ed72d8e9a0d42fd05ebfe6fe63016a (patch) | |
tree | 10258b6f255e00e7eec2ec30112d6de07015c475 /scripts/build/makedep.py | |
parent | 8d5848718c30a960d07d569937cb1678f75f0463 (diff) | |
parent | b1d6f6d63f8294a3f62d7db6f9eea07da1d93664 (diff) |
Merge pull request #10 from mamedev/master
Sync to base master
Diffstat (limited to 'scripts/build/makedep.py')
-rw-r--r-- | scripts/build/makedep.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/build/makedep.py b/scripts/build/makedep.py index 54be719a807..eba69370621 100644 --- a/scripts/build/makedep.py +++ b/scripts/build/makedep.py @@ -27,7 +27,7 @@ def file_exists(root, srcfile, folder, inc_dir): includes.extend(inc_dir) for line in includes: try: - fp = open(root + line + srcfile, 'rb') + fp = open(root + line + srcfile, 'r') fp.close() return line + srcfile except IOError: @@ -36,7 +36,7 @@ def file_exists(root, srcfile, folder, inc_dir): def add_c_if_exists(root, fullname): try: - fp = open(root + fullname, 'rb') + fp = open(root + fullname, 'r') fp.close() deps_files_included.append(fullname) except IOError: @@ -61,7 +61,7 @@ def add_rest_if_exists(root, srcfile,folder): def parse_file_for_deps(root, srcfile, folder): try: - fp = open(root + srcfile, 'rb') + fp = open(root + srcfile, 'r') except IOError: return 1 in_comment = 0 @@ -73,11 +73,11 @@ def parse_file_for_deps(root, srcfile, folder): while srcptr < len(line): c = line[srcptr] srcptr+=1 - if c==13 or c==10: - if c==13 and line[srcptr]==10: + if ord(c)==13 or ord(c)==10: + if ord(c)==13 and ord(line[srcptr])==10: srcptr+=1 continue - if c==' ' or c==9: + if c==' ' or ord(c)==9: continue if in_comment==1 and c=='*' and line[srcptr]=='/' : srcptr+=1 @@ -112,7 +112,7 @@ def parse_file_for_deps(root, srcfile, folder): def parse_file(root, srcfile, folder): try: - fp = open(root + srcfile, 'rb') + fp = open(root + srcfile, 'r') except IOError: return 1 in_comment = 0 @@ -124,11 +124,11 @@ def parse_file(root, srcfile, folder): while srcptr < len(line): c = line[srcptr] srcptr+=1 - if c==13 or c==10: - if c==13 and line[srcptr]==10: + if ord(c)==13 or ord(c)==10: + if ord(c)==13 and ord(line[srcptr])==10: srcptr+=1 continue - if c==' ' or c==9: + if c==' ' or ord(c)==9: continue if in_comment==1 and c=='*' and line[srcptr]=='/' : srcptr+=1 @@ -168,7 +168,7 @@ def parse_file(root, srcfile, folder): def parse_file_for_drivers(root, srcfile): try: - fp = open(root + srcfile, 'rb') + fp = open(root + srcfile, 'r') except IOError: sys.stderr.write("Unable to open source file '%s'\n" % srcfile) return 1 @@ -181,11 +181,11 @@ def parse_file_for_drivers(root, srcfile): while srcptr < len(line): c = line[srcptr] srcptr+=1 - if c==13 or c==10: - if c==13 and line[srcptr]==10: + if ord(c)==13 or ord(c)==10: + if ord(c)==13 and ord(line[srcptr])==10: srcptr+=1 continue - if c==' ' or c==9: + if c==' ' or ord(c)==9: continue if in_comment==1 and c=='*' and line[srcptr]=='/' : srcptr+=1 @@ -209,7 +209,7 @@ def parse_file_for_drivers(root, srcfile): def parse_lua_file(srcfile): try: - fp = open(srcfile, 'rb') + fp = open(srcfile, 'r') except IOError: sys.stderr.write("Unable to open source file '%s'\n" % srcfile) return 1 @@ -287,9 +287,9 @@ if sys.argv[3]=='target': sys.stdout.write(' MAME_DIR .. "src/mame",\n') sys.stdout.write(' MAME_DIR .. "src/lib",\n') sys.stdout.write(' MAME_DIR .. "src/lib/util",\n') + 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(' GEN_DIR .. "mess/layout",\n') sys.stdout.write(' }\n') sys.stdout.write(' if _OPTIONS["with-bundled-zlib"] then\n') sys.stdout.write(' includedirs {\n') |