Release coccinelle-0.2.0
[bpt/coccinelle.git] / configure
index 17533b9..904e421 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,4 +1,7 @@
 #!/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
@@ -25,6 +30,7 @@ my $prefix="/usr/local";
 my $python=1;
 my $trac=0;
 my $opt=".opt";
+my $tarzan=1;
 
 local $_ = join ' ', @ARGV;
 
@@ -37,6 +43,9 @@ 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;
 #}
@@ -160,7 +169,7 @@ pr2 "";
 
 $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",
@@ -202,6 +211,9 @@ on the $project website. !!!!
 ";
 } else {
 
+#pad: before the message was saying (make depend); make all
+# I found this confusing so I removed it.
+
     pr2 "
 
 ----------------------------------------------------------------------
@@ -209,13 +221,20 @@ on the $project website. !!!!
 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
 
 ";
 
@@ -262,6 +281,7 @@ SHAREDIR=$src
 
 # 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
@@ -278,7 +298,7 @@ my $pythonprefix = $python ? "yes_" : "no_";
 `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`;
 
 #