Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
aa1f1e49
Commit
aa1f1e49
authored
Aug 01, 2013
by
Paweł Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list-modules: add option to list with files
parent
7f5d51ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
__main__.py
hdlmake/__main__.py
+1
-0
list_modules.py
hdlmake/action/list_modules.py
+22
-17
No files found.
hdlmake/__main__.py
View file @
aa1f1e49
...
...
@@ -36,6 +36,7 @@ def main():
fetch
=
subparsers
.
add_parser
(
"fetch"
,
help
=
"fetch and/or update remote modules listed in Manifest"
)
clean
=
subparsers
.
add_parser
(
"clean"
,
help
=
"remove all modules fetched for this one"
)
listmod
=
subparsers
.
add_parser
(
"list-mods"
,
help
=
"List all modules together with their files"
)
listmod
.
add_argument
(
"--with-files"
,
help
=
"list modules together with their files"
,
default
=
False
,
action
=
"store_true"
,
dest
=
"withfiles"
)
listfiles
=
subparsers
.
add_parser
(
"list-files"
,
help
=
"List all files in a form of a space-separated string"
)
listfiles
.
add_argument
(
"--delimiter"
,
help
=
"set delimitier for the list of files"
,
dest
=
"delimiter"
,
default
=
' '
)
merge_cores
=
subparsers
.
add_parser
(
"merge-cores"
,
help
=
"Merges entire synthesizable content of an project into a pair of VHDL/Verilog files"
)
...
...
hdlmake/action/list_modules.py
View file @
aa1f1e49
...
...
@@ -4,21 +4,26 @@ from util import path
class
ListModules
(
Action
):
def
run
(
self
):
for
m
in
self
.
modules_pool
:
if
not
m
.
isfetched
:
print
(
"#!UNFETCHED"
)
print
(
m
.
url
+
'
\n
'
)
else
:
print
(
path
.
relpath
(
m
.
path
))
if
m
.
source
in
[
"svn"
,
"git"
]:
print
(
"# "
+
m
.
url
)
if
m
.
parent
:
print
(
"# defined in
%
s"
%
m
.
parent
.
url
)
if
self
.
options
.
withfiles
:
for
m
in
self
.
modules_pool
:
if
not
m
.
isfetched
:
print
(
"#!UNFETCHED"
)
print
(
m
.
url
+
'
\n
'
)
else
:
print
(
"# root module"
)
if
not
len
(
m
.
files
):
print
(
" # no files"
)
else
:
for
f
in
m
.
files
:
print
(
" "
+
path
.
relpath
(
f
.
path
,
m
.
path
))
print
(
""
)
print
(
path
.
relpath
(
m
.
path
))
if
m
.
source
in
[
"svn"
,
"git"
]:
print
(
"# "
+
m
.
url
)
if
m
.
parent
:
print
(
"# defined in
%
s"
%
m
.
parent
.
url
)
else
:
print
(
"# root module"
)
if
not
len
(
m
.
files
):
print
(
" # no files"
)
else
:
for
f
in
m
.
files
:
print
(
" "
+
path
.
relpath
(
f
.
path
,
m
.
path
))
print
(
""
)
else
:
print
(
"#path
\t
source"
)
for
m
in
self
.
modules_pool
:
print
(
"
%
s
\t
%
s"
%
(
path
.
relpath
(
m
.
path
),
m
.
source
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment