diff --git a/doc/advanced-topics.rst b/doc/advanced-topics.rst index 7a90753d..26f826aa 100644 --- a/doc/advanced-topics.rst +++ b/doc/advanced-topics.rst @@ -215,7 +215,7 @@ Below is an example where we build ``my.cmxs`` containing ``foo.cmxa`` and ``d.cmx``. Note how we use a :ref:`library` stanza to set up the compilation of ``d.cmx``. -.. code:: scheme +.. code:: lisp (library (name foo) diff --git a/doc/concepts.rst b/doc/concepts.rst index dd83ebb0..6cf67d46 100644 --- a/doc/concepts.rst +++ b/doc/concepts.rst @@ -83,7 +83,7 @@ error. Here's a simple example of a condition that expresses running on OSX and having an flambda compiler with the help of variable expansion: -.. code:: scheme +.. code:: lisp (and %{ocamlc-config:flambda} (= %{ocamlc-config:system} macosx)) @@ -247,7 +247,7 @@ Forms that expands to list of items, such as ``%{cc}``, ``%{deps}``, ``%{targets}`` or ``%{read-lines:...}``, are suitable to be used in, say, ``(run )``. For instance in: -.. code:: scheme +.. code:: lisp (run foo %{deps}) @@ -275,7 +275,7 @@ which is equivalent to the following shell command: Note that, since ``%{deps}`` is a list of items, the first one may be used as a program name, for instance: -.. code:: scheme +.. code:: lisp (rule (targets result.txt) @@ -284,7 +284,7 @@ used as a program name, for instance: Here is another example: -.. code:: scheme +.. code:: lisp (rule (target foo.exe) @@ -400,7 +400,7 @@ be an action that reads the file given as only dependency named More precisely, ``(preprocess (action ))`` acts as if you had setup a rule for every file of the form: - .. code:: scheme + .. code:: lisp (rule (target file.pp.ml) @@ -456,7 +456,7 @@ names. For instance: - .. code:: scheme + .. code:: lisp (preprocess (per_module (((action (run ./pp.sh X=1 %{input-file})) foo bar)) @@ -537,7 +537,7 @@ in actions (like the ``%{deps}``, ``%{target}`` and ``%{targets}`` built in vari One instance where this is useful is for naming globs. Here's an example of an imaginary bundle command: -.. code:: scheme +.. code:: lisp (rule (target archive.tar) @@ -696,7 +696,7 @@ Note: expansion of the special ``%{:...}`` is done relative to the current working directory of the part of the DSL being executed. So for instance if you have this action in a ``src/foo/dune``: -.. code:: scheme +.. code:: lisp (action (chdir ../../.. (echo %{path:dune}))) @@ -831,7 +831,7 @@ complicated tests. In order to prevent dune from running the actions at the same time, you can specify that both actions take the same lock: -.. code:: scheme +.. code:: lisp (rule (alias runtest) @@ -857,7 +857,7 @@ contexts setup, the same rule might still be executed concurrently between the two build contexts. If you want a lock that is global to all build contexts, simply use an absolute filename: -.. code:: scheme +.. code:: lisp (rule (alias runtest) @@ -957,7 +957,7 @@ Declaring a package To declare a package, simply add a ``package`` stanza to your ``dune-project`` file: -.. code:: scheme +.. code:: lisp (package (name mypackage) diff --git a/doc/cross-compilation.rst b/doc/cross-compilation.rst index a4459caa..bc6189e2 100644 --- a/doc/cross-compilation.rst +++ b/doc/cross-compilation.rst @@ -97,6 +97,6 @@ Some packages might still have to be updated to support cross-compilation. For instance if the ``foo.exe`` program in the previous example was using ``Sys.os_type``, it should instead take it as a command line argument: -.. code:: scheme +.. code:: lisp (rule (with-stdout-to blah (run ./foo.exe -os-type %{os_type}))) diff --git a/doc/dune-files.rst b/doc/dune-files.rst index e8cba1ee..770b5c50 100644 --- a/doc/dune-files.rst +++ b/doc/dune-files.rst @@ -277,7 +277,7 @@ The syntax of ``dune`` files is described in :ref:`metadata-format` section. ``dune`` files are composed of stanzas. For instance a typical ``dune`` looks like: -.. code:: scheme +.. code:: lisp (library (name mylib) @@ -871,7 +871,7 @@ time obvious what are the dependencies and targets. For instance: -.. code:: scheme +.. code:: lisp (rule (target b) @@ -897,7 +897,7 @@ Note that in dune, targets must always be known statically. For instance, this ``(rule ...)`` stanza is rejected by dune: -.. code:: scheme +.. code:: lisp (rule (copy a b.%{read:file})) @@ -906,7 +906,7 @@ ocamllex ``(ocamllex )`` is essentially a shorthand for: -.. code:: scheme +.. code:: lisp (rule (target .ml) @@ -929,7 +929,7 @@ ocamlyacc ``(ocamlyacc )`` is essentially a shorthand for: -.. code:: scheme +.. code:: lisp (rule (targets .ml .mli) @@ -1074,7 +1074,7 @@ The syntax is as follows: The typical use of the ``alias`` stanza is to define tests: -.. code:: scheme +.. code:: lisp (rule (alias runtest) @@ -1240,7 +1240,7 @@ be used to override the test binary invocation, for example if you're using alcotest and wish to see all the test failures on the standard output when running dune runtest you can use the following stanza: -.. code:: scheme +.. code:: lisp (tests (names mytest) @@ -1324,7 +1324,7 @@ the user the following operations: Examples: -.. code:: scheme +.. code:: lisp (dirs *) ;; include all directories (dirs :standard \ ocaml) ;; include all directories except ocaml @@ -1374,7 +1374,7 @@ All of the specified ```` will be ignored by dune. Note that users should rely on the ``dirs`` stanza along with the appropriate set operations instead of this stanza. For example: -.. code:: scheme +.. code:: lisp (dirs :standard \ ...) @@ -1559,7 +1559,7 @@ writers avoid boilerplate we provide a `(coqpp ...)` stanza: which for each ``g_mod`` in ```` is equivalent to: -.. code:: scheme +.. code:: lisp (rule (targets g_mod.ml) diff --git a/doc/migration.rst b/doc/migration.rst index 0a905d26..e4249fc8 100644 --- a/doc/migration.rst +++ b/doc/migration.rst @@ -191,7 +191,7 @@ Removed variables A named dependency should be used instead of ``${<}``. For instance the following jbuild file: -.. code:: scheme +.. code:: lisp (alias ((name runtest) @@ -200,7 +200,7 @@ the following jbuild file: should be rewritten to the following dune file: -.. code:: scheme +.. code:: lisp (rule (alias runtest) diff --git a/doc/quick-start.rst b/doc/quick-start.rst index 5cbb12e4..18c61536 100644 --- a/doc/quick-start.rst +++ b/doc/quick-start.rst @@ -134,7 +134,7 @@ Using cppo Add this field to your ``library`` or ``executable`` stanzas: -.. code:: scheme +.. code:: lisp (preprocess (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{input-file}))) @@ -150,7 +150,7 @@ Using the .cppo.ml style like the ocamlbuild plugin Write this in your ``dune`` file: -.. code:: scheme +.. code:: lisp (rule (targets foo.ml) @@ -182,7 +182,7 @@ Defining a library with C stubs using pkg-config Same context as before, but using ``pkg-config`` to query the compilation and link flags. Write this ``dune`` file: -.. code:: scheme +.. code:: lisp (library (name mylib) @@ -239,7 +239,7 @@ Using a custom code generator To generate a file ``foo.ml`` using a program from another directory: -.. code:: scheme +.. code:: lisp (rule (targets foo.ml) diff --git a/doc/tests.rst b/doc/tests.rst index 52d7902e..7931c8d1 100644 --- a/doc/tests.rst +++ b/doc/tests.rst @@ -357,7 +357,7 @@ In this example, we put tests in comments of the form: The backend for such a framework looks like this: -.. code:: scheme +.. code:: lisp (library (name simple_tests)