Skip to content

Commit 5269cea

Browse files
committed
---
yaml --- r: 103586 b: refs/heads/auto c: b4815ad h: refs/heads/master v: v3
1 parent d5407df commit 5269cea

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: bb8ac2159feb1739992b1b511a0a9afeaab10a8e
16+
refs/heads/auto: b4815ad1baffb2603f7580cbdf1ac1b01879b767
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)