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
f928f8a3
Commit
f928f8a3
authored
Oct 01, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell: rename slash_char to makefile_slash_char and redefine definition.
parent
ded989dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
isim.py
hdlmake/tools/isim.py
+6
-6
sim_makefile_support.py
hdlmake/tools/sim_makefile_support.py
+3
-3
shell.py
hdlmake/util/shell.py
+4
-4
No files found.
hdlmake/tools/isim.py
View file @
f928f8a3
...
...
@@ -127,7 +127,7 @@ XILINX_INI_PATH := """ + __get_xilinxsim_ini_dir() +
self
.
write
(
'
\n
'
)
# tell how to make libraries
self
.
write
(
'LIB_IND := '
)
self
.
write
(
' '
.
join
([
lib
+
shell
.
slash_char
()
+
self
.
write
(
' '
.
join
([
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
for
lib
in
libs
]))
self
.
write
(
'
\n
'
)
self
.
writeln
(
"""
\
...
...
@@ -137,7 +137,7 @@ $(VHDL_OBJ): $(LIB_IND) xilinxsim.ini
"""
)
self
.
writeln
(
"xilinxsim.ini: $(XILINX_INI_PATH)"
+
shell
.
slash_char
()
+
"xilinxsim.ini"
)
shell
.
makefile_
slash_char
()
+
"xilinxsim.ini"
)
self
.
writeln
(
"
\t\t
"
+
shell
.
copy_command
()
+
" $< ."
)
self
.
writeln
(
"""
\
fuse:
...
...
@@ -147,11 +147,11 @@ fuse:
# ISim does not have a vmap command to insert additional libraries in
#.ini file.
for
lib
in
libs
:
self
.
write
(
lib
+
shell
.
slash_char
()
+
"."
+
lib
+
":
\n
"
)
self
.
write
(
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
+
":
\n
"
)
self
.
write
(
' '
.
join
([
"
\t
("
+
shell
.
mkdir_command
(),
lib
,
"&&"
,
shell
.
touch_command
(),
lib
+
shell
.
slash_char
()
+
"."
+
lib
+
" "
]))
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
+
" "
]))
# self.write(' '.join(["&&", "echo", "\""+lib+"="+lib+"/."+lib+"\"
# ", ">>", "xilinxsim.ini) "]))
self
.
write
(
...
...
@@ -188,7 +188,7 @@ fuse:
self
.
writeln
(
' '
.
join
([
fname
.
rel_path
()
for
fname
in
vl_file
.
depends_on
]))
self
.
write
(
"
\t\t
vlogcomp -work "
+
vl_file
.
library
+
"=."
+
shell
.
slash_char
()
+
vl_file
.
library
)
+
"=."
+
shell
.
makefile_
slash_char
()
+
vl_file
.
library
)
self
.
write
(
" $(VLOGCOMP_FLAGS) "
)
# if isinstance(vl_file, SVFile):
# self.write(" -sv ")
...
...
@@ -226,7 +226,7 @@ fuse:
self
.
writeln
(
' '
.
join
([
"
\t\t
vhpcomp $(VHPCOMP_FLAGS)"
,
"-work"
,
lib
+
"=."
+
shell
.
slash_char
()
+
lib
,
lib
+
"=."
+
shell
.
makefile_
slash_char
()
+
lib
,
"$< "
]))
self
.
writeln
(
"
\t\t
@"
+
shell
.
mkdir_command
()
+
" $(dir $@) && "
+
shell
.
touch_command
()
+
" $@
\n
"
)
...
...
hdlmake/tools/sim_makefile_support.py
View file @
f928f8a3
...
...
@@ -105,7 +105,7 @@ class VsimMakefileWriter(MakeSim):
self
.
write
(
'
\n
'
)
# tell how to make libraries
self
.
write
(
'LIB_IND := '
)
self
.
write
(
' '
.
join
([
lib
+
shell
.
slash_char
()
+
self
.
write
(
' '
.
join
([
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
for
lib
in
libs
]))
self
.
write
(
'
\n
'
)
self
.
writeln
()
...
...
@@ -121,10 +121,10 @@ class VsimMakefileWriter(MakeSim):
for
filename
,
filesource
in
six
.
iteritems
(
self
.
copy_rules
):
self
.
write
(
__create_copy_rule
(
filename
,
filesource
))
for
lib
in
libs
:
self
.
write
(
lib
+
shell
.
slash_char
()
+
"."
+
lib
+
":
\n
"
)
self
.
write
(
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
+
":
\n
"
)
vmap_command
=
"vmap $(VMAP_FLAGS)"
self
.
write
(
' '
.
join
([
"
\t
(vlib"
,
lib
,
"&&"
,
vmap_command
,
lib
,
"&&"
,
shell
.
touch_command
(),
lib
+
shell
.
slash_char
()
+
shell
.
touch_command
(),
lib
+
shell
.
makefile_
slash_char
()
+
"."
+
lib
,
")"
]))
self
.
write
(
' '
.
join
([
"||"
,
shell
.
del_command
(),
lib
,
"
\n
"
]))
self
.
write
(
'
\n\n
'
)
...
...
hdlmake/util/shell.py
View file @
f928f8a3
...
...
@@ -64,7 +64,7 @@ def run(command):
def
tclpath
(
path
):
"""Convert a O.S. specific path into a TCL friendly one"""
return
path
.
replace
(
slash_char
(),
"/"
)
return
path
.
replace
(
makefile_
slash_char
(),
"/"
)
def
check_windows_tools
():
...
...
@@ -131,9 +131,9 @@ def which(filename):
return
candidates
def
slash_char
():
"""
Get a string with the O.S. specific path separator
"""
if
check_windows_
tool
s
():
def
makefile_
slash_char
():
"""
Return the OS specific path separator for use in makefile
"""
if
check_windows_
command
s
():
return
"
\\
"
else
:
return
"/"
...
...
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