Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hdlmake
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Hdlmake
Commits
5ba0b13a
Commit
5ba0b13a
authored
14 years ago
by
Pawel Szostek
Browse files
Options
Downloads
Patches
Plain Diff
Added automatic conversion from relative to absolute paths
parent
c323c631
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
simulation/sources-lib.sh
+21
-8
21 additions, 8 deletions
simulation/sources-lib.sh
simulation/sources.sh
+11
-2
11 additions, 2 deletions
simulation/sources.sh
simulation/vhdldep.sh
+12
-4
12 additions, 4 deletions
simulation/vhdldep.sh
with
44 additions
and
14 deletions
simulation/sources-lib.sh
+
21
−
8
View file @
5ba0b13a
#!/bin/bash
#script should be run by make
function
usage
()
{
echo
"Usage:
$0
hdl_path scripts_path"
}
function
abs_path
()
{
local
cur_dir
=
$(
pwd
)
local
D
=
$(
dirname
$1
)
local
B
=
$(
basename
$1
)
(
cd
$D
&&
echo
$(
pwd
)
"/
$B
"
)
||
exit
1
cd
$cur_dir
}
##$1 is expected to be project path
if
[
$#
-
lt
1
]
;
then
echo
"
$0
"
':
A
rgument expected'
echo
"Usage:
$0
project_path hdl_path"
if
[
$#
-
ne
2
]
;
then
echo
"
$0
"
':
Exactly two a
rgument
s
expected'
usage
exit
1
fi
if
[
!
-d
$1
]
;
then
echo
"
$0
"
':'
"
$1
"
'
is not a directory
'
echo
"Usage:
$0
project_path hdl_path"
if
[
!
-d
$1
-o
!
-d
$2
]
;
then
echo
"
$0
:
$1
or
$2
is not a directory
"
usage
exit
1
fi
hdl_path
=
$1
scripts_path
=
$2
hdl_path
=
$(
abs_path
$1
)
scripts_path
=
$(
abs_path
$2
)
##modules file is obligatory for each simulation
if
[
!
-f
$(
pwd
)
/modules
]
;
then
echo
"
$0
: Modules file does not exist"
...
...
This diff is collapsed.
Click to expand it.
simulation/sources.sh
+
11
−
2
View file @
5ba0b13a
...
...
@@ -4,6 +4,15 @@
function
usage
()
{
echo
"Usage:
$0
hdl_path scripts_path"
}
function
abs_path
()
{
local
cur_dir
=
$(
pwd
)
local
D
=
$(
dirname
$1
)
local
B
=
$(
basename
$1
)
(
cd
$D
&&
echo
$(
pwd
)
"/
$B
"
)
||
exit
1
cd
$cur_dir
}
##$1 is expected to be project path
if
[
$#
-ne
2
]
;
then
echo
"
$0
"
': two arguments expected'
...
...
@@ -16,8 +25,8 @@ if [ ! -d $1 ]; then
usage
exit
1
fi
hdl_path
=
$
1
scripts_path
=
$
2
hdl_path
=
$
(
abs_path
$1
)
scripts_path
=
$
(
abs_path
$2
)
##modules file is obligatory for each simulation
if
[
!
-f
$(
pwd
)
/modules
]
;
then
...
...
This diff is collapsed.
Click to expand it.
simulation/vhdldep.sh
+
12
−
4
View file @
5ba0b13a
#!/bin/bash
#script should be run by make
function
abs_path
()
{
local
cur_dir
=
$(
pwd
)
local
D
=
$(
dirname
$1
)
local
B
=
$(
basename
$1
)
(
cd
$D
&&
echo
$(
pwd
)
"/
$B
"
)
||
exit
1
cd
$cur_dir
}
##associative array declaration
if
[
$#
-lt
2
]
;
then
echo
"
$0
"
': Argument expected'
...
...
@@ -14,7 +22,7 @@ if [ ! -d "$1" ]; then
exit
1
fi
scripts_path
=
$
1
scripts_path
=
$
(
abs_path
$1
)
vhd_comp
=
$2
number
=
0
...
...
@@ -67,9 +75,9 @@ for i in $(seq 0 $(($number-1))); do ##for each source file
fi
done
uniq_libs
=
$(
echo
$all_libs
|
tr
" "
"
\n
"
|
sort
-u
|
tr
"
\n
"
" "
)
for
lib
in
$uniq_libs
;
do
uniq_libs_long
=
"
$uniq_libs_long
$(
pwd
)
/
$lib
"
done
#
for lib in $uniq_libs; do
#
uniq_libs_long="$uniq_libs_long $(pwd)/$lib"
#
done
echo
''
echo
'VHDL_OBJ:='
"
$obj
"
echo
''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment