permit multiline comments and strings in macros
[bpt/coccinelle.git] / env.sh
CommitLineData
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
9if [ "$1" ] ; then
10 DIR=$1
11else
12 DIR=`pwd`
13fi
14
15if [ ! -r $DIR/standard.iso ]
fc1ad971 16then
951c7801
C
17 echo "standard.iso not found in '$DIR' trying `dirname $0`"
18 DIR=`dirname $0`
fc1ad971
C
19fi
20
21if [ ! -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";
25else
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
38echo setting COCCINELLE_HOME=$DIR
39COCCINELLE_HOME=$DIR ; export COCCINELLE_HOME
34e49164
C
40
41# To find pycaml dynamic library
fc1ad971
C
42echo adding $COCCINELLE_HOME to LD_LIBRARY_PATH
43LD_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 46echo adding $COCCINELLE_HOME/python to PYTHONPATH
90aeb998 47PYTHONPATH=$COCCINELLE_HOME/python:$PYTHONPATH ; export PYTHONPATH
0708f913
C
48
49fi
34e49164 50
7f004419
C
51export PATH=$COCCINELLE_HOME:$PATH
52