; Regenerate using dune build @gendune --auto-promote

(include dune.inc)

(executable
 (name gen_dune)
 (preprocess
  (pps ppx_string))
 (libraries pcre liquidsoap_build_tools)
 (modules gen_dune))

(executable
 (name subst_md)
 (libraries pcre liquidsoap_lang)
 (modules subst_md))

(rule
 (alias gendune)
 (target dune.inc.gen)
 (deps
  (source_tree .))
 (action
  (with-stdout-to
   dune.inc.gen
   (run ./gen_dune.exe))))

(rule
 (alias gendune)
 (action
  (diff dune.inc dune.inc.gen)))

(rule
 (alias doc)
 (target liquidsoap.1)
 (deps
  no-pandoc
  (:liquidsoap_man liquidsoap.1.md))
 (action
  (ignore-outputs
   (system
    "pandoc -s -t man %{liquidsoap_man} -o liquidsoap.1 || cp no-pandoc liquidsoap.1"))))

(install
 (section man)
 (package liquidsoap)
 (files liquidsoap.1))
