2 ||M|| This file is part of HELM, an Hypertextual, Electronic
3 ||A|| Library of Mathematics, developed at the Computer Science
4 ||T|| Department, University of Bologna, Italy.
6 ||T|| HELM is free software; you can redistribute it and/or
7 ||A|| modify it under the terms of the GNU General Public License
8 \ / version 2 or (at your option) any later version.
9 \ / This software is distributed as is, NO WARRANTY.
10 V_______________________________________________________________ *)
16 module R = Helm_registry
25 let help_O = "<dir> Set this output directory"
26 let help_X = " Clear configuration and options"
27 let help_l = "<file> Output the list of generated files in this file"
28 let help_p = " omit types (default: no)"
29 let help_t = " Test anticipation (default: no)"
33 (* internal functions *******************************************************)
37 if !G.no_init then begin
43 F.check_suffix s ".conf.xml"
46 failwith "MaTeX: main: registry not initialized"
49 failwith ("MaTeX: main: malformed argument: " ^ s)
52 let file = F.concat !G.out_dir fname in
53 G.close_list (); G.list_och := Some (open_out file)
56 if is_registry s then init s
57 else if !G.no_init then no_init ()
58 else if L.is_uri s then E.process (U.uri_of_string s)
64 "-O", A.String ((:=) G.out_dir), help_O;
65 "-X", A.Unit G.clear, help_X;
66 "-l", A.String set_list, help_l;
67 "-p", A.Set G.no_types, help_p;
68 "-t", A.Set G.test, help_t;
71 | X.Error s -> X.log s