X-Git-Url: https://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/faf9a90c4f9e1e85931cb6b01de660587416eb97..17ba07880e1838028b4516ba7a2db2147b3aa1c9:/globals/flag.ml diff --git a/globals/flag.ml b/globals/flag.ml index c177bca..6b58465 100644 --- a/globals/flag.ml +++ b/globals/flag.ml @@ -1,3 +1,29 @@ +(* + * Copyright 2012, INRIA + * Julia Lawall, Gilles Muller + * Copyright 2010-2011, INRIA, University of Copenhagen + * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix + * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen + * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix + * This file is part of Coccinelle. + * + * Coccinelle is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, according to version 2 of the License. + * + * Coccinelle is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Coccinelle. If not, see . + * + * The authors reserve the right to distribute this or future versions of + * Coccinelle under other licenses. + *) + + let sgrep_mode2 = ref false let show_misc = ref true @@ -8,15 +34,33 @@ let show_trying = ref false let track_iso_usage = ref false -let use_glimpse = ref false +type scanner = IdUtils | Glimpse | Grep | Google of string | NoScanner +let scanner = ref Grep let pyoutput = ref "coccilib.output.Console" +let ocamlc = ref "ocamlc" +let ocamlopt = ref "ocamlopt" +let ocamldep = ref "ocamldep" +let ocamlfind = ref "ocamlfind" + (*"Some" value is the path with respect to which the patch should be created*) let patch = ref (None : string option) let make_hrule = ref (None : string (*dir*) option) +let hrule_per_file = ref true (* if false, then a rule per function *) let currentfile = ref (None : string option) let current_element = ref "" +let dir = ref "" + +let defined_virtual_rules = ref ([] : string list) +let defined_virtual_env = ref ([] : (string*string) list) + +let set_defined_virtual_rules s = + match Str.split (Str.regexp "=") s with + [name;vl] -> defined_virtual_env := (name,vl) :: !defined_virtual_env + | _ -> defined_virtual_rules := s :: !defined_virtual_rules + +let c_plus_plus = ref false