;; This rule create an executable which outputs an HTML page which contains
;; the Javascript code generated by the above rule and the required css code
;; from the file style.css
(executable
 (name index)
 (modules index)
 (libraries tyxml tyxml.functor))

(rule
 (deps (:css style.css) (:acg acg/acgjs.bc.js) (:gui gui/webgui.bc.js))
 (action
  (with-stdout-to acgtk.html
   (run ./index.exe %{css} %{acg} %{gui}))))

;; The file acgtk.html is stored in the site "browser" of package acgtk so that
;; it can be found and opened when running "acg --browser"
(install
 (package acgtk-browser)
 (section (site (acgtk browser)))
 (files acgtk.html))
