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
423fa778
Commit
423fa778
authored
Jul 31, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Join check_condition and check_manifest into ActionCheck
parent
969a2617
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
56 deletions
+25
-56
__main__.py
hdlmake/__main__.py
+1
-1
__init__.py
hdlmake/action/__init__.py
+1
-2
check.py
hdlmake/action/check.py
+21
-15
check_manifest.py
hdlmake/action/check_manifest.py
+0
-36
module_pool.py
hdlmake/module_pool.py
+2
-2
No files found.
hdlmake/__main__.py
View file @
423fa778
...
...
@@ -108,7 +108,7 @@ def _action_runner(modules_pool):
modules_pool
.
env
.
check_env
(
verbose
=
True
)
quit
()
elif
options
.
command
==
"check-manifest"
:
modules_pool
.
env
.
check_manifest
(
top_mod
.
manifest
,
verbose
=
True
)
modules_pool
.
check_manifest
(
)
quit
()
elif
options
.
command
==
"manifest-help"
:
ManifestParser
()
.
print_help
()
...
...
hdlmake/action/__init__.py
View file @
423fa778
...
...
@@ -20,8 +20,7 @@
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
from
.check_condition
import
CheckCondition
from
.check_manifest
import
CheckManifest
from
.check
import
ActionCheck
from
.core
import
ActionCore
from
.merge
import
ActionMerge
from
.tree
import
ActionTree
...
...
hdlmake/action/check
_condition
.py
→
hdlmake/action/check.py
View file @
423fa778
...
...
@@ -27,22 +27,28 @@ import re
from
.action
import
Action
class
CheckCondition
(
Action
):
def
_compare
(
self
,
local
,
reference
,
cond
):
if
cond
==
"=="
:
return
local
==
reference
elif
cond
==
"<"
:
return
local
<
reference
elif
cond
==
">"
:
return
local
>
reference
elif
cond
==
"<="
:
return
local
<=
reference
elif
cond
==
">="
:
return
local
>=
reference
else
:
sys
.
exit
(
1
)
class
ActionCheck
(
Action
):
def
check_manifest
(
self
):
logging
.
error
(
"This action is not implemented yet!"
)
def
check_condition
(
self
):
def
_compare
(
local
,
reference
,
cond
):
if
cond
==
"=="
:
return
local
==
reference
elif
cond
==
"<"
:
return
local
<
reference
elif
cond
==
">"
:
return
local
>
reference
elif
cond
==
"<="
:
return
local
<=
reference
elif
cond
==
">="
:
return
local
>=
reference
else
:
sys
.
exit
(
1
)
tool
=
self
.
env
.
options
.
tool
if
tool
==
"ise"
:
ver
=
self
.
env
[
"ise_version"
]
...
...
@@ -79,5 +85,5 @@ class CheckCondition(Action):
logging
.
error
(
"Unknown tool:
%
s"
%
tool
)
sys
.
exit
(
"
\n
Exiting"
)
comparison
=
self
.
_compare
(
ver
,
ref
,
self
.
env
.
options
.
condition
)
comparison
=
_compare
(
ver
,
ref
,
self
.
env
.
options
.
condition
)
sys
.
exit
(
int
(
not
comparison
))
hdlmake/action/check_manifest.py
deleted
100644 → 0
View file @
969a2617
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 CERN
# Author: Pawel Szostek (pawel.szostek@cern.ch)
#
# This file is part of Hdlmake.
#
# Hdlmake is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Hdlmake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Hdlmake. If not, see <http://www.gnu.org/licenses/>.
import
logging
from
.action
import
Action
class
CheckManifest
(
Action
):
def
_check_options
(
self
):
if
not
self
.
env
.
options
.
top
:
logging
.
info
(
"--top is not specified. Current manifest will be treated as the top manifest"
)
def
check_manifest
(
self
):
###
### THIS IS JUST A STUB
###
pass
hdlmake/module_pool.py
View file @
423fa778
...
...
@@ -34,13 +34,13 @@ from . import new_dep_solver as dep_solver
from
.util
import
path
as
path_mod
from
.
import
fetch
from
.env
import
Env
from
.action
import
(
CheckManifest
,
CheckCondition
,
ActionCore
,
from
.action
import
(
ActionCheck
,
ActionCore
,
ActionMerge
,
ActionTree
,
GenerateSimulationMakefile
,
ActionSynthesis
,
QsysHwTclUpdate
)
class
ModulePool
(
list
,
CheckManifest
,
CheckCondition
,
ActionCore
,
class
ModulePool
(
list
,
ActionCheck
,
ActionCore
,
ActionMerge
,
ActionTree
,
GenerateSimulationMakefile
,
ActionSynthesis
,
QsysHwTclUpdate
):
...
...
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