You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
check that a source file exists before scanning it for includes
This commit is contained in:
@ -5,10 +5,12 @@ Recursively scan an asm file for rgbasm INCLUDEs and INCBINs.
|
|||||||
This is used to generate dependencies for each rgbasm object file.
|
This is used to generate dependencies for each rgbasm object file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def scan_for_includes(filename):
|
def scan_for_includes(filename):
|
||||||
filenames = []
|
filenames = []
|
||||||
|
if os.path.exists(filename):
|
||||||
for line in open(filename, 'r').readlines():
|
for line in open(filename, 'r').readlines():
|
||||||
if 'INCLUDE' in line or 'INCBIN' in line:
|
if 'INCLUDE' in line or 'INCBIN' in line:
|
||||||
line = line.split(';')[0]
|
line = line.split(';')[0]
|
||||||
|
Reference in New Issue
Block a user