Skip to content

Commit 19c1c13

Browse files
committed
---
yaml --- r: 233322 b: refs/heads/beta c: 646eace h: refs/heads/master v: v3
1 parent b45ecff commit 19c1c13

File tree

173 files changed

+872
-680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+872
-680
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: b2aef9d58b3e568834dba85d1b62fca0b5d41cd1
26+
refs/heads/beta: 646eace6ec5db397ba97e86df067792c0cb6be03
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ hop on [#rust-internals][pound-rust-internals].
1717
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
1818

1919
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
20-
[internals]: https://internals.rust-lang.org
21-
[coc]: https://www.rust-lang.org/conduct.html
20+
[internals]: http://internals.rust-lang.org
21+
[coc]: http://www.rust-lang.org/conduct.html
2222

2323
## Feature Requests
2424

@@ -207,6 +207,6 @@ it to [Crates.io](http://crates.io). Easier said than done, but very, very
207207
valuable!
208208

209209
[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust
210-
[users]: https://users.rust-lang.org/
210+
[users]: http://users.rust-lang.org/
211211
[so]: http://stackoverflow.com/questions/tagged/rust
212212
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library

branches/beta/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ as standard libraries, tools and documentation for Rust.
1313

1414
Read ["Installing Rust"] from [The Book].
1515

16-
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
17-
[The Book]: https://doc.rust-lang.org/book/index.html
16+
["Installing Rust"]: http://doc.rust-lang.org/book/installing-rust.html
17+
[The Book]: http://doc.rust-lang.org/book/index.html
1818

1919
## Building from Source
2020

@@ -117,7 +117,7 @@ The Rust community congregates in a few places:
117117

118118
[Stack Overflow]: http://stackoverflow.com/questions/tagged/rust
119119
[/r/rust]: http://reddit.com/r/rust
120-
[users.rust-lang.org]: https://users.rust-lang.org/
120+
[users.rust-lang.org]: http://users.rust-lang.org/
121121

122122
## Contributing
123123

branches/beta/RELEASES.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -102,51 +102,51 @@ Misc
102102
* Fat pointers are now [passed in pairs of immediate arguments][fat],
103103
resulting in faster compile times and smaller code.
104104

105-
[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
105+
[`Extend`]: http://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
106106
[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
107-
[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
108-
[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
109-
[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
110-
[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
111-
[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
112-
[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
113-
[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
114-
[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
115-
[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
116-
[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
117-
[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
118-
[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
119-
[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
120-
[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
121-
[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
122-
[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
123-
[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
124-
[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
125-
[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
126-
[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
127-
[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
128-
[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
129-
[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
130-
[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
131-
[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
132-
[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
133-
[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
134-
[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
135-
[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
136-
[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
137-
[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
138-
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
139-
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
140-
[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
141-
[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
142-
[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
143-
[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
144-
[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
107+
[`iter::once`]: http://doc.rust-lang.org/nightly/std/iter/fn.once.html
108+
[`iter::empty`]: http://doc.rust-lang.org/nightly/std/iter/fn.empty.html
109+
[`matches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
110+
[`rmatches`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
111+
[`Cell`]: http://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
112+
[`RefCell`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
113+
[`wrapping_add`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
114+
[`wrapping_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
115+
[`wrapping_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
116+
[`wrapping_div`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
117+
[`wrapping_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
118+
[`wrapping_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
119+
[`wrapping_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
120+
[`wrapping_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
121+
[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
122+
[`fmt::Formatter`]: http://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
123+
[`fmt::Write`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
124+
[`io::Write`]: http://doc.rust-lang.org/nightly/std/io/trait.Write.html
125+
[`debug_struct`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
126+
[`debug_tuple`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
127+
[`debug_list`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
128+
[`debug_set`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
129+
[`debug_map`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
130+
[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
131+
[strup]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
132+
[strlow]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
133+
[`to_uppercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
134+
[`to_lowercase`]: http://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
135+
[`PoisonError`]: http://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
136+
[`RwLock`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
137+
[`Mutex`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
138+
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
139+
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
140+
[`Stdio`]: http://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
141+
[`ChildStdin`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
142+
[`ChildStdout`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
143+
[`ChildStderr`]: http://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
144+
[`io::ErrorKind`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
145145
[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
146-
[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
147-
[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
146+
[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
147+
[`mem::align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
148148
[align]: https://github.com/rust-lang/rust/pull/25646
149-
[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
149+
[`mem::min_align_of`]: http://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
150150
[typos]: https://github.com/rust-lang/rust/pull/26087
151151
[nop]: https://github.com/rust-lang/rust/pull/26336
152152
[fat]: https://github.com/rust-lang/rust/pull/26411
@@ -237,14 +237,14 @@ Misc
237237
* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
238238
with `Drop`][drop].
239239

240-
[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
241-
[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
242-
[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
243-
[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
244-
[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
245-
[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
240+
[`str::split_whitespace`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
241+
[`FromRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
242+
[`AsRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
243+
[`std::os::unix::symlink`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
244+
[`IntoIterator`]: http://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
245+
[`From`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html
246246
[rf]: https://github.com/rust-lang/rust/pull/24491
247-
[err-index]: https://doc.rust-lang.org/error-index.html
247+
[err-index]: http://doc.rust-lang.org/error-index.html
248248
[sk]: https://github.com/rust-lang/rust/pull/24615
249249
[pre]: https://github.com/rust-lang/rust/pull/25323
250250
[file]: https://github.com/rust-lang/rust/pull/24598
@@ -258,13 +258,13 @@ Misc
258258
[pie]: https://github.com/rust-lang/rust/pull/24953
259259
[abs]: https://github.com/rust-lang/rust/pull/25441
260260
[c]: https://github.com/rust-lang/rust/pull/25496
261-
[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
262-
[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
261+
[`Cloned`]: http://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
262+
[`Incoming`]: http://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
263263
[inc]: https://github.com/rust-lang/rust/pull/25522
264264
[bh]: https://github.com/rust-lang/rust/pull/25856
265-
[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
265+
[`BinaryHeap`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
266266
[ll]: https://github.com/rust-lang/rust/pull/26022
267-
[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
267+
[`split_off`]: http://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
268268
[drop]: https://github.com/rust-lang/rust/pull/24935
269269

270270
Version 1.0.0 (May 2015)
@@ -508,7 +508,7 @@ Version 1.0.0-alpha.2 (February 2015)
508508
[drop]: https://github.com/rust-lang/rust/pull/21972
509509
[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
510510
[feat]: https://github.com/rust-lang/rust/pull/21248
511-
[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
511+
[feat-forum]: http://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
512512
[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
513513
[fmt]: https://github.com/rust-lang/rust/pull/21457
514514
[into]: https://github.com/rust-lang/rust/pull/20790
@@ -709,7 +709,7 @@ Version 1.0.0-alpha (January 2015)
709709
[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
710710
[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
711711
[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
712-
[trpl]: https://doc.rust-lang.org/book/index.html
712+
[trpl]: http://doc.rust-lang.org/book/index.html
713713
[rbe]: http://rustbyexample.com/
714714

715715

branches/beta/configure

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,10 +1428,9 @@ do
14281428
LLVM_BUILD_DIR=
14291429
LLVM_INST_DIR=$CFG_LLVM_ROOT
14301430
do_reconfigure=0
1431-
# Check that LLVm FileCheck is available. Needed for the tests
1432-
need_cmd $LLVM_INST_DIR/bin/FileCheck
14331431
fi
14341432

1433+
14351434
if [ ${do_reconfigure} -ne 0 ]
14361435
then
14371436
# because git is hilarious, it might have put the module index

branches/beta/mk/cfg/i686-pc-windows-msvc.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ CFG_LDPATH_i686-pc-windows-msvc :=
2222
CFG_RUN_i686-pc-windows-msvc=$(2)
2323
CFG_RUN_TARG_i686-pc-windows-msvc=$(call CFG_RUN_i686-pc-windows-msvc,,$(2))
2424
CFG_GNU_TRIPLE_i686-pc-windows-msvc := i686-pc-win32
25+
26+
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
27+
# bootstrapping from itself. This is relevant during stage0, and other parts of
28+
# the build system take this into account.
29+
BOOTSTRAP_FROM_i686-pc-windows-msvc := i686-pc-windows-gnu

branches/beta/mk/cfg/x86_64-pc-windows-msvc.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ CFG_LDPATH_x86_64-pc-windows-msvc :=
2222
CFG_RUN_x86_64-pc-windows-msvc=$(2)
2323
CFG_RUN_TARG_x86_64-pc-windows-msvc=$(call CFG_RUN_x86_64-pc-windows-msvc,,$(2))
2424
CFG_GNU_TRIPLE_x86_64-pc-windows-msvc := x86_64-pc-win32
25+
26+
# All windows nightiles are currently a GNU triple, so this MSVC triple is not
27+
# bootstrapping from itself. This is relevant during stage0, and other parts of
28+
# the build system take this into account.
29+
BOOTSTRAP_FROM_x86_64-pc-windows-msvc := x86_64-pc-windows-gnu

branches/beta/mk/docs.mk

Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#
1414
# The DOCS variable is their names (with no file extension).
1515
#
16+
# PDF_DOCS lists the targets for which PDF documentation should be
17+
# build.
18+
#
1619
# RUSTDOC_FLAGS_xyz variables are extra arguments to pass to the
1720
# rustdoc invocation for xyz.
1821
#
@@ -32,6 +35,8 @@ DOCS += guide-crates guide-error-handling guide-ffi guide-macros guide \
3235
guide-testing
3336

3437

38+
PDF_DOCS := reference
39+
3540
RUSTDOC_DEPS_reference := doc/full-toc.inc
3641
RUSTDOC_FLAGS_reference := --html-in-header=doc/full-toc.inc
3742

@@ -43,10 +48,17 @@ L10N_LANGS := ja
4348
RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
4449
--html-in-header=doc/favicon.inc \
4550
--html-after-content=doc/footer.inc \
46-
--markdown-playground-url='https://play.rust-lang.org/'
51+
--markdown-playground-url='http://play.rust-lang.org/'
4752

4853
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
4954

55+
PANDOC_BASE_OPTS := --standalone --toc --number-sections
56+
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --from=markdown --to=latex \
57+
--include-before-body=doc/version.tex \
58+
--include-before-body=doc/footer.tex \
59+
--include-in-header=doc/uptack.tex
60+
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
61+
5062
# The rustdoc executable...
5163
RUSTDOC_EXE = $(HBIN2_H_$(CFG_BUILD))/rustdoc$(X_$(CFG_BUILD))
5264
# ...with rpath included in case --disable-rpath was provided to
@@ -77,10 +89,30 @@ else
7789
HTML_DEPS :=
7890
endif
7991

92+
# Check for xelatex
93+
94+
ifneq ($(CFG_XELATEX),)
95+
CFG_LATEX := $(CFG_XELATEX)
96+
XELATEX = 1
97+
else
98+
$(info cfg: no xelatex found, disabling LaTeX docs)
99+
NO_PDF_DOCS = 1
100+
endif
101+
102+
ifeq ($(CFG_PANDOC),)
103+
$(info cfg: no pandoc found, omitting PDF and EPUB docs)
104+
ONLY_HTML_DOCS = 1
105+
endif
106+
107+
80108
######################################################################
81109
# Rust version
82110
######################################################################
83111

112+
doc/version.tex: $(MKFILE_DEPS) $(wildcard $(D)/*.*) | doc/
113+
@$(call E, version-stamp: $@)
114+
$(Q)echo "$(CFG_VERSION)" >$@
115+
84116
HTML_DEPS += doc/version_info.html
85117
doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
86118
$(wildcard $(D)/*.*) | doc/
@@ -89,10 +121,10 @@ doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
89121
s/SHORT_HASH/$(CFG_SHORT_VER_HASH)/; \
90122
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
91123

92-
GENERATED += doc/version_info.html
124+
GENERATED += doc/version.tex doc/version_info.html
93125

94126
######################################################################
95-
# Docs from rustdoc
127+
# Docs, from rustdoc and sometimes pandoc
96128
######################################################################
97129

98130
doc/:
@@ -118,12 +150,26 @@ doc/footer.inc: $(D)/footer.inc | doc/
118150
$(Q)cp -PRp $< $@ 2> /dev/null
119151

120152
# The (english) documentation for each doc item.
153+
154+
define DEF_SHOULD_BUILD_PDF_DOC
155+
SHOULD_BUILD_PDF_DOC_$(1) = 1
156+
endef
157+
$(foreach docname,$(PDF_DOCS),$(eval $(call DEF_SHOULD_BUILD_PDF_DOC,$(docname))))
158+
159+
doc/footer.tex: $(D)/footer.inc | doc/
160+
@$(call E, pandoc: $@)
161+
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
162+
163+
doc/uptack.tex: $(D)/uptack.tex | doc/
164+
$(Q)cp $< $@
165+
166+
# HTML (rustdoc)
121167
DOC_TARGETS += doc/not_found.html
122168
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
123169
@$(call E, rustdoc: $@)
124170
$(Q)$(RUSTDOC) $(RUSTDOC_HTML_OPTS_NO_CSS) \
125171
--markdown-no-toc \
126-
--markdown-css https://doc.rust-lang.org/rust.css $<
172+
--markdown-css http://doc.rust-lang.org/rust.css $<
127173

128174
define DEF_DOC
129175

@@ -133,6 +179,47 @@ doc/$(1).html: $$(D)/$(1).md $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(1)) | doc/
133179
@$$(call E, rustdoc: $$@)
134180
$$(Q)$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) $$<
135181

182+
ifneq ($(ONLY_HTML_DOCS),1)
183+
184+
# EPUB (pandoc directly)
185+
DOC_TARGETS += doc/$(1).epub
186+
doc/$(1).epub: $$(D)/$(1).md | doc/
187+
@$$(call E, pandoc: $$@)
188+
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
189+
190+
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
191+
DOC_TARGETS += doc/$(1).tex
192+
doc/$(1).tex: $$(D)/$(1).md doc/uptack.tex doc/footer.tex doc/version.tex | doc/
193+
@$$(call E, pandoc: $$@)
194+
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
195+
196+
ifneq ($(NO_PDF_DOCS),1)
197+
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
198+
DOC_TARGETS += doc/$(1).pdf
199+
ifneq ($(XELATEX),1)
200+
doc/$(1).pdf: doc/$(1).tex
201+
@$$(call E, latex compiler: $$@)
202+
$$(Q)$$(CFG_LATEX) \
203+
-interaction=batchmode \
204+
-output-directory=doc \
205+
$$<
206+
else
207+
# The version of xelatex on the snap bots seemingly ingores -output-directory
208+
# So we'll output to . and move to the doc directory manually.
209+
# This will leave some intermediate files in the build directory.
210+
doc/$(1).pdf: doc/$(1).tex
211+
@$$(call E, latex compiler: $$@)
212+
$$(Q)$$(CFG_LATEX) \
213+
-interaction=batchmode \
214+
-output-directory=. \
215+
$$<
216+
$$(Q)mv ./$(1).pdf $$@
217+
endif # XELATEX
218+
endif # SHOULD_BUILD_PDF_DOCS_$(1)
219+
endif # NO_PDF_DOCS
220+
221+
endif # ONLY_HTML_DOCS
222+
136223
endef
137224

138225
$(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))

branches/beta/mk/main.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,11 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
400400
$$(foreach obj,$$(INSTALLED_OBJECTS_$(2)),\
401401
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(obj))
402402

403+
ifeq ($(1),0)
404+
TSREQ$(1)_T_$(2)_H_$(3) += \
405+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(call CFG_STATIC_LIB_NAME_$(2),morestack)
406+
endif
407+
403408
# Prerequisites for a working stageN compiler and libraries, for a specific
404409
# target
405410
SREQ$(1)_T_$(2)_H_$(3) = \

0 commit comments

Comments
 (0)