+#######################################
+# Overlap configuration for specified target
+if os.path.isfile('.target'):
+ target = None
+ with open('.target', 'r') as f:
+ target = f.readline().rstrip()
+ conffile = os.path.join('targets', target + '.py')
+ if os.path.isfile(conffile):
+ ovconf = importlib.machinery.SourceFileLoader("module.name", conffile).load_module()
+ for name in dir(ovconf):
+ if not re.match('__*__', name):
+ vars()[name] = vars(ovconf)[name]
+ else:
+ print("W: No target specifier. Write target to .target file.")
+else:
+ print("W: No target specifier. Write target to .target file.")