X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fbin%2Frecomm%2Frecomm.ml;h=bac315438dea9bc465fbeff79c7946e982c43128;hp=a2336ad9c058a0301a2a3e3d7483c828488ce415;hb=dbc57c92512c04b3fd88f8289bb8dbe99b2f90e0;hpb=baa54e5db0fb93c4242dd1b67a5018ca63206cf6
diff --git a/matita/matita/contribs/lambdadelta/bin/recomm/recomm.ml b/matita/matita/contribs/lambdadelta/bin/recomm/recomm.ml
index a2336ad9c..bac315438 100644
--- a/matita/matita/contribs/lambdadelta/bin/recomm/recomm.ml
+++ b/matita/matita/contribs/lambdadelta/bin/recomm/recomm.ml
@@ -10,6 +10,8 @@ module G = RecommGc
let write = ref false
+let force = ref false
+
let chdir path =
Sys.chdir path
@@ -23,7 +25,7 @@ let rec process path name =
Printf.eprintf "processing: %S\n" file;
let orig = EI.read_srcs file in
let lint = EC.recomm_srcs orig in
- if !write && lint <> orig then EO.write_srcs file lint
+ if !force || (!write && lint <> orig) then EO.write_srcs file lint
end else begin
Printf.eprintf "skipping: %S\n" file
end
@@ -32,13 +34,15 @@ let msg_C = "
Set this working directory (default: .)"
let msg_L = " Log lexer tokens (default: no)"
let msg_c = " Set these output columns (default: 78)"
let msg_d = " Log with dark colors (default: no)"
+let msg_f = " Write all output files (default: no)"
let msg_k = " Log key comments (default: no)"
let msg_m = " Log mark comments (default: no)"
let msg_n = " Log with no colors (default: yes)"
let msg_o = " Log other comments (default: no)"
+let msg_r = " Replace the input files (default: no)"
let msg_s = " Log section comments (default: no)"
let msg_t = " Log title comments (default: no)"
-let msg_w = " Write the output files (default: no)"
+let msg_w = " Write the changed output files (default: no)"
let main =
Arg.parse [
@@ -46,10 +50,12 @@ let main =
"-L", Arg.Set EL.debug, msg_m;
"-c", Arg.Int ((:=) EO.width), msg_c;
"-d", Arg.Clear EC.bw, msg_d;
+ "-f", Arg.Set force, msg_f;
"-k", Arg.Set EC.log_k, msg_k;
"-m", Arg.Set EC.log_m, msg_m;
"-n", Arg.Set EC.bw, msg_n;
"-o", Arg.Set EC.log_o, msg_o;
+ "-r", Arg.Set EO.replace, msg_r;
"-s", Arg.Set EC.log_s, msg_s;
"-t", Arg.Set EC.log_t, msg_t;
"-w", Arg.Set write, msg_w;