(include_subdirs qualified)

(library
 (name eliom_server)
 (public_name eliom.server)
 (synopsis "Eliom: server-side")
 (wrapped false)
 (preprocess
  (pps js_of_ocaml-ppx_deriving_json))
 (flags
  (:standard
   (:include type_includes)))
 (library_flags
  (:standard -linkall))
 (libraries lwt_react ocsigenserver logs ocsipersist re tyxml))

(include dune.server)

(rule
 (target dune.server)
 (mode promote)
 (deps
  (glob_files ../*)
  (universe))
 (action
  (with-stdout-to
   %{target}
   (run ../../tools/gen_dune.exe --server ..))))

(rule
 (target type_includes)
 (deps (universe))
 (action
  (with-stdout-to
   %{target}
   (system "printf '('; ocamlfind query -i-format js_of_ocaml; printf ')'"))))
