This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
The rules that call odoc know that it is going to read the ODOC_SYNTAX
|
||||
variable, and can rebuild as needed.
|
||||
|
||||
$ cat > dune-project << EOF
|
||||
> (lang dune 1.1)
|
||||
> (package (name l))
|
||||
> EOF
|
||||
|
||||
$ cat > dune << EOF
|
||||
> (library
|
||||
> (public_name l))
|
||||
> EOF
|
||||
|
||||
$ cat > l.ml << EOF
|
||||
> module type X = sig end
|
||||
> EOF
|
||||
|
||||
$ detect () {
|
||||
> if grep -q '>sig<' $1 ; then
|
||||
> echo it is ocaml
|
||||
> elif grep -q '{ ... }' $1 ; then
|
||||
> echo it is reason
|
||||
> else
|
||||
> echo it is unknown
|
||||
> fi
|
||||
> }
|
||||
|
||||
$ dune build @doc
|
||||
$ detect _build/default/_doc/_html/l/L/index.html
|
||||
it is ocaml
|
||||
|
||||
$ ODOC_SYNTAX=re dune build @doc
|
||||
$ detect _build/default/_doc/_html/l/L/index.html
|
||||
it is reason
|
||||
Loading…
Add table
Add a link
Reference in a new issue