Commit d2d60b9d authored by Pawel Szostek's avatar Pawel Szostek

manifest: pass __manifest variable as the extra context

parent 27745a19
......@@ -175,7 +175,6 @@ class Module(object):
manifest_parser = ManifestParser()
manifest_parser.add_arbitrary_code("__manifest=\""+self.path+"\"")
manifest_parser.add_arbitrary_code(global_mod.options.arbitrary_code)
if self.manifest is None:
......@@ -185,7 +184,7 @@ class Module(object):
if self.parent is None:
allow_unknown = True
extra_context = None
extra_context = {}
else:
allow_unknown = False
extra_context = dict(global_mod.top_module.manifest_dict) # copy the dictionary
......@@ -196,7 +195,7 @@ class Module(object):
del extra_context["incl_makefiles"]
del extra_context["bit_file_targets"]
del extra_context["library"]
extra_context["__manifest"] = self.path
opt_map = None
try:
......
......@@ -284,7 +284,7 @@ class ConfigParser(object):
except:
logging.error("Encountered unexpected error while parsing " + self.config_file)
print(str(sys.exc_info()[0]) + ':' + str(sys.exc_info()[1]))
quit()
raise
for opt_name, val in list(options.items()): # check delivered options
if opt_name.startswith('__'):
......@@ -294,6 +294,8 @@ class ConfigParser(object):
continue # finish processing of this variable here
elif allow_unknown is True:
ret[opt_name] = val
logging.warning("Given variable is not recognized: %s (=%s).\nPlease double check it is not en error" % (opt_name, val))
continue
else:
#if opt_name.startswith("global_"):
# continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment