Merge branch 'master' into workspace-env-2

This commit is contained in:
Rudi Grinberg 2018-07-30 17:07:41 +02:00 committed by GitHub
commit 89a381530d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -488,7 +488,7 @@ stanza is rejected by dune:
ocamllex ocamllex
-------- --------
``(ocamllex (<names>))`` is essentially a shorthand for: ``(ocamllex <names>)`` is essentially a shorthand for:
.. code:: scheme .. code:: scheme
@ -503,13 +503,13 @@ To use a different rule mode, use the long form:
.. code:: scheme .. code:: scheme
(ocamllex (ocamllex
(modules (<names>)) (modules <names>)
(mode <mode>)) (mode <mode>))
ocamlyacc ocamlyacc
--------- ---------
``(ocamlyacc (<names>))`` is essentially a shorthand for: ``(ocamlyacc <names>)`` is essentially a shorthand for:
.. code:: scheme .. code:: scheme
@ -524,7 +524,7 @@ To use a different rule mode, use the long form:
.. code:: scheme .. code:: scheme
(ocamlyacc (ocamlyacc
(modules (<names>)) (modules <names>)
(mode <mode>)) (mode <mode>))
menhir menhir

View File

@ -136,7 +136,7 @@ Add this field to your ``library`` or ``executable`` stanzas:
.. code:: scheme .. code:: scheme
(preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{first-dep}))) (preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file})))
Additionally, if you are include a ``config.h`` file, you need to Additionally, if you are include a ``config.h`` file, you need to
declare the dependency to this file via: declare the dependency to this file via:
@ -154,7 +154,7 @@ Write this in your ``dune`` file:
(rule (rule
(targets foo.ml) (targets foo.ml)
(deps foo.cppo.ml <other files that foo.ml includes>) (deps (:first-dep foo.cppo.ml) <other files that foo.ml includes>)
(action (run %{bin:cppo} %{first-dep} -o %{targets}))) (action (run %{bin:cppo} %{first-dep} -o %{targets})))
Defining a library with C stubs Defining a library with C stubs
@ -192,8 +192,8 @@ compilation and link flags. Write this ``dune`` file:
(rule (rule
(targets c_flags.sexp c_library_flags.sexp) (targets c_flags.sexp c_library_flags.sexp)
(deps config/discover.exe) (deps (:discover config/discover.exe))
(action (run %{first-dep} -ocamlc %{OCAMLC}))) (action (run %{discover} -ocamlc %{OCAMLC})))
Then create a ``config`` subdirectory and write this ``dune`` file: Then create a ``config`` subdirectory and write this ``dune`` file:
@ -240,8 +240,8 @@ To generate a file ``foo.ml`` using a program from another directory:
(rule (rule
(targets foo.ml) (targets foo.ml)
(deps ../generator/gen.exe) (deps (:gen ../generator/gen.exe))
(action (run %{first-dep} -o %{targets}))) (action (run %{gen} -o %{targets})))
Defining tests Defining tests
============== ==============
@ -252,8 +252,8 @@ Write this in your ``dune`` file:
(alias (alias
(name runtest) (name runtest)
(deps my-test-program.exe) (deps (:my-prog my-test-program.exe))
(action (run %{first-dep}))) (action (run %{my-prog})))
And run the tests with: And run the tests with: