File: run.t

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 (26 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
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
This example creates a configuration file using a fallback rule.
See README.org for details

By default, config is set:

  $ dune exec ./src/plop.exe
  Built with support for blah: true
  Path to blah is:             "/path/to/blah"

Print generated config:

  $ cat _build/default/config.full
  
  let with_blah = true
  let blah_path = "/path/to/blah"

Now, we disable it, and re-run:

  $ echo "let enable_blah = No" > config
  $ dune exec ./src/plop.exe
  Built with support for blah: false
  Path to blah is:             "<no support for blah>"
  $ cat _build/default/config.full
  
  let with_blah = false
  let blah_path = "<no support for blah>"