Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / readme.txt
CommitLineData
708f4980
C
1 Coccinelle
2
3
34e49164
C
4Coccinelle allows programmers to easily write some complex
5style-preserving source-to-source transformations on C source code,
6like for instance to perform some refactorings.
7
8To install Coccinelle from its source, see the instructions in install.txt.
34e49164
C
9Once you have installed Coccinelle (either from the source or from one
10of the binary form available on the Coccinelle website), You may have
11to setup a few environment variables so that the Coccinelle program
708f4980 12knows where to find its configuration files.
34e49164
C
13For bash do:
14
708f4980 15 $ source env.sh
34e49164
C
16
17For tcsh do:
18
708f4980 19 $ source env.csh
34e49164 20
978fd7e5
C
21You can then test coccinelle with:
22
23 $ spatch -sp_file demos/simple.cocci demos/simple.c -o /tmp/new_simple.c
34e49164
C
24
25
34e49164 26
34e49164
C
27
28If you downloaded the bytecode version of spatch you may first
29have to install OCaml (which contains the 'ocamlrun' bytecode interpreter,
30the equivalent of 'java', the Java virtual machine, but for OCaml) and then do:
31
978fd7e5 32 $ ocamlrun spatch -sp_file demos/simple.cocci demos/simple.c -o /tmp/new_simple.c
708f4980
C
33
34
35
36For more information on Coccinelle, type 'make docs' and have a look at the
37files in the docs/ directory. You may need to install the texlive-fonts-extra
38packages from your distribution to compile some of the LaTeX documentation
39files.
40
174d1640
C
41 ** Runtime dependencies under Debian/Ubuntu**
42
43 - For the OCaml scripting feature in SmPL
44 ocaml-native-compilers
45 or ocaml-nox