#!/usr/bin/perl
+
+# Author: Yoann Padioleau
+
######################################################################
# Prelude
######################################################################
# assume standard: diff
# assume standard: perl
-#TODO python 2.5 and perhaps a --disable-python
+#TODO check python 2.5 ?
+
+# need latex and hevea if want to compile the documentation
#old: --with-menhir=/path/to/menhirLib or `ocamlfind query menhirLib`
my $project =
"coccinelle";
my $projectcmdline =
- "spatch -cocci_file demos/simple.cocci demos/simple.c";
+ "spatch -sp_file demos/simple.cocci demos/simple.c -o /tmp/new_simple.c";
######################################################################
# Options
my $python=1;
my $trac=0;
my $opt=".opt";
+my $tarzan=1;
local $_ = join ' ', @ARGV;
/--no-opt/ and $opt = "";
/--opt/ and $opt = ".opt";
+#tarzan by default (used by score file parsing and now also for sexp_ast_c.ml)
+
+
#if($ARGV[0] =~ "--prefix=(.*)") {
# $prefix = $1;
#}
$error += check_config(
"make -v 2>&1 |grep Make|",
- "GNU Make 3\.[0-9]+", #version 3.81
+ "GNU Make [^0-9]*3\.[0-9]+.*", #version 3.79.1, 3.81
"make (gnu version) is present.",
"The program gnu make is missing or is not a good version.
We need 3.XX",
";
} else {
+#pad: before the message was saying (make depend); make all
+# I found this confusing so I removed it.
+
pr2 "
----------------------------------------------------------------------
All seems fine for $project.
To compile $project type:
- make depend; make
+ \$ make depend
+ \$ make all
+
+Or alternatively, for the optimized version:
+ \$ make all.opt
+If you want both, you could use:
+ \$ make world
+
To install type:
- make install
+ \$ make install
Then, to test $project simply type:
- $projectcmdline
+ \$ $projectcmdline
";
# Features
FEATURE_PYTHON=$python
+FEATURE_TARZAN=$tarzan
# The OPTBIN variable is here to allow to use ocamlc.opt instead of
# ocaml, when it is available, which speeds up compilation. So
`cd python; ln -s ${pythonprefix}pycocci_aux.ml pycocci_aux.ml;`;
`cd python; make depend`;
-my $command = "perl -p -i -e 's#Not_found.\*#Not_found->\\\"$src\\\"#' globals/config.ml";
+my $command = "perl -p -e 's#Not_found.\*#Not_found->\\\"$src\\\"#' globals/config.ml.in > globals/config.ml";
`$command`;
#