Skip to content

Commit 7b9ab39

Browse files
committed
---
yaml --- r: 104694 b: refs/heads/snap-stage3 c: b4815ad h: refs/heads/master v: v3
1 parent ceba8d5 commit 7b9ab39

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: bb8ac2159feb1739992b1b511a0a9afeaab10a8e
4+
refs/heads/snap-stage3: b4815ad1baffb2603f7580cbdf1ac1b01879b767
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/docs.mk

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#
1515
# The DOCS variable is their names (with no file extension).
1616
#
17+
# PDF_DOCS lists the targets for which PDF documentation should be
18+
# build.
19+
#
1720
# RUSTDOC_FLAGS_xyz variables are extra arguments to pass to the
1821
# rustdoc invocation for xyz.
1922
#
@@ -28,6 +31,8 @@ DOCS := index tutorial guide-ffi guide-macros guide-lifetimes \
2831
complement-cheatsheet guide-runtime \
2932
rust rustdoc
3033

34+
PDF_DOCS := tutorial rust
35+
3136
RUSTDOC_DEPS_rust := doc/full-toc.inc
3237
RUSTDOC_FLAGS_rust := --markdown-in-header=doc/full-toc.inc
3338

@@ -45,8 +50,6 @@ PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.md \
4550
--from=markdown --include-before-body=doc/footer.tex --to=latex
4651
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
4752

48-
49-
5053
# The rustdoc executable...
5154
RUSTDOC_EXE = $(HBIN2_H_$(CFG_BUILD))/rustdoc$(X_$(CFG_BUILD))
5255
# ...with rpath included in case --disable-rpath was provided to
@@ -146,6 +149,11 @@ doc/footer.tex: $(D)/footer.tex | doc/
146149

147150
# The (english) documentation for each doc item.
148151

152+
define DEF_SHOULD_BUILD_PDF_DOC
153+
SHOULD_BUILD_PDF_DOC_$(1) = 1
154+
endef
155+
$(foreach docname,$(PDF_DOCS),$(eval $(call DEF_SHOULD_BUILD_PDF_DOC,$(docname))))
156+
149157
define DEF_DOC
150158

151159
# HTML (rustdoc)
@@ -171,13 +179,15 @@ doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.md | doc/
171179
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) --output=$$@
172180

173181
ifneq ($(NO_PDF_DOCS),1)
182+
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
174183
DOC_TARGETS += doc/$(1).pdf
175184
doc/$(1).pdf: doc/$(1).tex
176185
@$$(call E, pdflatex: $$@)
177186
$$(Q)$$(CFG_PDFLATEX) \
178187
-interaction=batchmode \
179188
-output-directory=doc \
180189
$$<
190+
endif # SHOULD_BUILD_PDF_DOCS_$(1)
181191
endif # NO_PDF_DOCS
182192

183193
endif # ONLY_HTML_DOCS

0 commit comments

Comments
 (0)