diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-12-28 23:56:34 -0800 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-12-28 23:56:34 -0800 |
commit | 983ef29fd0e3645cb6335ee8bb172312790a56e2 (patch) | |
tree | 93d198b963f6142ac35a99c503cff21680065b49 /scan_includes.py | |
parent | 0fdbdb43a794358b5ed484114486e2992d520338 (diff) | |
parent | a8cb73b654af67bb3caad2c6d45edce7436032b1 (diff) |
Merge pull request #221 from yenatch/more-objects
analyze the bytes
Diffstat (limited to 'scan_includes.py')
-rw-r--r-- | scan_includes.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/scan_includes.py b/scan_includes.py deleted file mode 100644 index 0abd3084a..000000000 --- a/scan_includes.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -""" -Recursively scan an asm file for rgbasm INCLUDEs and INCBINs. -This is used to generate dependencies for each rgbasm object file. -""" - -import os -import sys - -def scan_for_includes(filename): - filenames = [] - if os.path.exists(filename): - for line in open(filename, 'r').readlines(): - if 'INCLUDE' in line or 'INCBIN' in line: - line = line.split(';')[0] - if 'INCLUDE' in line or 'INCBIN' in line: - filenames += [line.split('"')[1]] - return filenames - -def recursive_scan_for_includes(filename): - filenames = [] - if '.asm' in filename or '.tx' in filename: - for include in scan_for_includes(filename): - filenames += [include] + recursive_scan_for_includes(include) - return filenames - -if len(sys.argv) > 1: - for arg in sys.argv[1:]: - sys.stdout.write(' '.join(recursive_scan_for_includes(arg))) - |