Commit | Line | Data |
---|---|---|
34e49164 | 1 | # I put both stuff useful for the user and developer in this file. Could |
7f004419 | 2 | # separate and have a env-user.sh, env-compile.sh, env-developer.sh, |
34e49164 C |
3 | # but it's not worth it. |
4 | ||
5 | #!!!!You need to source me with "source env.sh" from the good directory!!!! | |
0708f913 | 6 | |
951c7801 | 7 | # 14 Aug 2009 Try directory we were executed from |
fc1ad971 | 8 | |
0708f913 C |
9 | if [ "$1" ] ; then |
10 | DIR=$1 | |
11 | else | |
12 | DIR=`pwd` | |
13 | fi | |
14 | ||
15 | if [ ! -r $DIR/standard.iso ] | |
fc1ad971 | 16 | then |
951c7801 C |
17 | echo "standard.iso not found in '$DIR' trying `dirname $0`" |
18 | DIR=`dirname $0` | |
fc1ad971 C |
19 | fi |
20 | ||
21 | if [ ! -r $DIR/standard.iso ] | |
7f004419 | 22 | then echo "standard.iso not found in '$DIR'. |
951c7801 | 23 | Give the coccinelle directory as the first argument. |
34e49164 C |
24 | "; |
25 | else | |
26 | ||
27 | ||
28 | ############################################################################## | |
29 | # Compile | |
30 | ############################################################################## | |
31 | ||
32 | ############################################################################## | |
33 | # Run | |
34 | ############################################################################## | |
35 | ||
36 | # To find the data/ files such as the default standard.h file. | |
37 | # Cf also globals/config.ml | |
fc1ad971 C |
38 | echo setting COCCINELLE_HOME=$DIR |
39 | COCCINELLE_HOME=$DIR ; export COCCINELLE_HOME | |
34e49164 C |
40 | |
41 | # To find pycaml dynamic library | |
fc1ad971 C |
42 | echo adding $COCCINELLE_HOME to LD_LIBRARY_PATH |
43 | LD_LIBRARY_PATH=$COCCINELLE_HOME:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH | |
34e49164 C |
44 | |
45 | # To find .py files like the one in python/coccib | |
fc1ad971 | 46 | echo adding $COCCINELLE_HOME/python to PYTHONPATH |
90aeb998 | 47 | PYTHONPATH=$COCCINELLE_HOME/python:$PYTHONPATH ; export PYTHONPATH |
0708f913 C |
48 | |
49 | fi | |
34e49164 | 50 | |
7f004419 C |
51 | export PATH=$COCCINELLE_HOME:$PATH |
52 |