OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [branches/] [rc-1.0/] [prj/] [scripts/] [simverilog.sh] - Blame information for rev 127

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 85 rfajardo
#!/bin/bash
2
 
3
#system workings
4
MINSOC_DIR=`pwd`/..
5
 
6
PROJECT=$1
7
OUTPUT=$2
8
 
9 108 rfajardo
ENV=`uname -o`
10
 
11
function adaptpath
12
{
13
    if [ "$ENV" == "Cygwin" ]
14
    then
15
        local cygpath=`cygpath -w $1`
16
        local result=`echo $cygpath | sed 's/\\\\/\\//g'`
17
        echo "$result"
18
    else
19
        echo "$1"
20
    fi
21
}
22
 
23 85 rfajardo
if [ ! -f $PROJECT ]
24
then
25
    echo "Unexistent project file."
26
    exit 1
27
fi
28
 
29
if [ -z "$OUTPUT" ]
30
then
31
    echo "Second argument should be the destintion file for the file and directory inclusions."
32
    exit 1
33
fi
34 88 rfajardo
echo -n "" > $OUTPUT
35 85 rfajardo
 
36
source $PROJECT
37
 
38
for dir in "${PROJECT_DIR[@]}"
39
do
40 108 rfajardo
    adapted_dir=`adaptpath $MINSOC_DIR/$dir`
41
    echo "+incdir+$adapted_dir" >> $OUTPUT
42 85 rfajardo
done
43
 
44
for file in "${PROJECT_SRC[@]}"
45
do
46
    FOUND=0
47
 
48
    for dir in "${PROJECT_DIR[@]}"
49
    do
50
        if [ -f $MINSOC_DIR/$dir/$file ]
51
        then
52 108 rfajardo
            adapted_file=`adaptpath $MINSOC_DIR/$dir/$file`
53
            echo "$adapted_file" >> $OUTPUT
54 85 rfajardo
            FOUND=1
55 91 rfajardo
            break
56 85 rfajardo
        fi
57
    done
58
 
59
    if [ $FOUND != 1 ]
60
    then
61 110 rfajardo
        echo "FILE NOT FOUND: $file"
62 85 rfajardo
        exit 1
63
    fi
64
done

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.