Skip to content

Commit f811361

Browse files
committed
docs: update documentation
1 parent c5e38cd commit f811361

File tree

3 files changed

+67
-6
lines changed

3 files changed

+67
-6
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,28 @@ doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_ex
4242
use_repo(doxygen_extension, "doxygen")
4343
```
4444

45-
By default, version `1.12.0` of Doxygen is used. To select a different version, indicate it in the `version` module:
45+
By default, version `1.12.0` of Doxygen is used.
46+
You can override this value with a custom one for each supported platform, i.e. _windows_, _mac_ and _linux_.
4647

47-
If you don't know the SHA256 of the Doxygen binary, just leave it empty.
48+
```bzl
49+
# MODULE.bazel file
50+
51+
bazel_dep(name = "rules_doxygen", version = "...", dev_dependency = True)
52+
53+
doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_extension")
54+
55+
# Download doxygen version 1.10.0 on linux, default version on all other platforms
56+
doxygen_extension.version(
57+
version = "1.10.0",
58+
sha256 = "dcfc9aa4cc05aef1f0407817612ad9e9201d9bf2ce67cecf95a024bba7d39747",
59+
platform = "linux",
60+
)
61+
62+
use_repo(doxygen_extension, "doxygen")
63+
```
64+
65+
When you do so, you must also provide the SHA256 of the given doxygen installation.
66+
If you don't know the SHA256 value, just leave it empty.
4867
The build will fail with an error message containing the correct SHA256.
4968

5069
```bash
@@ -100,6 +119,8 @@ Only the sources are required, the rest of the parameters are optional.
100119
```bzl
101120
# My BUILD.bazel file
102121

122+
load("@doxygen//:doxygen.bzl", "doxygen")
123+
103124
doxygen(
104125
name = "doxygen", # Name of the rule, can be anything
105126
srcs = glob([ # List of sources to document.
@@ -137,6 +158,8 @@ For example, if the _BUILD.bazel_ file is in the root of the repository, and the
137158
```bzl
138159
# BUILD.bazel file in the root of the repository
139160

161+
load("@doxygen//:doxygen.bzl", "doxygen")
162+
140163
doxygen(
141164
name = "doxygen",
142165
srcs = glob([

docs/extensions_doc.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,28 @@ The resulting repository will have the following targets:
8080
- `@doxygen//:doxygen.bzl`, containing the doxygen macro used to generate the documentation.
8181
- `@doxygen//:Doxyfile.template`, default Doxyfile template used to generate the Doxyfile.
8282

83-
By default, version `1.12.0` of Doxygen is used. To select a different version, indicate it in the `version` module:
83+
By default, version `1.12.0` of Doxygen is used.
84+
You can override this value with a custom one for each supported platform, i.e. _windows_, _mac_ and _linux_.
8485

85-
If you don't know the SHA256 of the Doxygen binary, just leave it empty.
86+
```bzl
87+
# MODULE.bazel file
88+
89+
bazel_dep(name = "rules_doxygen", version = "...", dev_dependency = True)
90+
91+
doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_extension")
92+
93+
# Download doxygen version 1.10.0 on linux, default version on all other platforms
94+
doxygen_extension.version(
95+
version = "1.10.0",
96+
sha256 = "dcfc9aa4cc05aef1f0407817612ad9e9201d9bf2ce67cecf95a024bba7d39747",
97+
platform = "linux",
98+
)
99+
100+
use_repo(doxygen_extension, "doxygen")
101+
```
102+
103+
When you do so, you must also provide the SHA256 of the given doxygen installation.
104+
If you don't know the SHA256 value, just leave it empty.
86105
The build will fail with an error message containing the correct SHA256.
87106

88107
```bash

extensions.bzl

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,28 @@ The resulting repository will have the following targets:
232232
- `@doxygen//:doxygen.bzl`, containing the doxygen macro used to generate the documentation.
233233
- `@doxygen//:Doxyfile.template`, default Doxyfile template used to generate the Doxyfile.
234234
235-
By default, version `1.12.0` of Doxygen is used. To select a different version, indicate it in the `version` module:
235+
By default, version `1.12.0` of Doxygen is used.
236+
You can override this value with a custom one for each supported platform, i.e. _windows_, _mac_ and _linux_.
236237
237-
If you don't know the SHA256 of the Doxygen binary, just leave it empty.
238+
```bzl
239+
# MODULE.bazel file
240+
241+
bazel_dep(name = "rules_doxygen", version = "...", dev_dependency = True)
242+
243+
doxygen_extension = use_extension("@rules_doxygen//:extensions.bzl", "doxygen_extension")
244+
245+
# Download doxygen version 1.10.0 on linux, default version on all other platforms
246+
doxygen_extension.version(
247+
version = "1.10.0",
248+
sha256 = "dcfc9aa4cc05aef1f0407817612ad9e9201d9bf2ce67cecf95a024bba7d39747",
249+
platform = "linux",
250+
)
251+
252+
use_repo(doxygen_extension, "doxygen")
253+
```
254+
255+
When you do so, you must also provide the SHA256 of the given doxygen installation.
256+
If you don't know the SHA256 value, just leave it empty.
238257
The build will fail with an error message containing the correct SHA256.
239258
240259
```bash

0 commit comments

Comments
 (0)