Skip to content

Commit 5472188

Browse files
mchehabJonathan Corbet
authored andcommitted
doc-rst: add an option to ignore DocBooks when generating docs
Sometimes, we want to do a partial build, instead of building everything. However, right now, if one wants to build just Sphinx books, it will build also the DocBooks. Add an option to allow to ignore all DocBooks when building documentation. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
1 parent fb054c5 commit 5472188

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Documentation/DocBook/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# To add a new book the only step required is to add the book to the
77
# list of DOCBOOKS.
88

9+
ifeq ($(IGNORE_DOCBOOKS),)
10+
911
DOCBOOKS := z8530book.xml device-drivers.xml \
1012
kernel-hacking.xml kernel-locking.xml deviceiobook.xml \
1113
writing_usb_driver.xml networking.xml \
@@ -215,6 +217,20 @@ silent_gen_xml = :
215217
-e "s/>/\\&gt;/g"; \
216218
echo "</programlisting>") > $@
217219

220+
else
221+
222+
# Needed, due to cleanmediadocs
223+
include Documentation/DocBook/media/Makefile
224+
225+
htmldocs:
226+
pdfdocs:
227+
psdocs:
228+
xmldocs:
229+
installmandocs:
230+
231+
endif # IGNORE_DOCBOOKS
232+
233+
218234
###
219235
# Help targets as used by the top-level makefile
220236
dochelp:
@@ -229,6 +245,9 @@ dochelp:
229245
@echo
230246
@echo ' make DOCBOOKS="s1.xml s2.xml" [target] Generate only docs s1.xml s2.xml'
231247
@echo ' valid values for DOCBOOKS are: $(DOCBOOKS)'
248+
@echo
249+
@echo " make IGNORE_DOCBOOKS=1 [target] Don't generate docs from Docbook"
250+
@echo ' This is useful to generate only the ReST docs (Sphinx)'
232251

233252

234253
###

0 commit comments

Comments
 (0)