diff options
author | obskyr <powpowd@gmail.com> | 2018-06-18 16:32:39 +0200 |
---|---|---|
committer | obskyr <powpowd@gmail.com> | 2018-06-18 18:18:46 +0200 |
commit | d6f9ff5cf7d815d4ff1beb9fef2ec932f382da79 (patch) | |
tree | 9662f13360b58a725ebe41a4317cf790e39f6609 /tools/scan_includes.py | |
parent | 0cd5e3d610bb13093a1b596e2d5399af1c008a96 (diff) |
Fix and use make_shim.py
Diffstat (limited to 'tools/scan_includes.py')
-rw-r--r-- | tools/scan_includes.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/scan_includes.py b/tools/scan_includes.py index 592d6bd..e659dca 100644 --- a/tools/scan_includes.py +++ b/tools/scan_includes.py @@ -42,10 +42,14 @@ def shallow_dependencies_of(asm_file_path): keyword = m.group(1).upper() line = line.split(';', 1)[0] - path = line[line.index('"') + 1:line.rindex('"')] + # RGBDS treats absolute(-looking) paths as relative, + # so leading slashes should be stripped. + path = line[line.index('"') + 1:line.rindex('"')].lstrip('/') if keyword == 'INCLUDE': asm_dependencies.add(path) else: + if not os.path.isfile(path): + path = 'build/' + path bin_dependencies.add(path) return asm_dependencies, bin_dependencies |