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
5a9b2802
Commit
5a9b2802
authored
May 23, 2017
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the Makefile writer as another pool_module action
parent
ec6a12a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
24 deletions
+18
-24
__main__.py
hdlmake/__main__.py
+10
-11
core.py
hdlmake/action/core.py
+7
-0
__init__.py
hdlmake/tools/__init__.py
+1
-13
No files found.
hdlmake/__main__.py
View file @
5a9b2802
...
...
@@ -115,9 +115,8 @@ def _action_runner(modules_pool):
if
options
.
command
==
"manifest-help"
:
ManifestParser
()
.
print_help
()
quit
()
elif
options
.
command
==
"auto"
:
from
hdlmake.tools
import
write_makefile
write_makefile
(
modules_pool
)
elif
options
.
command
==
"makefile"
:
modules_pool
.
makefile
()
elif
options
.
command
==
"fetch"
:
modules_pool
.
fetch
()
elif
options
.
command
==
"clean"
:
...
...
@@ -228,17 +227,17 @@ def _get_parser():
"--condition"
,
dest
=
"condition"
,
required
=
True
)
auto
=
subparsers
.
add_parser
(
"
auto
"
,
help
=
"
default action for hdlmake. Run when no args are given
"
)
auto
.
add_argument
(
makefile
=
subparsers
.
add_parser
(
"
makefile
"
,
help
=
"
Write the Makefile -- default action for hdlmake.
"
)
makefile
.
add_argument
(
'-v'
,
'--version'
,
action
=
'version'
,
version
=
parser
.
prog
+
" "
+
__version__
)
auto
.
add_argument
(
makefile
.
add_argument
(
"--noprune"
,
help
=
"prevent hdlmake from pruning unneeded files"
,
default
=
False
,
...
...
@@ -276,16 +275,16 @@ def _get_options(sys_aux, parser):
"""Function that decodes and set the provided command user options"""
options
=
None
if
len
(
sys_aux
.
argv
[
1
:])
==
0
:
options
=
parser
.
parse_args
([
'
auto
'
])
options
=
parser
.
parse_args
([
'
makefile
'
])
elif
len
(
sys_aux
.
argv
[
1
:])
==
1
:
if
sys_aux
.
argv
[
1
]
==
"--help"
or
sys_aux
.
argv
[
1
]
==
"-h"
:
options
=
parser
.
parse_args
(
sys_aux
.
argv
[
1
:])
elif
sys_aux
.
argv
[
1
]
.
startswith
(
'-'
):
options
=
parser
.
parse_args
([
"
auto
"
]
+
sys_aux
.
argv
[
1
:])
options
=
parser
.
parse_args
([
"
makefile
"
]
+
sys_aux
.
argv
[
1
:])
else
:
options
=
parser
.
parse_args
(
sys_aux
.
argv
[
1
:])
elif
len
(
sys_aux
.
argv
[
1
:])
%
2
==
0
:
options
=
parser
.
parse_args
(
sys_aux
.
argv
[
1
:]
+
[
"
auto
"
])
options
=
parser
.
parse_args
(
sys_aux
.
argv
[
1
:]
+
[
"
makefile
"
])
else
:
options
=
parser
.
parse_args
(
sys_aux
.
argv
[
1
:])
return
options
...
...
hdlmake/action/core.py
View file @
5a9b2802
...
...
@@ -29,6 +29,7 @@ import sys
import
os.path
import
time
from
hdlmake.tools
import
write_makefile
import
hdlmake.fetch
as
fetch
import
hdlmake.new_dep_solver
as
dep_solver
from
hdlmake.util
import
path
as
path_mod
...
...
@@ -49,6 +50,12 @@ class ActionCore(Action):
self
.
svn_backend
=
Svn
()
self
.
local_backend
=
Local
()
def
makefile
(
self
):
"""Write the Makefile for the current design"""
write_makefile
(
self
)
def
_fetch_all
(
self
):
"""Fetch all the modules declared in the design"""
...
...
hdlmake/tools/__init__.py
View file @
5a9b2802
"""Package that provides all the tool specific stuff"""
from
.iverilog
import
ToolIVerilog
from
.isim
import
ToolISim
from
.modelsim
import
ToolModelsim
from
.active_hdl
import
ToolActiveHDL
from
.riviera
import
ToolRiviera
from
.ghdl
import
ToolGHDL
from
.ise
import
ToolISE
from
.planahead
import
ToolPlanAhead
from
.vivado
import
ToolVivado
from
.quartus
import
ToolQuartus
from
.diamond
import
ToolDiamond
from
.libero
import
ToolLibero
from
.icestorm
import
ToolIcestorm
from
.makefile_writer
import
write_makefile
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