let incremental = ref true
let separate = ref false
+let preamble =
+ L.get_preamble ()
+
let clear () =
incremental := true;
separate := false;
Scanf.sscanf s "%u" A.mk_and
let process_centralized conf =
- let preamble = L.get_preamble conf in
+ R.load_from conf;
if R.has "xoa.objects" && R.has "xoa.notations" then begin
- let ooch = L.open_out preamble (R.get_string "xoa.objects") in
- let noch = L.open_out preamble (R.get_string "xoa.notations") in
+ let ooch = L.open_out true preamble (R.get_string "xoa.objects") in
+ let noch = L.open_out false preamble (R.get_string "xoa.notations") in
List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
L.out_include ooch (R.get_string "xoa.notations" ^ ".ma");
List.iter (E.generate ooch noch) (R.get_list unm_ex "xoa.ex");
in
if !incremental && L.exists_out oname && L.exists_out nname then () else
begin
- let ooch = L.open_out p oname in
- let noch = L.open_out p nname in
+ let ooch = L.open_out true p oname in
+ let noch = L.open_out false p nname in
List.iter (L.out_include ooch) (R.get_list R.string "xoa.include");
L.out_include ooch (nname ^ ".ma");
E.generate ooch noch d;
end
let process_distributed conf =
- let preamble = L.get_preamble conf in
+ R.load_from conf;
if R.has "xoa.objects" && R.has "xoa.notations" then begin
let st = preamble, R.get_string "xoa.objects", R.get_string "xoa.notations" in
List.iter (generate st) (R.get_list unm_ex "xoa.ex");