Fix issue when listing files from outside the top directory

parent 2347f124
...@@ -33,8 +33,7 @@ from hdlmake.util import shell ...@@ -33,8 +33,7 @@ from hdlmake.util import shell
from hdlmake.util import path as path_mod from hdlmake.util import path as path_mod
from hdlmake.util.termcolor import colored from hdlmake.util.termcolor import colored
from hdlmake import new_dep_solver as dep_solver from hdlmake import new_dep_solver as dep_solver
from hdlmake.srcfile import SourceFileSet from hdlmake.srcfile import SourceFileSet, VHDLFile, VerilogFile, SVFile
def set_logging_level(options): def set_logging_level(options):
"""Set the log level and config (A.K.A. log verbosity)""" """Set the log level and config (A.K.A. log verbosity)"""
...@@ -153,6 +152,9 @@ class Action(list): ...@@ -153,6 +152,9 @@ class Action(list):
if self.options.all_files: if self.options.all_files:
return return
if not self._deps_solved: if not self._deps_solved:
if self.tool == None:
dep_solver.solve(self.parseable_fileset)
else:
dep_solver.solve(self.parseable_fileset, dep_solver.solve(self.parseable_fileset,
self.tool.get_standard_libs()) self.tool.get_standard_libs())
self._deps_solved = True self._deps_solved = True
...@@ -166,12 +168,19 @@ class Action(list): ...@@ -166,12 +168,19 @@ class Action(list):
"""Initialize the parseable and privative fileset contents""" """Initialize the parseable and privative fileset contents"""
total_files = self.build_complete_file_set() total_files = self.build_complete_file_set()
for file_aux in total_files: for file_aux in total_files:
if self.tool == None:
if any(isinstance(file_aux, file_type) if any(isinstance(file_aux, file_type)
for file_type in self.tool.get_privative_files()): for file_type in [VHDLFile, VerilogFile, SVFile]):
self.parseable_fileset.add(file_aux)
else:
self.privative_fileset.add(file_aux) self.privative_fileset.add(file_aux)
elif any(isinstance(file_aux, file_type) else:
if any(isinstance(file_aux, file_type)
for file_type in self.tool.get_parseable_files()): for file_type in self.tool.get_parseable_files()):
self.parseable_fileset.add(file_aux) self.parseable_fileset.add(file_aux)
elif any(isinstance(file_aux, file_type)
for file_type in self.tool.get_privative_files()):
self.privative_fileset.add(file_aux)
else: else:
logging.debug("File not supported by the tool: %s", logging.debug("File not supported by the tool: %s",
file_aux.path) file_aux.path)
......
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