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

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [prj/] [scripts/] [xilinxprj.sh] - Blame information for rev 91

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
SRC_OUTPUT=$2
8
TOP_MODULE=$3
9
 
10
if [ ! -f $PROJECT ]
11
then
12
    echo "Unexistent project file."
13
    exit 1
14
fi
15
 
16
if [ -z "$SRC_OUTPUT" ]
17
then
18
    echo "Third argument should be the destintion file for the source inclusions."
19
    exit 1
20
fi
21 88 rfajardo
echo -n "" > $SRC_OUTPUT
22 85 rfajardo
 
23
source $PROJECT
24
 
25
for file in "${PROJECT_SRC[@]}"
26
do
27
    FOUND=0
28
 
29
    for dir in "${PROJECT_DIR[@]}"
30
    do
31
        if [ -f $MINSOC_DIR/$dir/$file ]
32
        then
33
            echo -n '`include "' >> $SRC_OUTPUT
34
            echo -n "$MINSOC_DIR/$dir/$file" >> $SRC_OUTPUT
35
            echo '"' >> $SRC_OUTPUT
36
            FOUND=1
37 91 rfajardo
            break
38 85 rfajardo
        fi
39
    done
40
 
41
    if [ $FOUND != 1 ]
42
    then
43
        echo "FILE NOT FOUND"
44
        exit 1
45
    fi
46
done
47
 
48
if [ -n "$TOP_MODULE" ]
49
then
50
    for file in src/blackboxes/*.v
51
    do
52
        echo -n '`include "' >> $SRC_OUTPUT
53
        echo -n "`pwd`/$file" >> $SRC_OUTPUT
54
        echo '"' >> $SRC_OUTPUT
55
    done
56
fi

powered by: WebSVN 2.1.0

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