diff --git a/doc/howto/opam-file-generation.rst b/doc/howto/opam-file-generation.rst index a91e8311264..9fbe584cf7e 100644 --- a/doc/howto/opam-file-generation.rst +++ b/doc/howto/opam-file-generation.rst @@ -113,9 +113,10 @@ General Notes and Tips keep the corresponding opam fields in a ``pkg.opam.template`` file. See :doc:`../reference/packages`. - It is not necessary to specify ``(version)``, this will be added at release - time if you use `dune-release`_. - -.. _dune-release: https://github.com/tarides/dune-release + time if you use `dune-release `_. +- To generate an opam variable such as ``version``, use a colon ``:`` followed + by the name of the variable. For example, to generate ``a { = version }`` in + the opam file, use ``(a (= :version))`` in ``dune-project``. Generating Opam Files --------------------- @@ -130,3 +131,11 @@ If you only want to generate the opam file, run ``dune build .opam Run ``dune build`` once and observe that the opam files have been created or updated. Make sure to add these changes to your version control system. + +.. seealso:: + + :token:`~pkg-dep:dep_specification` + How ``(depends)`` and similar fields are processed. + + :doc:`/explanation/opam-integration` + How ``with-test`` and related variables are used by opam.