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,8 +152,11 @@ class Action(list): ...@@ -153,8 +152,11 @@ 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:
dep_solver.solve(self.parseable_fileset, if self.tool == None:
self.tool.get_standard_libs()) dep_solver.solve(self.parseable_fileset)
else:
dep_solver.solve(self.parseable_fileset,
self.tool.get_standard_libs())
self._deps_solved = True self._deps_solved = True
solved_files = SourceFileSet() solved_files = SourceFileSet()
solved_files.add(dep_solver.make_dependency_set( solved_files.add(dep_solver.make_dependency_set(
...@@ -166,15 +168,22 @@ class Action(list): ...@@ -166,15 +168,22 @@ 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 any(isinstance(file_aux, file_type) if self.tool == None:
for file_type in self.tool.get_privative_files()): if any(isinstance(file_aux, file_type)
self.privative_fileset.add(file_aux) for file_type in [VHDLFile, VerilogFile, SVFile]):
elif any(isinstance(file_aux, file_type) self.parseable_fileset.add(file_aux)
for file_type in self.tool.get_parseable_files()): else:
self.parseable_fileset.add(file_aux) self.privative_fileset.add(file_aux)
else: else:
logging.debug("File not supported by the tool: %s", if any(isinstance(file_aux, file_type)
file_aux.path) for file_type in self.tool.get_parseable_files()):
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:
logging.debug("File not supported by the tool: %s",
file_aux.path)
if len(self.privative_fileset) > 0: if len(self.privative_fileset) > 0:
logging.info("Detected %d supported files that are not parseable", logging.info("Detected %d supported files that are not parseable",
len(self.privative_fileset)) len(self.privative_fileset))
......
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