~ubuntu-branches/ubuntu/utopic/findlib/utopic-proposed

« back to all changes in this revision

Viewing changes to tools/extract_args/extract_args.ml

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2012-02-28 08:50:01 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120228085001-jihzgnhxh43fetjv
Tags: 1.2.8+debian-1
* New upstream release
* Switch debian/copyright to format 1.0
* Bump Standards-Version to 3.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* $Id: extract_args.ml 94 2006-06-09 11:02:22Z gerd $ *)
 
1
(* $Id: extract_args.ml 145 2011-11-29 20:57:20Z gerd $ *)
2
2
 
3
3
(* Runs ocamlc -help and extract the command-line signature *)
4
4
 
29
29
  let help_out =
30
30
    try
31
31
      let code =
32
 
        Sys.command (sprintf "%s -help >%s" 
 
32
        Sys.command (sprintf "%s -help >%s 2>&1"
33
33
                       cmd
34
34
                       (Filename.quote temp_file)) in
35
35
      if code <> 0 then 
43
43
;;
44
44
 
45
45
 
46
 
let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_]*\\)[ \t]\\(.*\\)$";;
 
46
let switch_re = Str.regexp "[ \t]*\\(-[-a-zA-Z0-9_,]*\\)[ \t]?\\(.*\\)$";;
47
47
 
48
48
let argument_re = Str.regexp "[ \t]*[<[]";;
49
49