Version 1.0.0-rc17 has been released. Some changes are:
[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.
d6ce1786
C
9Once you have installed coccinelle, there is a script 'spatch' in /usr/bin
10or /usr/local/bin that invokes the Coccinelle program.
11
12If you want to run Coccinelle without installing it, you can run the
13Coccinelle program directly from the download/build directory. You may then
14have to setup a few environment variables so that the Coccinelle program
708f4980 15knows where to find its configuration files.
34e49164
C
16For bash do:
17
708f4980 18 $ source env.sh
34e49164
C
19
20For tcsh do:
21
708f4980 22 $ source env.csh
34e49164 23
d6ce1786
C
24
25You can test coccinelle with:
978fd7e5
C
26
27 $ spatch -sp_file demos/simple.cocci demos/simple.c -o /tmp/new_simple.c
34e49164 28
d6ce1786 29If you haven't installed coccinelle, run then ./spatch or ./spatch.opt
34e49164 30
34e49164 31
34e49164
C
32
33If you downloaded the bytecode version of spatch you may first
34have to install OCaml (which contains the 'ocamlrun' bytecode interpreter,
35the equivalent of 'java', the Java virtual machine, but for OCaml) and then do:
36
978fd7e5 37 $ ocamlrun spatch -sp_file demos/simple.cocci demos/simple.c -o /tmp/new_simple.c
708f4980
C
38
39
708f4980
C
40For more information on Coccinelle, type 'make docs' and have a look at the
41files in the docs/ directory. You may need to install the texlive-fonts-extra
42packages from your distribution to compile some of the LaTeX documentation
43files.
44
174d1640
C
45 ** Runtime dependencies under Debian/Ubuntu**
46
47 - For the OCaml scripting feature in SmPL
48 ocaml-native-compilers
49 or ocaml-nox