Release coccinelle-0.1.6
[bpt/coccinelle.git] / env.sh
1 # I put both stuff useful for the user and developer in this file. Could
2 # separate and have a env-user.sh, env-compile.sh, env-developer.sh,
3 # but it's not worth it.
4
5 #!!!!You need to source me with "source env.sh" from the good directory!!!!
6
7 if [ "$1" ] ; then
8 DIR=$1
9 else
10 DIR=`pwd`
11 fi
12
13 if [ ! -r $DIR/standard.iso ]
14 then echo "There is no standard.iso in '$DIR'.
15 Are you sure you run this script from the coccinelle directory ?
16 Alternatively, provide the coccinelle directory as the first argument.
17 ";
18 else
19
20
21 ##############################################################################
22 # Compile
23 ##############################################################################
24
25 ##############################################################################
26 # Run
27 ##############################################################################
28
29 # To find the data/ files such as the default standard.h file.
30 # Cf also globals/config.ml
31 echo setting COCCINELLE_HOME=${COCCINELLE_HOME:=$DIR}
32
33 # To find pycaml dynamic library
34 echo setting LD_LIBRARY_PATH=${LD_LIBRARY_PATH:=$COCCINELLE_HOME:$LD_LIBRARY_PATH}
35
36 # To find .py files like the one in python/coccib
37 echo setting PYTHONPATH=${PYTHONPATH:=$COCCINELLE_HOME/python:$PYTHONPATH}
38
39 export COCCINELLE_HOME LD_LIBRARY_PATH PYTHONPATH
40
41 fi
42