Commit 4258554e authored by Tristan Gingold's avatar Tristan Gingold

minor rework and comments added.

parent 5d1d716e
......@@ -57,7 +57,8 @@ class Action(object):
self.top_manifest.parse_manifest()
self.config = self._get_config_dict()
def run(self):
def setup(self):
"""Set tool and top_entity"""
action = self.config.get("action")
if action == None:
self.tool = None
......
......@@ -62,9 +62,12 @@ class Commands(Action):
def makefile(self):
"""Write the Makefile for the current design"""
# Handle the --make option
commands = self.options.__dict__.get('make')
if commands:
shell.set_commands_os(commands)
# Handle --filename option.
filename = self.options.__dict__.get('filename')
self._check_all_fetched()
self.build_file_set()
self.solve_file_set()
......@@ -72,7 +75,7 @@ class Commands(Action):
combined_fileset.add(self.privative_fileset)
self.tool.write_makefile(self.config,
combined_fileset,
filename=self.options.__dict__.get('filename'))
filename=filename)
def _fetch_all(self):
"""Fetch all the modules declared in the design"""
......
......@@ -57,7 +57,7 @@ def hdlmake(args):
# Create a ModulePool object, this will become our workspace
action = Commands(options)
action.load_top_manifest()
action.run()
action.setup()
# Execute the appropriated action for the freshly created modules pool
_action_runner(action)
......
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