-# Pieces are in place, so create the builder.
-python = sys.executable # use same Python binary used to run scons
+def isa_desc_action(target, source, env):
+ # Add the current directory to the system path so we can import files
+ sys.path[0:0] = [ ARCH_DIR.srcnode().abspath ]
+ import isa_parser
+
+ models = [ s.get_contents() for s in source[1:] ]
+ cpu_models = [CpuModel.dict[cpu] for cpu in models]
+ parser = isa_parser.ISAParser(target[0].dir.abspath, cpu_models)
+ parser.parse_isa_desc(source[0].abspath)