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

Subversion Repositories minsoc

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

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

Line No. Rev Author Line
1 110 rfajardo
#!/bin/bash
2
 
3
#system workings
4
MINSOC_DIR=`pwd`/..
5
 
6
PROJECT=$1
7
OUTPUT=$2
8
 
9
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
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
echo -n "" > $OUTPUT
35
 
36
source $PROJECT
37
 
38
for dir in "${PROJECT_DIR[@]}"
39
do
40
    adapted_dir=`adaptpath $MINSOC_DIR/$dir`
41
    echo "set_global_assignment -name SEARCH_PATH $adapted_dir" >> $OUTPUT
42
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
            adapted_file=`adaptpath $MINSOC_DIR/$dir/$file`
53
            echo "set_global_assignment -name VHDL_FILE $adapted_file" >> $OUTPUT
54
            FOUND=1
55
            break
56
        fi
57
    done
58
 
59
    if [ $FOUND != 1 ]
60
    then
61
        echo "FILE NOT FOUND: $file"
62
        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.