scripts/build/check_include_guards.py: bail if no argument specified

This commit is contained in:
angelosa 2025-03-07 19:12:26 +01:00
parent 98b3a1c075
commit 91f7db1c68

View File

@ -28,6 +28,10 @@ if __name__ == '__main__':
substpat = re.compile('[-.]')
guardpat = re.compile('^ *# *ifndef +([^\s]+)(\s+.*)?')
bad = False
if len(sys.argv) < 2:
sys.stderr.write("Error: requires at least one path defined\n")
sys.exit(2)
for root in sys.argv[1:]:
for path, subdirs, files in os.walk(root):
prefix = 'MAME_' + '_'.join([n.upper() for n in pathsplit(os.path.relpath(path, root))]) + '_'