+#!/usr/bin/python
+
+import glob
+import os
+import sys
+
+for file in glob.glob('src/*.h'):
+ for line in open(file).readlines():
+ if line.find('@file') != -1:
+ filename = line.strip().split()[2]
+ if filename != file:
+ print(f'AWOOGA: {file} {filename}')
+ sys.exit(1)
+ elif line.find('ifndef') != -1:
+ guard = line.strip().split()[1]
+ if not guard.startswith('LIBDCP'):
+ print(f'AWOOGA: {file} {guard}')
+ sys.exit(1)
+ correct_guard = 'LIBDCP_' + os.path.basename(file).upper().replace('.', '_')
+ if guard != correct_guard:
+ print(f'AWOOGA: {file} {guard} {correct_guard}')
+ sys.exit(1)
+