• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/python.gni")
18import("$dir_pw_docgen/docs.gni")
19
20# Note: These may be useful for downstream projects, which is why they are
21# split out from the overall docgen target below.
22pw_doc_group("core_docs") {
23  inputs = [
24    "images/pw_env_setup_demo.gif",
25    "images/pw_status_test.png",
26    "images/pw_watch_build_demo.gif",
27    "images/pw_watch_on_device_demo.gif",
28    "images/pw_watch_test_demo.gif",
29    "images/stm32f429i-disc1_connected.jpg",
30
31    # TODO(pwbug/368): This should be in the pw_doc_gen target instead of here.
32    "_static/css/pigweed.css",
33  ]
34  sources = [
35    "code_of_conduct.rst",
36    "concepts/index.rst",
37    "contributing.rst",
38    "embedded_cpp_guide.rst",
39    "faq.rst",
40    "getting_started.rst",
41    "module_structure.rst",
42    "os_abstraction_layers.rst",
43    "size_optimizations.rst",
44    "style_guide.rst",
45  ]
46}
47
48pw_doc_group("release_notes") {
49  sources = [
50    "release_notes/2022_jan.rst",
51    "release_notes/index.rst",
52  ]
53}
54
55# Documentation for upstream Pigweed targets.
56group("target_docs") {
57  deps = [
58    "$dir_pigweed/targets/android:target_docs",
59    "$dir_pigweed/targets/arduino:target_docs",
60    "$dir_pigweed/targets/docs:target_docs",
61    "$dir_pigweed/targets/emcraft_sf2_som:docs",
62    "$dir_pigweed/targets/host:target_docs",
63    "$dir_pigweed/targets/host_device_simulator:target_docs",
64    "$dir_pigweed/targets/lm3s6965evb_qemu:target_docs",
65    "$dir_pigweed/targets/mimxrt595_evk:target_docs",
66    "$dir_pigweed/targets/rp2040:target_docs",
67    "$dir_pigweed/targets/stm32f429i_disc1:target_docs",
68    "$dir_pigweed/targets/stm32f429i_disc1_stm32cube:target_docs",
69  ]
70}
71
72group("module_docs") {
73  deps = pw_module_docs
74}
75
76group("third_party_docs") {
77  deps = [
78    "$dir_pigweed/third_party/freertos:docs",
79    "$dir_pigweed/third_party/nanopb:docs",
80    "$dir_pigweed/third_party/tinyusb:docs",
81  ]
82}
83
84pw_doc_gen("docs") {
85  conf = "conf.py"
86  sources = [
87    # Note: These must use the "docs" prefix for links and image references. In
88    # contrast, the pw_doc_group above should not use the docs prefix.
89    "automated_analysis.rst",
90    "build_system.rst",
91    "index.rst",
92    "module_guides.rst",
93    "python_build.rst",
94    "targets.rst",
95    "third_party_support.rst",
96  ]
97  output_directory = target_gen_dir
98  deps = [
99    ":core_docs",
100    ":module_docs",
101    ":release_notes",
102    ":sphinx_themes.install",
103    ":target_docs",
104    ":third_party_docs",
105    "$dir_pw_env_setup:python.install",
106  ]
107}
108
109# Install Pigweed specific sphinx themes.
110pw_python_requirements("sphinx_themes") {
111  requirements = [
112    "furo",
113    "sphinx_design",
114  ]
115}
116