Skip to content
Snippets Groups Projects
Commit 4e88aea8 authored by Paweł Szostek's avatar Paweł Szostek
Browse files

Add --list option to hdlmake

--list enables people to list content of their modules.
Indentation makes easier visual recognition of the
content.
parent 50f540ed
No related merge requests found
No preview for this file type
......@@ -52,6 +52,9 @@ def main():
parser.add_option("--clean", action="store_true", dest="clean",
help="remove all modules fetched for this one")
parser.add_option("--list", action="store_true", dest="list",
help="List all modules togather with their files")
parser.add_option("--ise-proj", action="store_true", dest="ise_proj",
help="create/update an ise project including list of project files")
......@@ -115,6 +118,8 @@ def main():
kernel.generate_ise_makefile()
elif options.make_remote == True:
kernel.generate_remote_synthesis_makefile()
elif options.list == True:
kernel.list_modules()
elif options.clean == True:
kernel.clean_modules()
else:
......
......@@ -52,6 +52,20 @@ class HdlmakeKernel(object):
p.rawprint("Allowed actions are:\n\tsimulation\n\tsynthesis")
quit()
def list_modules(self):
import path
for m in self.modules_pool:
if m.path == os.getcwd():
print(".")
else:
print(path.relpath(m.path))
if not len(m.files):
print(" # no files")
else:
for f in m.files:
print(" " + path.relpath(f.path, m.path))
print("")
def fetch(self, unfetched_only = False):
p.rawprint("Fetching needed modules...")
self.modules_pool.fetch_all(unfetched_only)
......
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