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
0b6ba299
Commit
0b6ba299
authored
Mar 05, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hdlmake: add command --list-deps
parent
b27ba540
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
commands.py
hdlmake/action/commands.py
+14
-0
main.py
hdlmake/main.py
+6
-0
No files found.
hdlmake/action/commands.py
View file @
0b6ba299
...
...
@@ -234,3 +234,17 @@ class Commands(Action):
self
.
_print_file_list
(
mod_aux
.
files
)
self
.
_print_comment
(
"# MODULE END ->
%
s"
%
mod_aux
.
url
)
self
.
_print_comment
(
""
)
def
list_deps
(
self
):
self
.
build_file_set
()
self
.
solve_file_set
()
from
..sourcefiles.srcfile
import
DepFile
from
..sourcefiles.dep_file
import
DepRelation
fset
=
self
.
parseable_fileset
.
filter
(
DepFile
)
for
f
in
sorted
(
fset
,
key
=
(
lambda
x
:
x
.
path
)):
print
(
'{}:'
.
format
(
f
.
path
))
for
dep
in
sorted
([
str
(
x
)
for
x
in
f
.
provides
]):
print
(
' provide {}'
.
format
(
dep
))
for
dep
in
sorted
([
str
(
x
)
for
x
in
f
.
requires
]):
print
(
' require {}'
.
format
(
dep
))
hdlmake/main.py
View file @
0b6ba299
...
...
@@ -94,6 +94,8 @@ def _action_runner(action):
action
.
list_files
()
elif
options
.
command
==
"list-json"
:
action
.
list_json
()
elif
options
.
command
==
"list-deps"
:
action
.
list_deps
()
elif
options
.
command
==
"tree"
:
action
.
generate_tree
()
else
:
...
...
@@ -163,6 +165,10 @@ def _get_parser():
"--top"
,
dest
=
"top"
,
default
=
None
,
help
=
"print only those files required to build 'top'"
)
subparsers
.
add_parser
(
"list-deps"
,
help
=
"print all dependencies"
)
tree
=
subparsers
.
add_parser
(
"tree"
,
help
=
"generate a module hierarchy tree graph"
)
...
...
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