Skip to content

Commit 8abe77e

Browse files
committed
---
yaml --- r: 149886 b: refs/heads/try2 c: 1835667 h: refs/heads/master v: v3
1 parent 6bbde56 commit 8abe77e

File tree

160 files changed

+1656
-1442
lines changed

Some content is hidden

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

160 files changed

+1656
-1442
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3ea50f0e36ea518e94dd4d3ec0e0be69e05e1358
8+
refs/heads/try2: 18356675e51ca1d01493718df3f6feed52f096a9
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/configure

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,8 @@ probe CFG_ISCC iscc
454454
probe CFG_LLNEXTGEN LLnextgen
455455
probe CFG_PANDOC pandoc
456456
probe CFG_PDFLATEX pdflatex
457-
probe CFG_XETEX xetex
458-
probe CFG_LUATEX luatex
459-
probe CFG_NODE nodejs node
457+
probe CFG_XELATEX xelatex
458+
probe CFG_LUALATEX lualatex
460459
probe CFG_GDB gdb
461460
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
462461
then

branches/try2/mk/crates.mk

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@
5050
################################################################################
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
53-
uuid serialize sync getopts collections num test time
53+
uuid serialize sync getopts collections num test time rand
5454
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

5858
DEPS_std := native:rustrt native:compiler-rt
59-
DEPS_extra := std term sync serialize getopts collections time
60-
DEPS_green := std native:context_switch
59+
DEPS_extra := std term sync serialize getopts collections time rand
60+
DEPS_green := std rand native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
@@ -71,15 +71,16 @@ DEPS_glob := std
7171
DEPS_serialize := std collections
7272
DEPS_term := std collections
7373
DEPS_semver := std
74-
DEPS_uuid := std serialize
74+
DEPS_uuid := std serialize rand
7575
DEPS_sync := std
7676
DEPS_getopts := std
77-
DEPS_collections := std
77+
DEPS_collections := std rand
7878
DEPS_fourcc := syntax std
7979
DEPS_hexfloat := syntax std
80-
DEPS_num := std
80+
DEPS_num := std rand
8181
DEPS_test := std extra collections getopts serialize term
8282
DEPS_time := std serialize
83+
DEPS_rand := std
8384

8485
TOOL_DEPS_compiletest := test green rustuv getopts
8586
TOOL_DEPS_rustdoc := rustdoc native

branches/try2/mk/docs.mk

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
# translated.
2828
######################################################################
2929
DOCS := index tutorial guide-ffi guide-macros guide-lifetimes \
30-
guide-tasks guide-container guide-pointers \
31-
complement-cheatsheet guide-runtime \
32-
rust rustdoc
30+
guide-tasks guide-container guide-pointers guide-testing \
31+
guide-runtime complement-bugreport complement-cheatsheet \
32+
complement-lang-faq complement-project-faq rust rustdoc
3333

3434
PDF_DOCS := tutorial rust
3535

@@ -46,7 +46,7 @@ RUSTDOC_HTML_OPTS = --markdown-css rust.css \
4646
--markdown-in-header=doc/favicon.inc --markdown-after-content=doc/footer.inc
4747

4848
PANDOC_BASE_OPTS := --standalone --toc --number-sections
49-
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.md \
49+
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \
5050
--from=markdown --include-before-body=doc/footer.tex --to=latex
5151
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
5252

@@ -73,18 +73,20 @@ endif
7373
# Check for the various external utilities for the EPUB/PDF docs:
7474

7575
ifeq ($(CFG_PDFLATEX),)
76-
$(info cfg: no pdflatex found, omitting doc/rust.pdf)
77-
NO_PDF_DOCS = 1
78-
else
79-
ifeq ($(CFG_XETEX),)
80-
$(info cfg: no xetex found, disabling doc/rust.pdf)
81-
NO_PDF_DOCS = 1
76+
$(info cfg: no pdflatex found, deferring to xelatex)
77+
ifeq ($(CFG_XELATEX),)
78+
$(info cfg: no xelatex found, deferring to lualatex)
79+
ifeq ($(CFG_LUALATEX),)
80+
$(info cfg: no lualatex found, disabling LaTeX docs)
81+
NO_PDF_DOCS = 1
82+
else
83+
CFG_LATEX := $(CFG_LUALATEX)
84+
endif
8285
else
83-
ifeq ($(CFG_LUATEX),)
84-
$(info cfg: lacking luatex, disabling pdflatex)
85-
NO_PDF_DOCS = 1
86-
endif
86+
CFG_LATEX := $(CFG_XELATEX)
8787
endif
88+
else
89+
CFG_LATEX := $(CFG_PDFLATEX)
8890
endif
8991

9092

@@ -93,17 +95,12 @@ $(info cfg: no pandoc found, omitting PDF and EPUB docs)
9395
ONLY_HTML_DOCS = 1
9496
endif
9597

96-
ifeq ($(CFG_NODE),)
97-
$(info cfg: no node found, omitting PDF and EPUB docs)
98-
ONLY_HTML_DOCS = 1
99-
endif
100-
10198

10299
######################################################################
103100
# Rust version
104101
######################################################################
105102

106-
doc/version.md: $(MKFILE_DEPS) $(wildcard $(D)/*.*) | doc/
103+
doc/version.tex: $(MKFILE_DEPS) $(wildcard $(D)/*.*) | doc/
107104
@$(call E, version-stamp: $@)
108105
$(Q)echo "$(CFG_VERSION)" >$@
109106

@@ -115,10 +112,10 @@ doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
115112
$(CFG_VER_HASH) | head -c 8)/;\
116113
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
117114

118-
GENERATED += doc/version.md doc/version_info.html
115+
GENERATED += doc/version.tex doc/version_info.html
119116

120117
######################################################################
121-
# Docs, from rustdoc and sometimes pandoc & node
118+
# Docs, from rustdoc and sometimes pandoc
122119
######################################################################
123120

124121
doc/:
@@ -143,10 +140,6 @@ doc/footer.inc: $(D)/footer.inc | doc/
143140
@$(call E, cp: $@)
144141
$(Q)cp -a $< $@ 2> /dev/null
145142

146-
doc/footer.tex: $(D)/footer.tex | doc/
147-
@$(call E, cp: $@)
148-
$(Q)cp -a $< $@ 2> /dev/null
149-
150143
# The (english) documentation for each doc item.
151144

152145
define DEF_SHOULD_BUILD_PDF_DOC
@@ -168,22 +161,24 @@ ifneq ($(ONLY_HTML_DOCS),1)
168161
DOC_TARGETS += doc/$(1).epub
169162
doc/$(1).epub: $$(D)/$(1).md | doc/
170163
@$$(call E, pandoc: $$@)
171-
$$(Q)$$(CFG_NODE) $$(D)/prep.js --highlight $$< | \
172-
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) --output=$$@
164+
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) $$< --output=$$@
165+
166+
doc/footer.tex: $(D)/footer.inc | doc/
167+
@$$(call E, pandoc: $$@)
168+
$$(CFG_PANDOC) --from=html --to=latex $$< --output=$$@
173169

174170
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
175171
DOC_TARGETS += doc/$(1).tex
176-
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.md | doc/
172+
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
177173
@$$(call E, pandoc: $$@)
178-
$$(Q)$$(CFG_NODE) $$(D)/prep.js $$< | \
179-
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) --output=$$@
174+
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
180175

181176
ifneq ($(NO_PDF_DOCS),1)
182177
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
183178
DOC_TARGETS += doc/$(1).pdf
184179
doc/$(1).pdf: doc/$(1).tex
185-
@$$(call E, pdflatex: $$@)
186-
$$(Q)$$(CFG_PDFLATEX) \
180+
@$$(call E, latex compiler: $$@)
181+
$$(Q)$$(CFG_LATEX) \
187182
-interaction=batchmode \
188183
-output-directory=doc \
189184
$$<

branches/try2/src/doc/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44
document converter, is required to generate docs as HTML from Rust's
55
source code.
66

7-
[Node.js](http://nodejs.org/) is also required for generating HTML from
8-
the Markdown docs (reference manual, tutorials, etc.) distributed with
9-
this git repository.
10-
117
[po4a](http://po4a.alioth.debian.org/) is required for generating translated
128
docs from the master (English) docs.
139

@@ -30,8 +26,8 @@ rustdoc --output-dir html-doc/ --output-format html ../src/libstd/path.rs
3026

3127
# Additional notes
3228

33-
To generate an HTML version of a doc from Markdown without having Node.js
34-
installed, you can do something like:
29+
To generate an HTML version of a doc from Markdown manually, you can do
30+
something like:
3531

3632
~~~~
3733
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md

branches/try2/src/doc/footer.tex

Lines changed: 0 additions & 7 deletions
This file was deleted.

branches/try2/src/doc/guide-tasks.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ concurrency at this writing:
5050
* [`sync::DuplexStream`] - An extension of `pipes::stream` that allows both sending and receiving,
5151
* [`sync::SyncChan`] - An extension of `pipes::stream` that provides synchronous message sending,
5252
* [`sync::SyncPort`] - An extension of `pipes::stream` that acknowledges each message received,
53-
* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the
53+
* [`sync::rendezvous`] - Creates a stream whose channel, upon sending a message, blocks until the
5454
message is received.
5555
* [`sync::Arc`] - The Arc (atomically reference counted) type, for safely sharing immutable data,
5656
* [`sync::RWArc`] - A dual-mode Arc protected by a reader-writer lock,
5757
* [`sync::MutexArc`] - An Arc with mutable data protected by a blocking mutex,
5858
* [`sync::Semaphore`] - A counting, blocking, bounded-waiting semaphore,
59-
* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
59+
* [`sync::Mutex`] - A blocking, bounded-waiting, mutual exclusion lock with an associated
6060
FIFO condition variable,
6161
* [`sync::RWLock`] - A blocking, no-starvation, reader-writer lock with an associated condvar,
6262
* [`sync::Barrier`] - A barrier enables multiple tasks to synchronize the beginning
@@ -343,8 +343,8 @@ a single large vector of floats. Each task needs the full vector to perform its
343343

344344
~~~
345345
# extern crate sync;
346+
extern crate rand;
346347
# use std::vec;
347-
# use std::rand;
348348
use sync::Arc;
349349
350350
fn pnorm(nums: &~[f64], p: uint) -> f64 {
@@ -376,9 +376,9 @@ created by the line
376376

377377
~~~
378378
# extern crate sync;
379+
# extern crate rand;
379380
# use sync::Arc;
380381
# use std::vec;
381-
# use std::rand;
382382
# fn main() {
383383
# let numbers = vec::from_fn(1000000, |_| rand::random::<f64>());
384384
let numbers_arc=Arc::new(numbers);
@@ -389,9 +389,9 @@ and a clone of it is sent to each task
389389

390390
~~~
391391
# extern crate sync;
392+
# extern crate rand;
392393
# use sync::Arc;
393394
# use std::vec;
394-
# use std::rand;
395395
# fn main() {
396396
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
397397
# let numbers_arc = Arc::new(numbers);
@@ -406,9 +406,9 @@ Each task recovers the underlying data by
406406

407407
~~~
408408
# extern crate sync;
409+
# extern crate rand;
409410
# use sync::Arc;
410411
# use std::vec;
411-
# use std::rand;
412412
# fn main() {
413413
# let numbers=vec::from_fn(1000000, |_| rand::random::<f64>());
414414
# let numbers_arc=Arc::new(numbers);

0 commit comments

Comments
 (0)