Release coccinelle-0.2.0
[bpt/coccinelle.git] / commons / features.ml.cpp
CommitLineData
b1b2de81
C
1(* yes sometimes cpp is useful *)
2
3(* old:
4note: in addition to Makefile.config, globals/config.ml is also modified
5by configure
6features.ml: features.ml.cpp Makefile.config
7 cpp -DFEATURE_GUI=$(FEATURE_GUI) \
8 -DFEATURE_MPI=$(FEATURE_MPI) \
9 -DFEATURE_PCRE=$(FEATURE_PCRE) \
10 features.ml.cpp > features.ml
11
12clean::
13 rm -f features.ml
14
15beforedepend:: features.ml
16
17*)
18
19#if FEATURE_MPI==1
20
21module Distribution = struct
22 let under_mpirun () =
23 Distribution.under_mpirun()
24
25 let mpi_main2 ?debug_mpi map_ex reduce_ex fxs =
26 Distribution.mpi_main2 debug_mpi map_ex reduce_ex fxs
27
28 let mpi_adjust_argv argv =
29 Distribution.mpi_adjust_argv argv
30end
31
32#else
33
34module Distribution = struct
35 let under_mpirun () =
36 false
37
38 let mpi_main2 ?debug_mpi map_ex reduce_ex fxs =
39 let res = List.map map_ex (fxs()) in
40 reduce_ex res
41
42 let mpi_adjust_argv argv =
43 argv
44end
45
46#endif
47
48
49#if FEATURE_REGEXP_PCRE==1
50#else
51#endif
52
53#if FEATURE_BACKTRACE==1
54module Backtrace = struct
55 let print () =
56 Backtrace.print ()
57end
58#else
59
60module Backtrace = struct
61 let print () =
62 print_string "no backtrace support, use configure --with-backtrace\n"
63end
64
65#endif