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
f7aee235
Commit
f7aee235
authored
Jul 22, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The flatten option for fetch action is not longer required: this is the default behavior now
parent
5aa91926
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
12 deletions
+3
-12
index.rst
docs/index.rst
+1
-1
__main__.py
hdlmake/__main__.py
+0
-2
fetch.py
hdlmake/action/fetch.py
+1
-6
module_pool.py
hdlmake/module_pool.py
+1
-3
No files found.
docs/index.rst
View file @
f7aee235
...
...
@@ -674,7 +674,7 @@ If we run the ``hdlmake fetch`` command from inside the folder where the top Man
.. code-block:: python
fetchto = ".."
fetchto = "..
/../ip_cores
"
...
...
hdlmake/__main__.py
View file @
f7aee235
...
...
@@ -219,8 +219,6 @@ def _get_parser():
make_remote
=
subparsers
.
add_parser
(
"make-remote"
,
help
=
"generate remote synthesis makefile"
)
fetch
=
subparsers
.
add_parser
(
"fetch"
,
help
=
"fetch and/or update remote modules listed in Manifest"
)
fetch
.
add_argument
(
"--flatten"
,
help
=
"`flatten' modules' hierarchy by storing everything in top module's fetchto direactoru"
,
default
=
False
,
action
=
"store_true"
)
fetch
.
add_argument
(
"--update"
,
help
=
"force updating of the fetched modules"
,
default
=
False
,
action
=
"store_true"
)
clean
=
subparsers
.
add_parser
(
"clean"
,
help
=
"remove all modules fetched for direct and indirect children of this module"
)
listmod
=
subparsers
.
add_parser
(
"list-mods"
,
help
=
"List all modules together with their files"
)
...
...
hdlmake/action/fetch.py
View file @
f7aee235
...
...
@@ -27,17 +27,12 @@ from .action import Action
class
FetchModules
(
Action
):
def
_check_options
(
self
):
if
self
.
options
.
flatten
is
True
and
self
.
env
[
"coredir"
]
is
not
None
:
logging
.
error
(
"Options clash: --flatten and HDLMAKE_COREDIR set at a time
\n
"
"Take one out of the two"
)
sys
.
exit
(
"
\n
Exiting"
)
def
run
(
self
):
top_module
=
self
.
modules_pool
.
get_top_module
()
logging
.
info
(
"Fetching needed modules."
)
os
.
system
(
top_module
.
fetch_pre_cmd
)
self
.
modules_pool
.
fetch_all
(
unfetched_only
=
not
self
.
options
.
update
,
flatten
=
self
.
options
.
flatten
)
self
.
modules_pool
.
fetch_all
(
unfetched_only
=
not
self
.
options
.
update
)
logging
.
debug
(
str
(
self
.
modules_pool
))
os
.
system
(
top_module
.
fetch_post_cmd
)
logging
.
info
(
"All modules fetched."
)
hdlmake/module_pool.py
View file @
f7aee235
...
...
@@ -173,14 +173,12 @@ class ModulePool(list):
new_modules
.
extend
(
module
.
git_submodules
)
return
new_modules
def
fetch_all
(
self
,
unfetched_only
=
False
,
flatten
=
False
):
def
fetch_all
(
self
,
unfetched_only
=
False
):
"""Fetch recursively all modules"""
fetch_queue
=
[
m
for
m
in
self
]
while
len
(
fetch_queue
)
>
0
:
cur_mod
=
fetch_queue
.
pop
()
if
flatten
is
True
:
cur_mod
.
fetchto
=
self
.
top_module
.
fetchto
new_modules
=
[]
if
unfetched_only
:
if
cur_mod
.
isfetched
:
...
...
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