File: mlpost_desc_options.ml

package info (click to toggle)
mlpost 0.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,776 kB
  • sloc: ml: 17,440; makefile: 469
file content (63 lines) | stat: -rw-r--r-- 2,804 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) Johannes Kanig, Stephane Lescuyer                       *)
(*  Jean-Christophe Filliatre, Romain Bardou and Francois Bobot           *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software 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.                  *)
(*                                                                        *)
(**************************************************************************)

open Format
open Arg

let pdf = ref true
let latex_file = ref None
let set_latex_file f =
  if not (Sys.file_exists f) then begin
    eprintf "mlpost: %s: no such file@." f;
    exit 1
  end;
  latex_file := Some f
let xpdf = ref false
let eps = ref false
let verbose = ref false
let cairo = ref false
let t1disasm = ref None
let depend = ref false
let dumpable = ref false
let dont_clean = ref false
let mp = ref false
let png = ref false
let svg = ref false
let filename_prefix = ref ""

(* notuple please or change Tool.wrap_options *)
let spec =
  (["-pdf", Set pdf, " Generate .mps files (default)";
    "-mp", Set mp, " Generate .mp files";
    "-png", Set png, " Generate .png files";
    "-ps", Clear pdf, " Generate .1 files";
    "-svg", Set svg, " Generate .svg files (only with cairo)";
    "-latex", String set_latex_file, "<main.tex> Scan the LaTeX prelude";
    "-eps", Set eps, " Generate encapsulated postscript files";
    "-xpdf", Set xpdf, " wysiwyg mode using xpdf remote server";
    "-v", Set verbose, " be a bit more verbose";
    "-depend", Set depend,
      " output dependency lines in a format suitable for the make(1) utility";
    "-dumpable", Set dumpable, " output one name of dumpable file by line";
    "-dont-clean", Set dont_clean, " Don't remove intermediate files";
    "-cairo" , Set cairo,
      " Use the cairo backend instead of metapost";
    "-prefix", String ((:=) filename_prefix), 
      "Add to all the filename this prefix"; 
    "-t1disasm" , String (fun s -> t1disasm := Some s),
      " Set the program used to decrypt PostScript Type 1 font, \
        only with cairo (default built-in one)"])