Commit 477b81e6 authored by Paweł Szostek's avatar Paweł Szostek

Change visibility for 'private' class members

parent d88dc982
......@@ -53,7 +53,10 @@ def main():
default=None, help="remove all modules fetched for this one")
parser.add_option("--list", action="store_true", dest="list",
default=None, help="List all modules togather with their files")
default=None, help="List all modules together with their files")
parser.add_option("--list-files", action="store_true", dest="list_files",
default=None, help="List all files in a from of a space-separated string")
parser.add_option("--ise-proj", action="store_true", dest="ise_proj",
default=None, help="create/update an ise project including list of project files")
......@@ -126,6 +129,8 @@ use 0 for current version""", metavar="ISE")
kernel.generate_remote_synthesis_makefile()
elif options.list:
kernel.list_modules()
elif options.list_files:
kernel.list_files()
elif options.clean:
kernel.clean_modules()
else:
......
......@@ -23,11 +23,41 @@ import msg as p
class IDependable:
def __init__(self):
self.dep_fixed = False;
self.dep_index = 0;
self.dep_provides = [];
self.dep_requires = [];
self.dep_depends_on = [];
self.__dep_fixed = False;
self.__dep_provides = [];
self.__dep_requires = [];
self.__dep_depends_on = [];
pass
##
#use proxy template here
def get_dep_provides(self):
if self.__dep_fixed == False:
self.__create_deps()
self.__dep_fixed = True
return self.__dep_provides
def set_dep_provides(self, what):
self.__dep_provides = what
dep_provides = property(get_dep_provides, set_dep_provides)
##
def get_dep_requires(self):
if self.__dep_fixed == False:
self.__create_deps()
self.__dep_fixed = True
return self.__dep_provides
def set_dep_requires(self, what):
self.__dep_requires = what
dep_requires = property(get_dep_requires, set_dep_requires)
##
def get_dep_depends_on(self):
return self.__dep_depends_on
def set_dep_depends_on(self, what):
self.__dep_depends_on = what
dep_depends_on = property(get_dep_depends_on, set_dep_depends_on)
##
def __create_deps(self):
"""Used solely for polymorphism"""
class DependencySolver:
def __init__(self):
......@@ -107,7 +137,7 @@ class DependencySolver:
n_iter = n_iter+1
done = True
for f in fset:
if not f.dep_fixed:
if not f.__dep_fixed:
idx = fset.index(f)
k = self.__lookup_post_provider(files=fset, start_index=idx, file=f);
......@@ -122,7 +152,7 @@ class DependencySolver:
return None
for f in fset:
if f.dep_fixed:
if f.__dep_fixed:
f_nondep.append(copy.copy(f))
del f
......@@ -162,11 +192,11 @@ class DependencySolver:
newobj.add(f_nondep);
for f in fset:
try:
if not f.dep_fixed:
if not f.__dep_fixed:
newobj.add(f)
except:
newobj.add(f)
for k in newobj:
p.vprint(str(k.dep_index) + " " + k.path + str(k.dep_fixed))
p.vprint(str(k.dep_index) + " " + k.path + str(k.__dep_fixed))
return newobj
......@@ -70,7 +70,14 @@ class HdlmakeKernel(object):
for f in m.files:
print(" " + path.relpath(f.path, m.path))
print("")
def list_files(self):
files_str = []
for m in self.modules_pool:
if not m.isfetched:
continue
files_str.append(" ".join([f.path for f in m.files]))
print(" ".join(files_str))
def fetch(self, unfetched_only = False):
p.rawprint("Fetching needed modules...")
self.modules_pool.fetch_all(unfetched_only)
......
......@@ -96,7 +96,7 @@ class SourceFile(IDependable, File):
class VHDLFile(SourceFile):
def __init__(self, path, library = None, vcom_opt = None):
SourceFile.__init__(self, path, library);
self.__create_deps();
##self.__create_deps();
if not vcom_opt:
self.vcom_opt = ""
else:
......@@ -114,7 +114,7 @@ class VHDLFile(SourceFile):
def __create_deps(self):
if self.__check_encryption():
self.dep_index = SourceFile.gen_index(self)
self.dep_fixed = True
self.__dep_fixed = True
else:
self.dep_requires = list(self.__search_use_clauses())
self.dep_provides = list(self.__search_packages())
......@@ -248,7 +248,7 @@ class CDCFile(File):
class NGCFile(SourceFile):
def __init__(self, path):
SourceFile.__init__(self, path);
self.dep_fixed = True
self.__dep_fixed = True
class WBGenFile(File):
def __init__(self, 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