Skip to content

Commit ec4192b

Browse files
authored
Merge pull request #17 from kber-trumpf/list_of_paths
Add support for list of directories in `vhdl_autodoc_source_path`
2 parents 0e116df + 94d23bc commit ec4192b

File tree

6 files changed

+234
-214
lines changed

6 files changed

+234
-214
lines changed

doc/source/config.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ Configuration options
99

1010
Determines the root of the directory structure where the VHDL source codes
1111
used for automatic documentation generation reside. Must be relative to from
12-
where the build command is run.
12+
where the build command is run.
13+
14+
In case project contains directories which You do not wish to parse, the
15+
list of directories can be also provided. Parsing will be done for each one
16+
in the order defined by the list.

doc/source/directives_detailed.rst

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ Auto- Directives
241241
Automatically generates a documentation for an entity. Has one required
242242
argument, the name of the entity. For the automatic generation to work,
243243
the :py:attr:`vhdl_autodoc_source_path` configuration option must be set to
244-
point to a valid directory containing VHDL sources describing this entity.
245-
See :ref:`autodoc_usage` for further instructions on how the source code
246-
must be set up.
244+
point to a valid directory (or list of directories) containing VHDL sources
245+
describing this entity. See :ref:`autodoc_usage` for further instructions
246+
on how the source code must be set up.
247247

248248
.. rst:directive:option:: noautogenerics
249249
@@ -260,71 +260,72 @@ Auto- Directives
260260
Automatically generates a documentation for an enumeration defined type.
261261
Has one required argument, the name of the type. For the automatic
262262
generation to work, the :py:attr:`vhdl_autodoc_source_path` configuration
263-
option must be set to point to a valid directory containing VHDL sources
264-
describing this entity. See :ref:`autodoc_usage` for further instructions
265-
on how the source code must be set up.
263+
option must be set to point to a valid directory (or list of directories)
264+
containing VHDL sources describing this entity. See :ref:`autodoc_usage`
265+
for further instructions on how the source code must be set up.
266266

267267
.. rst:directive:: vhdl:autofunction
268268
269269
Automatically generates a documentation for a pure function.
270270
Has one required argument, the name of the type. For the automatic
271271
generation to work, the :py:attr:`vhdl_autodoc_source_path` configuration
272-
option must be set to point to a valid directory containing VHDL sources
273-
describing this entity. See :ref:`autodoc_usage` for further instructions
274-
on how the source code must be set up.
272+
option must be set to point to a valid directory (or list of directories)
273+
containing VHDL sources describing this entity. See :ref:`autodoc_usage`
274+
for further instructions on how the source code must be set up.
275275

276276
.. rst:directive:: vhdl:autogenerics
277277
278278
Automatically generates a documentation for an entity's generics. Has one
279279
required argument, the name of the entity whose generics to document. For
280280
the automatic generation to work, the :py:attr:`vhdl_autodoc_source_path`
281-
configuration option must be set to point to a valid directory containing
282-
VHDL sources describing the target entity. See :ref:`autodoc_usage` for
283-
further instruction on how the source must be set up.
281+
configuration option must be set to point to a valid directory (or list
282+
of directories) containing VHDL sources describing the target entity.
283+
See :ref:`autodoc_usage` for further instruction on how the source
284+
must be set up.
284285

285286
.. rst:directive:: vhdl:autoconstants
286287
287288
Automatically generates documentation for an architecture's constants.
288289
Has one required argument, the name of the architecture whose constants
289290
are to be documented. For the automatic generation to work, the
290291
:py:attr:`vhdl_autodoc_source_path` configuration option must be set to
291-
point to a valid directory containing VHDL sources describing the target
292-
entity. See :ref:`autodoc_usage` for further instruction on how the
293-
source must be set up.
292+
point to a valid directory (or list of directories) containing VHDL
293+
sources describing the target entity. See :ref:`autodoc_usage` for
294+
further instruction on how the source must be set up.
294295

295296
.. rst:directive:: vhdl:autopackage
296297
297298
Automatically generates a documentation for a package. Has one required
298299
argument, the name of the package to document. For the automatic generation
299300
to work, the :py:attr:`vhdl_autodoc_source_path` configuration option must
300-
be set to point to a valid directory containing VHDL sources defining the
301-
target package. See :ref:`autodoc_usage` for further instructions on how
302-
the source must be set up.
301+
be set to point to a valid directory (or list of directories) containing
302+
VHDL sources defining the target package. See :ref:`autodoc_usage` for
303+
further instructions on how the source must be set up.
303304

304305
.. rst:directive:: vhdl:autoports
305306
306307
Automatically generates a documentation for an entity's ports. Has one
307308
required argument, the name of the entity whose ports to document. For the
308309
automatic generation to work, the :py:attr:`vhdl_autodoc_source_path`
309-
configuration option must be set to point to a valid directory containing
310-
VHDL sources describing the target entity. See :ref:`autodoc_usage` for
311-
further instruction on how the source must be set up.
310+
configuration option must be set to point to a valid directory (or list
311+
of directories) containing VHDL sources describing the target entity.
312+
See :ref:`autodoc_usage` for further instruction on how the source must be set up.
312313

313314
.. rst:directive:: vhdl:autorecord
314315
315316
Automatically generates a documentation for a record-defined type. Has one
316317
required argument, the name of the type to document. For the automatic
317318
generation to work, the :py:attr:`vhdl_autodoc_source_path` configuration
318-
option must be set to point to a valid directory containing VHDL sources
319-
describing the type. See :ref:`autodoc_usage` for further instructions on
320-
how the source must be set up.
319+
option must be set to point to a valid directory (or list of directories)
320+
containing VHDL sources describing the type. See :ref:`autodoc_usage` for
321+
further instructions on how the source must be set up.
321322

322323
.. rst:directive:: vhdl:autotype
323324
324325
Automatically generates a documentation for a type other than enumeration-
325326
record-defined one. Has one required argument, the name of the type to
326327
document. For the automatic generation to work, the
327328
:py:attr:`vhdl_autodoc_source_path` configuration option must be set to
328-
point to a valid directory containing VHDL sources describing the type. See
329-
:ref:`autodoc_usage` for further instructions on how the sources must be
330-
set up.
329+
point to a valid directory (or list of directories) containing VHDL sources
330+
describing the type. See :ref:`autodoc_usage` for further instructions on
331+
how the sources must be set up.

doc/source/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ To setup sphinx-vhdl for your project, please edit your sphinx ``conf.py`` file
1717
extensions = ['sphinxvhdl.vhdl']
1818
vhdl_autodoc_source_path = 'path/to/your/vhdl/sources/root'
1919
20+
In case VHDL source files reside in two different directories, You can specify a list
21+
in :py:attr:`vhdl_autodoc_source_path`
22+
23+
.. code-block:: python
24+
25+
extensions = ['sphinxvhdl.vhdl']
26+
vhdl_autodoc_source_path = ['path/to/your/vhdl/sources1', 'path/to/your/vhdl/sources1']
27+
2028
See :ref:`configuration` for more information.
2129

2230
Recognized directives

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = sphinx-vhdl
3-
version = 0.2.0
3+
version = 0.2.1
44
author = CESNET z.s.p.o.
55
author_email = cabal@cesnet.cz
66
description = A Sphinx domain and autodocumenter for VHDL

0 commit comments

Comments
 (0)