blob: de694fd1d43a89f0c23c8da5068f2cd077ccec7c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#!/bin/bash
OS=`uname`
SCRIPTPATH=`dirname $0`
FORCEARG=""
case $OS in
"Darwin")
BINNAME=vpc_osx
;;
"Linux")
BINNAME=vpc_linux
;;
*)
echo "Couldn't find appropriate VPC binary, fix the script."
exit -1
;;
esac
CWD=`pwd`
cd $SCRIPTPATH/../../external/vpc/utils/vpc
# ask make if we need to do any work, returns 0 if we don't,
# non zero if we do.
make -q
RC=$?
if [ $RC -eq 1 ]; then
FORCEARG="/f"
elif [ $RC -eq 2 ]; then
FORCEARG="/f"
make clean
fi
make -j4
if [ $? -ne 0 ]; then
exit -1
fi
cd $CWD
if [ $OS == "Darwin" ]; then
$SCRIPTPATH/$BINNAME $FORCEARG $@
elif [ $OS == "Linux" ]; then
$SCRIPTPATH/$BINNAME $FORCEARG $@
else
echo "Couldn't find appropriate VPC binary, fix the script."
exit -1
fi
|