permit multiline comments and strings in macros
[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 # 14 Aug 2009 Try directory we were executed from
8
9 if [ "$1" ] ; then
10 DIR=$1
11 else
12 DIR=`pwd`
13 fi
14
15 if [ ! -r $DIR/standard.iso ]
16 then
17 echo "standard.iso not found in '$DIR' trying `dirname $0`"
18 DIR=`dirname $0`
19 fi
20
21 if [ ! -r $DIR/standard.iso ]
22 then echo "standard.iso not found in '$DIR'.
23 Give the coccinelle directory as the first argument.
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
38 echo setting COCCINELLE_HOME=$DIR
39 COCCINELLE_HOME=$DIR ; export COCCINELLE_HOME
40
41 # To find pycaml dynamic library
42 echo adding $COCCINELLE_HOME to LD_LIBRARY_PATH
43 LD_LIBRARY_PATH=$COCCINELLE_HOME:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH
44
45 # To find .py files like the one in python/coccib
46 echo adding $COCCINELLE_HOME/python to PYTHONPATH
47 PYTHONPATH=$COCCINELLE_HOME/python:$PYTHONPATH ; export PYTHONPATH
48
49 fi
50
51 export PATH=$COCCINELLE_HOME:$PATH
52