blob: 166422cc85ab17456c57d316960204b2d666a470 [file] [log] [blame]
Anas Nashif3ae52622019-04-06 09:08:09 -04001# SPDX-License-Identifier: Apache-2.0
2
Anas Nashif5060ca62018-12-11 10:33:23 -05003cmake_minimum_required(VERSION 3.13.1)
Sebastian Bøe5748fe12019-01-04 09:13:07 +01004project(Zephyr-Kernel-Doc LANGUAGES)
Carles Cufiae699342018-07-09 14:12:17 +02005
Carles Cufi1aa4d8d2019-03-28 17:49:25 +01006# Find west to (optionally) process modules for Kconfig
7find_program(
8 WEST
9 west
10 )
11if(${WEST} STREQUAL WEST-NOTFOUND)
12 unset(WEST)
13endif()
14
Carles Cufib73790b2019-05-23 16:35:20 +020015file(TO_CMAKE_PATH "$ENV{ZEPHYR_BASE}" ZEPHYR_BASE)
Carles Cufiae699342018-07-09 14:12:17 +020016
17message(STATUS "Zephyr base: ${ZEPHYR_BASE}")
Marti Bolivar2b3d9df2019-07-22 11:00:59 -060018if(DEFINED WEST)
19 message(STATUS "West: ${WEST}")
20else()
21 message(STATUS "West: not found")
22endif()
Carles Cufiae699342018-07-09 14:12:17 +020023
24find_package(PythonInterp 3.4)
25set(DOXYGEN_SKIP_DOT True)
26find_package(Doxygen REQUIRED)
Carles Cufi0698dba2018-10-02 10:30:39 +020027find_package(LATEX)
Carles Cufiae699342018-07-09 14:12:17 +020028
29find_program(
30 SPHINXBUILD
Marc Herberta49f9eb2019-02-04 15:24:01 -080031 NAMES sphinx-build-3 sphinx-build
Carles Cufiae699342018-07-09 14:12:17 +020032 )
33if(${SPHINXBUILD} STREQUAL SPHINXBUILD-NOTFOUND)
34 message(FATAL_ERROR "The 'sphinx-build' command was not found. Make sure you have Sphinx installed.")
35endif()
36
Carles Cufif5f1b222019-05-23 16:37:58 +020037# Include version info
38include(${ZEPHYR_BASE}/cmake/version.cmake)
39# Process modules
40include(${ZEPHYR_BASE}/cmake/zephyr_module.cmake)
41
Daniel Leung9945e7f2018-08-23 11:11:11 -070042# Note that this won't force fatal error if latexmk is not found.
43# Not having LaTeX tools should not prevent people from generating HTML docs.
44find_program(
45 LATEXMK
46 latexmk
47 )
48if(${LATEXMK} STREQUAL LATEXMK-NOTFOUND)
49 message(WARNING "The 'latexmk' command was not found. Targets to build PDF will not be available.")
50endif()
51
Carles Cufiae699342018-07-09 14:12:17 +020052if(NOT DEFINED SPHINXOPTS)
53 set(SPHINXOPTS -q)
Carles Cufid505ca72018-07-13 12:37:13 +020054else()
55 separate_arguments(SPHINXOPTS)
Carles Cufiae699342018-07-09 14:12:17 +020056endif()
57
Carles Cufi896a6962018-08-16 13:45:59 +020058if(NOT DEFINED SPHINX_OUTPUT_DIR)
Daniel Leung9945e7f2018-08-23 11:11:11 -070059 set(SPHINX_OUTPUT_DIR_HTML ${CMAKE_CURRENT_BINARY_DIR}/html)
60 set(SPHINX_OUTPUT_DIR_LATEX ${CMAKE_CURRENT_BINARY_DIR}/latex)
61 set(SPHINX_OUTPUT_DIR_PDF ${CMAKE_CURRENT_BINARY_DIR}/pdf)
62else()
Marti Bolivar2952bf82018-10-09 13:28:41 -060063 # SPHINX_OUTPUT_DIR is used to specify exactly where HTML (or other
64 # outputs) are placed, so no /html, /latex, /pdf suffixes are needed.
Daniel Leung9945e7f2018-08-23 11:11:11 -070065 set(SPHINX_OUTPUT_DIR_HTML ${SPHINX_OUTPUT_DIR})
66 set(SPHINX_OUTPUT_DIR_LATEX ${SPHINX_OUTPUT_DIR})
67 set(SPHINX_OUTPUT_DIR_PDF ${SPHINX_OUTPUT_DIR})
Carles Cufi896a6962018-08-16 13:45:59 +020068endif()
69
Carles Cufiae699342018-07-09 14:12:17 +020070if(NOT DEFINED DOC_TAG)
71 set(DOC_TAG development)
72endif()
73
74# Internal variables.
Carles Cufi2af9a9e2018-07-13 15:32:36 +020075set(ALLSPHINXOPTS -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees ${SPHINXOPTS})
Carles Cufi60c55402018-07-15 18:57:01 +020076if("-q" IN_LIST ALLSPHINXOPTS)
77 set(SPHINX_USES_TERMINAL )
78else()
79 set(SPHINX_USES_TERMINAL USES_TERMINAL)
80endif()
81
Carles Cufiae699342018-07-09 14:12:17 +020082# the i18n builder cannot share the environment and doctrees with the others
Carles Cufid505ca72018-07-13 12:37:13 +020083set(I18NSPHINXOPTS ${SPHINXOPTS})
Carles Cufiae699342018-07-09 14:12:17 +020084
Carles Cufie182dbc2018-07-16 19:05:05 +020085set(DOXYFILE_IN ${CMAKE_CURRENT_LIST_DIR}/zephyr.doxyfile.in)
86set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/zephyr.doxyfile)
Carles Cufi40b63e52019-02-19 13:47:03 +010087set(DOXY_OUT ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
Carles Cufie182dbc2018-07-16 19:05:05 +020088set(RST_OUT ${CMAKE_CURRENT_BINARY_DIR}/rst)
89set(DOC_LOG ${CMAKE_CURRENT_BINARY_DIR}/doc.log)
90set(DOXY_LOG ${CMAKE_CURRENT_BINARY_DIR}/doxy.log)
91set(SPHINX_LOG ${CMAKE_CURRENT_BINARY_DIR}/sphinx.log)
92set(DOC_WARN ${CMAKE_CURRENT_BINARY_DIR}/doc.warnings)
Marti Bolivar0913c292018-10-09 12:42:03 -060093set(CONTENT_OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/extracted-content.txt)
Carles Cufiae699342018-07-09 14:12:17 +020094
Carles Cufie182dbc2018-07-16 19:05:05 +020095configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
Carles Cufiae699342018-07-09 14:12:17 +020096
Marc Herbertfc644812019-02-15 10:41:25 -080097# This command is used to copy all documentation source files from the
98# ZEPHYR_BASE/ environment variable into the build directory,
Marti Bolivard7dc1132018-10-16 08:39:35 -060099#
100# We need to make copies because Sphinx requires a single
101# documentation root directory, but Zephyr's documentation is
102# scattered around the tree in samples/, boards/, and doc/. Putting
103# them into a single rooted tree in the build directory is a
104# workaround for this limitation.
Marti Bolivar0913c292018-10-09 12:42:03 -0600105set(EXTRACT_CONTENT_COMMAND
106 ${CMAKE_COMMAND} -E env
Marti Bolivarf3d13862019-05-10 04:23:23 -0600107 ZEPHYR_BASE=${ZEPHYR_BASE}
Marti Bolivar0913c292018-10-09 12:42:03 -0600108 ${PYTHON_EXECUTABLE} scripts/extract_content.py
Marti Bolivar0913c292018-10-09 12:42:03 -0600109 # Ignore any files in the output directory.
110 --ignore ${CMAKE_CURRENT_BINARY_DIR}
111 # Copy all files in doc to the rst folder.
112 "*:doc:${RST_OUT}"
Marti Bolivard7dc1132018-10-16 08:39:35 -0600113 # We want to copy the .rst files in samples/ and boards/ to the rst
114 # folder, and also the doc folder inside rst.
Marti Bolivar0913c292018-10-09 12:42:03 -0600115 #
116 # Some files refer to items in samples/ and boards/ relative to
117 # their actual position in the Zephyr tree. For example, in
118 # subsystems/sensor.rst:
119 #
120 # .. literalinclude:: ../../samples/sensor/mcp9808/src/main.c
121 #
Marti Bolivard7dc1132018-10-16 08:39:35 -0600122 # The additional copy is a hackaround so these references work.
Marti Bolivar0913c292018-10-09 12:42:03 -0600123 "*.rst:samples:${RST_OUT}" "*.rst:boards:${RST_OUT}"
124 "*.rst:samples:${RST_OUT}/doc" "*.rst:boards:${RST_OUT}/doc")
125
Carles Cufi15fbf702018-12-06 12:21:48 +0100126add_custom_target(
127 content
128 # Copy all files in doc/ to the rst folder
Marti Bolivar0913c292018-10-09 12:42:03 -0600129 COMMAND ${EXTRACT_CONTENT_COMMAND}
130 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Marc Herbertfc644812019-02-15 10:41:25 -0800131 COMMENT "Copying files to ${RST_OUT}"
Carles Cufi15fbf702018-12-06 12:21:48 +0100132)
Marti Bolivar0913c292018-10-09 12:42:03 -0600133
Marc Herbert2270f4b2019-02-15 11:49:49 -0800134# For incremental builds not to miss any source change this MUST be kept
135# a superset of INPUT= and FILE_PATTERNS= in zephyr.doxyfile.in
136file(GLOB_RECURSE DOXY_SOURCES
137 ${ZEPHYR_BASE}/include/*.[c,h,S]
138 ${ZEPHYR_BASE}/lib/libc/*.[c,h,S]
David B. Kinderb30b52a2019-06-25 15:54:19 -0700139 ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/*.[h,c,S]
Marc Herbert2270f4b2019-02-15 11:49:49 -0800140 ${ZEPHYR_BASE}/tests/*.[h,c,S]
141 )
142# For debug. Also find generated list in doc/_build/(build.ninja|CMakeFiles/)
143# message("DOXY_SOURCES= " ${DOXY_SOURCES})
Carles Cufiae699342018-07-09 14:12:17 +0200144
Marc Herbert2270f4b2019-02-15 11:49:49 -0800145set(ARGS ${DOXYFILE_OUT})
146set(DOXY_RUN_TSTAMP ${CMAKE_CURRENT_BINARY_DIR}/last_doxy_run_tstamp)
147
148
149# Create timestamp first so we re-run if source files are edited while
150# doxygen is running
151add_custom_command(
152 OUTPUT ${DOXY_RUN_TSTAMP}
153 COMMAND cmake -E touch ${DOXY_RUN_TSTAMP}
Carles Cufiae699342018-07-09 14:12:17 +0200154 COMMAND ${CMAKE_COMMAND}
155 -DCOMMAND=${DOXYGEN_EXECUTABLE}
156 -DARGS="${ARGS}"
157 -DOUTPUT_FILE=${DOXY_LOG}
158 -DERROR_FILE=${DOXY_LOG}
Carles Cufi2af9a9e2018-07-13 15:32:36 +0200159 -DWORKING_DIRECTORY=${CMAKE_CURRENT_LIST_DIR}
Carles Cufi45d58a72018-07-12 17:34:29 +0200160 -P ${ZEPHYR_BASE}/cmake/util/execute_process.cmake
Marc Herbert2270f4b2019-02-15 11:49:49 -0800161 DEPENDS ${DOXY_SOURCES}
Marc Herbertfc644812019-02-15 10:41:25 -0800162 COMMENT "Running ${DOXYGEN_EXECUTABLE}"
Carles Cufiae699342018-07-09 14:12:17 +0200163)
164
Marc Herbert52842312019-02-07 13:39:59 -0800165# Doxygen doesn't support incremental builds.
166# It could be ok because it's pretty fast.
167# But it's not because it has a cascade effect on sphinx:
168# https://sourceforge.net/p/doxygen/mailman/message/36580807/
169# For now this optimization speeds-up non-doxygen documentation work
170# only (by one order of magnitude).
171add_custom_target(
172 doxy_real_modified_times
173 COMMAND ${CMAKE_COMMAND} -E env
174 ${PYTHON_EXECUTABLE} scripts/restore_modification_times.py
Marc Herbertfc644812019-02-15 10:41:25 -0800175 --loglevel WARN ${DOXY_OUT}/xml
Marc Herbert52842312019-02-07 13:39:59 -0800176 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Marc Herbert2270f4b2019-02-15 11:49:49 -0800177 DEPENDS ${DOXY_RUN_TSTAMP}
178 COMMENT "Fixing modification times of ${DOXY_OUT}/xml/ output"
Marc Herbert52842312019-02-07 13:39:59 -0800179)
180
Carles Cufiae699342018-07-09 14:12:17 +0200181add_custom_target(
182 pristine
183 COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/pristine.cmake
Carles Cufiae699342018-07-09 14:12:17 +0200184)
185
Carles Cufiae699342018-07-09 14:12:17 +0200186if(WIN32)
Carles Cufi8645cc22019-09-06 15:56:21 +0200187 set(SEP $<SEMICOLON>)
Carles Cufiae699342018-07-09 14:12:17 +0200188else()
189 set(SEP :)
190endif()
191
192add_custom_target(
193 kconfig
Carles Cufie182dbc2018-07-16 19:05:05 +0200194 COMMAND ${CMAKE_COMMAND} -E make_directory ${RST_OUT}/doc/reference/kconfig
195 COMMAND ${CMAKE_COMMAND} -E env
Carles Cufiae699342018-07-09 14:12:17 +0200196 PYTHONPATH="${ZEPHYR_BASE}/scripts/kconfig${SEP}$ENV{PYTHONPATH}"
Marti Bolivarf3d13862019-05-10 04:23:23 -0600197 ZEPHYR_BASE=${ZEPHYR_BASE}
Carles Cufiae699342018-07-09 14:12:17 +0200198 srctree=${ZEPHYR_BASE}
Sebastian Bøe93230a52018-09-28 13:10:57 +0200199 KERNELVERSION=${KERNELVERSION}
Ulf Magnussond0e87522018-09-05 12:58:05 +0200200 BOARD_DIR=boards/*/*/
201 ARCH=*
Klaus Petersenc66cb762018-11-15 10:37:46 +0100202 ARCH_DIR=arch/
Anas Nashif96455d52018-09-04 14:34:06 -0500203 SOC_DIR=soc/
Carles Cufiae699342018-07-09 14:12:17 +0200204 SRCARCH=x86
Sebastian Bøe7061c032019-03-01 12:57:11 +0100205 CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
Carles Cufic6249ac2019-03-28 17:51:39 +0100206 KCONFIG_WARN_UNDEF=y
Anas Nashif940a9312019-01-21 13:58:05 -0500207 KCONFIG_TURBO_MODE=${KCONFIG_TURBO_MODE}
Carles Cufifa26ef02019-01-30 17:54:21 +0100208 KCONFIG_DOC_MODE=1
Ulf Magnussona56be6f2018-08-17 22:27:01 +0200209 ${PYTHON_EXECUTABLE} scripts/genrest.py Kconfig ${RST_OUT}/doc/reference/kconfig/
Carles Cufi2af9a9e2018-07-13 15:32:36 +0200210 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Marc Herbertfc644812019-02-15 10:41:25 -0800211 COMMENT "Running genrest.py Kconfig ${RST_OUT}/doc/reference/kconfig/"
Carles Cufiae699342018-07-09 14:12:17 +0200212)
213
214set(KI_SCRIPT ${ZEPHYR_BASE}/scripts/filter-known-issues.py)
Daniel Leung9945e7f2018-08-23 11:11:11 -0700215set(FIX_TEX_SCRIPT ${ZEPHYR_BASE}/doc/scripts/fix_tex.py)
Ulf Magnusson259c2402019-03-05 01:54:15 +0100216set(CONF_DIR ${ZEPHYR_BASE}/.known-issues/doc)
Carles Cufiae699342018-07-09 14:12:17 +0200217
Daniel Leung9945e7f2018-08-23 11:11:11 -0700218#
219# HTML section
220#
Marti Bolivard9f512c2018-10-09 14:24:34 -0600221set(SPHINX_BUILD_HTML_COMMAND
222 ${CMAKE_COMMAND} -E env
Marti Bolivarf3d13862019-05-10 04:23:23 -0600223 ZEPHYR_BASE=${ZEPHYR_BASE}
Marti Bolivard9f512c2018-10-09 14:24:34 -0600224 ZEPHYR_BUILD=${CMAKE_CURRENT_BINARY_DIR}
225 ${SPHINXBUILD} -w ${SPHINX_LOG} -N -t ${DOC_TAG} -b html ${ALLSPHINXOPTS} ${RST_OUT}/doc ${SPHINX_OUTPUT_DIR_HTML})
226
227# The sphinx-html target is provided as a convenience for incremental
228# re-builds of content files without regenerating the entire docs
229# pipeline. It can be significantly faster than re-running the full
230# HTML build, but it has no idea if Doxygen, Kconfig, etc. need to be
231# regenerated. Use with caution.
232add_custom_target(
233 sphinx-html
234 COMMAND ${SPHINX_BUILD_HTML_COMMAND}
235 DEPENDS ${EXTRACT_CONTENT_OUTPUTS}
236 COMMENT "Just re-generating HTML (USE WITH CAUTION)"
237 USES_TERMINAL
238)
239
Marc Herbertfc644812019-02-15 10:41:25 -0800240# "breathe", the sphinx plugin that parses XML output from doxygen, has
241# an "everything on everything" dependency issue reported at:
242# https://github.com/michaeljones/breathe/issues/420 In other words
243# changing 1 source file costs the same build time than changing all
244# source files. breathe is fortunately smart enough not to run at all
245# when *nothing* has changed.
Carles Cufiae699342018-07-09 14:12:17 +0200246add_custom_target(
247 html
Marti Bolivard9f512c2018-10-09 14:24:34 -0600248 COMMAND ${SPHINX_BUILD_HTML_COMMAND}
Carles Cufiae699342018-07-09 14:12:17 +0200249 # Merge the Doxygen and Sphinx logs into a single file
250 COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/util/fmerge.cmake ${DOC_LOG} ${DOXY_LOG} ${SPHINX_LOG}
Ulf Magnusson259c2402019-03-05 01:54:15 +0100251 COMMAND ${PYTHON_EXECUTABLE} ${KI_SCRIPT} --config-dir ${CONF_DIR} --errors ${DOC_WARN} --warnings ${DOC_WARN} ${DOC_LOG}
Carles Cufi2af9a9e2018-07-13 15:32:36 +0200252 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Marc Herbertfc644812019-02-15 10:41:25 -0800253 COMMENT "Generating HTML documentation with ${SPHINXBUILD} ${SPHINXOPTS}"
Carles Cufi60c55402018-07-15 18:57:01 +0200254 ${SPHINX_USES_TERMINAL}
Carles Cufiae699342018-07-09 14:12:17 +0200255)
Carles Cufi78964512018-07-15 18:49:37 +0200256
Daniel Leung9945e7f2018-08-23 11:11:11 -0700257#
258# LaTEX section
259#
Marti Bolivard9f512c2018-10-09 14:24:34 -0600260set(SPHINX_BUILD_LATEX_COMMAND
261 ${CMAKE_COMMAND} -E env
262 ZEPHYR_BUILD=${CMAKE_CURRENT_BINARY_DIR}
263 ${SPHINXBUILD} -w ${SPHINX_LOG} -N -t ${DOC_TAG} -b latex -t svgconvert ${ALLSPHINXOPTS} ${RST_OUT}/doc ${SPHINX_OUTPUT_DIR_LATEX})
264
265# The sphinx-latex target works similarly to sphinx-html, and carries
266# the same warnings.
267add_custom_target(
268 sphinx-latex
269 COMMAND ${SPHINX_BUILD_LATEX_COMMAND}
270 DEPENDS ${EXTRACT_CONTENT_OUTPUTS}
271 COMMENT "Just re-generating LaTeX (USE WITH CAUTION)"
272 USES_TERMINAL
273)
274
Daniel Leungc164c8e2018-09-10 17:29:20 -0700275add_custom_command(
276 OUTPUT ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
Marti Bolivard9f512c2018-10-09 14:24:34 -0600277 COMMAND ${SPHINX_BUILD_LATEX_COMMAND}
Daniel Leung9945e7f2018-08-23 11:11:11 -0700278 # Merge the Doxygen and Sphinx logs into a single file
279 COMMAND ${CMAKE_COMMAND} -P ${ZEPHYR_BASE}/cmake/util/fmerge.cmake ${DOC_LOG} ${DOXY_LOG} ${SPHINX_LOG}
Ulf Magnusson259c2402019-03-05 01:54:15 +0100280 COMMAND ${PYTHON_EXECUTABLE} ${KI_SCRIPT} --config-dir ${CONF_DIR} --errors ${DOC_WARN} --warnings ${DOC_WARN} ${DOC_LOG}
Daniel Leung9945e7f2018-08-23 11:11:11 -0700281 COMMAND ${PYTHON_EXECUTABLE} ${FIX_TEX_SCRIPT} ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
282 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
Marti Bolivard9f512c2018-10-09 14:24:34 -0600283 COMMENT "Generating LaTeX documentation"
Carles Cufi7599fad2018-09-26 11:22:32 +0200284 ${SPHINX_USES_TERMINAL}
Daniel Leungc164c8e2018-09-10 17:29:20 -0700285)
286
287add_custom_target(
288 latex
289 DEPENDS ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
Daniel Leung9945e7f2018-08-23 11:11:11 -0700290)
291
292#
293# PDF section
294#
295if(NOT ${LATEXMK} STREQUAL LATEXMK-NOTFOUND)
296
297add_custom_command(
298 OUTPUT ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.pdf
299 DEPENDS latexdocs ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.tex
300 COMMAND ${CMAKE_COMMAND} -E env
Carles Cufi0698dba2018-10-02 10:30:39 +0200301 LATEXOPTS="-halt-on-error -no-shell-escape"
Daniel Leung9945e7f2018-08-23 11:11:11 -0700302 ${LATEXMK} -quiet -pdf -dvi- -ps-
303 WORKING_DIRECTORY ${SPHINX_OUTPUT_DIR_LATEX}
Marti Bolivard9f512c2018-10-09 14:24:34 -0600304 COMMENT "Generating PDF documentation"
Daniel Leung9945e7f2018-08-23 11:11:11 -0700305)
306
307if(NOT DEFINED SPHINX_OUTPUT_DIR)
308# Although latexmk allows specifying output directory,
309# makeindex fails if one is specified.
310# Hence the need of this to copy the PDF file over.
311add_custom_command(
312 OUTPUT ${SPHINX_OUTPUT_DIR_PDF}/zephyr.pdf
313 COMMAND ${CMAKE_COMMAND} -E make_directory ${SPHINX_OUTPUT_DIR_PDF}
314 COMMAND ${CMAKE_COMMAND} -E copy ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.pdf ${SPHINX_OUTPUT_DIR_PDF}/zephyr.pdf
315 DEPENDS ${SPHINX_OUTPUT_DIR_LATEX}/zephyr.pdf
316)
317endif()
318
319add_custom_target(
320 pdf
321 DEPENDS ${SPHINX_OUTPUT_DIR_PDF}/zephyr.pdf
Daniel Leung9945e7f2018-08-23 11:11:11 -0700322)
323
324endif()
325
326#
327# Dependencies and final targets
328#
Marc Herbert52842312019-02-07 13:39:59 -0800329add_dependencies(html content doxy_real_modified_times kconfig)
Carles Cufi78964512018-07-15 18:49:37 +0200330
331add_custom_target(
332 htmldocs
333)
334add_dependencies(htmldocs html)
335
Marc Herbert52842312019-02-07 13:39:59 -0800336add_dependencies(latex content doxy_real_modified_times kconfig)
Daniel Leung9945e7f2018-08-23 11:11:11 -0700337
338add_custom_target(
339 latexdocs
340)
341add_dependencies(latexdocs latex)
342
343if(NOT ${LATEXMK} STREQUAL LATEXMK-NOTFOUND)
344
345add_custom_target(
346 pdfdocs
Daniel Leungc164c8e2018-09-10 17:29:20 -0700347 DEPENDS latexdocs pdf
Daniel Leung9945e7f2018-08-23 11:11:11 -0700348)
349add_dependencies(pdfdocs pdf)
350
351endif()