File: env.sh

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (51 lines) | stat: -rw-r--r-- 1,485 bytes parent folder | download | duplicates (3)
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
47
48
49
50
51
# I put both stuff useful for the user and developer in this file. Could
# separate and have a env-user.sh, env-compile.sh, env-developer.sh,
# but it's not worth it.

#!!!!You need to source me with "source env.sh" from the good directory!!!!

# 14 Aug 2009 Try directory we were executed from

if [ "$1" ] ; then
	DIR=$1
else
	DIR=`pwd`
fi

if [ ! -r $DIR/standard.iso ]
then
        echo "standard.iso not found in '$DIR' trying `dirname $0`"
	DIR=`dirname $0`
fi

if [ ! -r $DIR/standard.iso ]
    then echo "standard.iso not found in '$DIR'.
  Give the coccinelle directory as the first argument.
";
else


##############################################################################
# Compile
##############################################################################

##############################################################################
# Run
##############################################################################

# To find the data/ files such as the default standard.h file.
# Cf also globals/config.ml
echo setting COCCINELLE_HOME=$DIR
COCCINELLE_HOME=$DIR				; export COCCINELLE_HOME

# To find pycaml dynamic library
echo adding $COCCINELLE_HOME to LD_LIBRARY_PATH
LD_LIBRARY_PATH=$COCCINELLE_HOME:$LD_LIBRARY_PATH ; export LD_LIBRARY_PATH

# To find .py files like the one in python/coccib
echo adding $COCCINELLE_HOME/python to PYTHONPATH
PYTHONPATH=$COCCINELLE_HOME/python:$PYTHONPATH	; export PYTHONPATH

fi

export PATH=$COCCINELLE_HOME:$PATH