From d6f9ff5cf7d815d4ff1beb9fef2ec932f382da79 Mon Sep 17 00:00:00 2001 From: obskyr Date: Mon, 18 Jun 2018 16:32:39 +0200 Subject: Fix and use make_shim.py --- tools/scan_includes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/scan_includes.py') 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 -- cgit v1.2.3