File: configure

package info (click to toggle)
ocaml-dune 3.17.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,324 kB
  • sloc: ml: 181,128; ansic: 3,629; sh: 1,054; lisp: 625; makefile: 171; python: 125; cpp: 48; javascript: 10
file content (27 lines) | stat: -rwxr-xr-x 645 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
#!/usr/bin/env ocaml
(* -*- tuareg -*- *)

#warnings "-40";;

#use "config_common.ml"

let () =
  let enable_blah = ref Auto in
  Arg.parse
    (Arg.align
       [ "--enable-blah", Unit (fun () -> enable_blah := Yes),
         " Enable support for blah"
       ; "--disable-blah", Unit (fun () -> enable_blah := No),
         " Enable support for blah"
       ])
    (fun s -> raise (Arg.Bad (Printf.sprintf "don't know what to do with %S" s)))
    "Usage: ./configure [OPTIONS]";
  let oc = open_out_bin "config" in
  Printf.fprintf oc {|
let enable_blah = %s
|}
    (string_of_switch !enable_blah);
  close_out oc
;;

#use "real_configure.ml"