OASISFormat: 0.4
Name: tyxml
Version: 4.1.0
Homepage: http://ocsigen.org/tyxml/
Authors:
  Thorsten Ohl,
  Vincent Balat,
  Gabriel Kerneis,
  Cecile Herbelin,
  Simon Castellan,
  Boris Yakobowski,
  Pierre Chambart,
  Grégoire Henry
License: LGPL-2.1 with OCaml linking exception
Plugins: META (0.3), DevFiles (0.3)
BuildTools: ocamlbuild
AlphaFeatures: pure_interface
OCamlVersion: >= 4.02.0

Synopsis: Statically correct HTML and SVG documents

Flag syntax
  Description: Build the camlp4 syntax extension.
  Default: false

Flag ppx
  Description: Build the ppx syntax extension.
  Default: true

Library tyxml
  FindlibName: tyxml
  Path: implem
  Modules:
    Tyxml_xml,
    Tyxml_svg,
    Tyxml_html,
    Tyxml
  BuildDepends: tyxml.functor, re, uutf
  XMETAExtraLines:
    archive(byte,toploop) += "tyxml_top.cma"

Library tyxml_f
  FindlibName: functor
  FindlibParent: tyxml
  XMETADescription:
    Statically correct HTML and SVG documents (Functor version)
  Path: lib
  Modules:
    Xml_iter,
    Xml_sigs,
    Xml_wrap,
    Xml_print,
    Svg_sigs,
    Svg_types,
    Svg_f,
    Html_sigs,
    Html_types,
    Html_f
  BuildDepends: uchar, uutf, re

Library tyxml_top
  FindlibName: top
  FindlibParent: tyxml
  BuildDepends: compiler-libs.toplevel
  Path: implem/top
  Modules: Tyxml_top
  XMETARequires: tyxml
  XMETADescription:
    Toplevel printers for HTML, SVG and XML

Library tyxml_tools
  FindlibName: tools
  FindlibParent: tyxml
  Path: tools
  Modules: Tyxml_name
  BuildDepends: bytes

Executable autoname
  Path: tools
  MainIs: autoname.ml
  Install: false
  BuildDepends: tyxml.tools

Library pa_tyxml
  Build$: flag(syntax)
  FindlibName: syntax
  FindlibParent: tyxml
  XMETAType: syntax
  XMETADescription:
    HTML and SVG syntax extension
  XMETAExtraLines: requires(toploop) = "tyxml"
  Path: syntax
  BuildDepends:
    bytes, camlp4
  Modules:
    Pa_tyxml
  InternalModules:
    Xmllexer,
    Basic_types,
    Camllexer,
    Xhtmlparser

Library tymlx_p
  Build$: flag(syntax)
  FindlibName: parser
  FindlibParent: tyxml
  XMETADescription:
    Simple XML parser
  Path: syntax
  BuildDepends:
    bytes, camlp4.lib
  InternalModules:
    Xmllexer
  Modules:
    Simplexmlparser

## Ppx

Library ppx
  Build$: flag(ppx)
  Install$: flag(ppx)
  FindlibName: ppx
  FindlibParent: tyxml
  InternalModules: Ppx_tyxml_empty
  Path: ppx
  XMETADescription:
    HTML and SVG syntax extension (ppx)
  XMETARequires: tyxml
  XMETAExtraLines: ppx = "ppx_tyxml"

Library ppx_internal
  Build$: flag(ppx)
  Install$: flag(ppx)
  FindlibName: internal
  FindlibParent: ppx
  Path: ppx
  InternalModules:
    Ppx_attributes, Ppx_attribute_value, Ppx_common, Ppx_namespace,
    Ppx_element_content, Ppx_element, Ppx_sigs_reflected,
    Html_sigs_reflected, Svg_sigs_reflected,
    Html_types_reflected, Svg_types_reflected
  Modules: Ppx_tyxml
  XMETADescription:
    HTML and SVG ppx library
  BuildDepends:
    re.str, ppx_tools.metaquot, markup, tyxml.tools

Executable ppx_tyxml
  Build$: flag(ppx)
  Install$: flag(ppx)
  Path: ppx
  MainIs: ppx_tyxml_ex.ml
  BuildDepends: tyxml.ppx.internal
  CompiledObject: best

Executable ppx_reflect
  Build$: flag(ppx)
  Install: false
  Path: ppx
  MainIs: ppx_reflect.ml
  BuildDepends: ppx_tools.metaquot, tyxml.tools
  CompiledObject: best

## Tests

Executable emit_big
  Install: false
  Build$: flag(tests) && flag(ppx)
  Path: test
  MainIs: emitbig.ml
  BuildDepends: tyxml, unix
  CompiledObject: best

Executable main_test
  Install: false
  Build$: flag(tests) && flag(ppx)
  Path: test
  MainIs: main_test.ml
  BuildDepends: tyxml, alcotest

Test html
  Command: $main_test
  TestTools: main_test
  Run$: flag(tests) && flag(ppx)

## This test is disabled as it can't run on both 4.03 and 4.02
## Curent oasis doesn't allow to restrict the version just for this test.
# Test html_fail
#   Command: ocamlbuild -use-ocamlfind test/html_fail.stamp
#   TestTools: main_test
#   Run$: flag(tests) && flag(ppx)

## Examples

Executable basic_website
  Install: false
  Build$: flag(tests)
  Path: examples/basic_website
  MainIs: site_html.ml
  BuildDepends: tyxml
  CompiledObject: best

Test basic_website
  WorkingDirectory: examples/basic_website
  Command: $basic_website
  TestTools: basic_website
  Run$: flag(tests)

Executable basic_website_ppx
  Install: false
  Build$: flag(tests) && flag(ppx)
  Path: examples/basic_website_ppx
  MainIs: site_html.ml
  BuildDepends: tyxml
  CompiledObject: best

Test basic_website_ppx
  WorkingDirectory: examples/basic_website_ppx
  Command: $basic_website_ppx
  TestTools: basic_website_ppx
  Run$: flag(tests) && flag(ppx)

Executable mini_website
  Install: false
  Build$: flag(tests)
  Path: examples/mini_website
  MainIs: minihtml.ml
  BuildDepends: tyxml
  CompiledObject: best

Test mini_website
  WorkingDirectory: examples/mini_website
  Command: $mini_website
  TestTools: mini_website
  Run$: flag(tests)

Executable mini_website_ppx
  Install: false
  Build$: flag(tests) && flag(ppx)
  Path: examples/mini_website_ppx
  MainIs: minihtml.ml
  BuildDepends: tyxml
  CompiledObject: best

Test mini_website_ppx
  WorkingDirectory: examples/mini_website_ppx
  Command: $mini_website
  TestTools: mini_website
  Run$: flag(tests) && flag(ppx)

## Documentation

Document "tyxml-api"
  Title: API reference for TyXML
  Type: ocamlbuild (0.3)
  Install: true
  InstallDir: $htmldir/api
  BuildTools: ocamldoc
  XOCamlbuildPath: ./
  XOCamlbuildLibraries:
    tyxml, tyxml.functor, tyxml.parser, tyxml.syntax, tyxml.ppx.internal
