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
73d80016
Commit
73d80016
authored
Aug 07, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve coding style at srcfile package
parent
2bf4b530
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
156 additions
and
132 deletions
+156
-132
core.py
hdlmake/module/core.py
+5
-6
srcfile.py
hdlmake/srcfile.py
+148
-121
vlog_parser.py
hdlmake/vlog_parser.py
+3
-5
No files found.
hdlmake/module/core.py
View file @
73d80016
...
...
@@ -142,8 +142,7 @@ class ModuleCore(ModuleConfig):
Build a Source File Set containing the files indicated by the
provided list of paths
"""
from
hdlmake.srcfile
import
SourceFileFactory
,
SourceFileSet
sff
=
SourceFileFactory
()
from
hdlmake.srcfile
import
create_source_file
,
SourceFileSet
srcs
=
SourceFileSet
()
for
path_aux
in
paths
:
if
os
.
path
.
isdir
(
path_aux
):
...
...
@@ -151,11 +150,11 @@ class ModuleCore(ModuleConfig):
for
f_dir
in
dir_
:
f_dir
=
os
.
path
.
join
(
self
.
path
,
path_aux
,
f_dir
)
if
not
os
.
path
.
isdir
(
f_dir
):
srcs
.
add
(
sff
.
new
(
path
=
f_dir
,
module
=
self
,
library
=
self
.
library
))
srcs
.
add
(
create_source_file
(
path
=
f_dir
,
module
=
self
,
library
=
self
.
library
))
else
:
srcs
.
add
(
sff
.
new
(
path
=
path_aux
,
srcs
.
add
(
create_source_file
(
path
=
path_aux
,
module
=
self
,
library
=
self
.
library
))
return
srcs
hdlmake/srcfile.py
View file @
73d80016
This diff is collapsed.
Click to expand it.
hdlmake/vlog_parser.py
View file @
73d80016
...
...
@@ -33,7 +33,7 @@ import logging
from
.new_dep_solver
import
DepParser
from
.dep_file
import
DepRelation
from
.srcfile
import
SourceFileFactory
from
hdlmake.srcfile
import
create_source_file
class
VerilogPreprocessor
(
object
):
...
...
@@ -576,10 +576,8 @@ class VerilogParser(DepParser):
dep_file
.
path
+
dep_file
.
library
]
for
file_aux
in
includes
:
dep_file
.
depends_on
.
add
(
SourceFileFactory
(
)
.
new
(
path
=
file_aux
,
module
=
dep_file
.
module
))
create_source_file
(
path
=
file_aux
,
module
=
dep_file
.
module
))
logging
.
debug
(
"
%
s has
%
d includes."
,
str
(
dep_file
),
len
(
includes
))
except
KeyError
:
...
...
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