Skip to content

Commit 6bbde56

Browse files
---
yaml --- r: 149885 b: refs/heads/try2 c: 3ea50f0 h: refs/heads/master i: 149883: 9b86f1e v: v3
1 parent ce0ae32 commit 6bbde56

File tree

163 files changed

+1480
-1684
lines changed

Some content is hidden

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

163 files changed

+1480
-1684
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: c2e5135358ed462757d84504872aa92312769060
8+
refs/heads/try2: 3ea50f0e36ea518e94dd4d3ec0e0be69e05e1358
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,9 @@ probe CFG_ISCC iscc
454454
probe CFG_LLNEXTGEN LLnextgen
455455
probe CFG_PANDOC pandoc
456456
probe CFG_PDFLATEX pdflatex
457-
probe CFG_XELATEX xelatex
458-
probe CFG_LUALATEX lualatex
457+
probe CFG_XETEX xetex
458+
probe CFG_LUATEX luatex
459+
probe CFG_NODE nodejs node
459460
probe CFG_GDB gdb
460461
if [ "$CFG_OSTYPE" = "unknown-linux-gnu" ]
461462
then

branches/try2/mk/crates.mk

Lines changed: 6 additions & 7 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 rand
53+
uuid serialize sync getopts collections num test time
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 rand
60-
DEPS_green := std rand native:context_switch
59+
DEPS_extra := std term sync serialize getopts collections time
60+
DEPS_green := std native:context_switch
6161
DEPS_rustuv := std native:uv native:uv_support
6262
DEPS_native := std
6363
DEPS_syntax := std term serialize collections
@@ -71,16 +71,15 @@ DEPS_glob := std
7171
DEPS_serialize := std collections
7272
DEPS_term := std collections
7373
DEPS_semver := std
74-
DEPS_uuid := std serialize rand
74+
DEPS_uuid := std serialize
7575
DEPS_sync := std
7676
DEPS_getopts := std
77-
DEPS_collections := std rand
77+
DEPS_collections := std
7878
DEPS_fourcc := syntax std
7979
DEPS_hexfloat := syntax std
80-
DEPS_num := std rand
80+
DEPS_num := std
8181
DEPS_test := std extra collections getopts serialize term
8282
DEPS_time := std serialize
83-
DEPS_rand := std
8483

8584
TOOL_DEPS_compiletest := test green rustuv getopts
8685
TOOL_DEPS_rustdoc := rustdoc native

branches/try2/mk/docs.mk

Lines changed: 33 additions & 28 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 guide-testing \
31-
guide-runtime complement-bugreport complement-cheatsheet \
32-
complement-lang-faq complement-project-faq rust rustdoc
30+
guide-tasks guide-container guide-pointers \
31+
complement-cheatsheet guide-runtime \
32+
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.tex \
49+
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.md \
5050
--from=markdown --include-before-body=doc/footer.tex --to=latex
5151
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
5252

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

7575
ifeq ($(CFG_PDFLATEX),)
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
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
8582
else
86-
CFG_LATEX := $(CFG_XELATEX)
83+
ifeq ($(CFG_LUATEX),)
84+
$(info cfg: lacking luatex, disabling pdflatex)
85+
NO_PDF_DOCS = 1
86+
endif
8787
endif
88-
else
89-
CFG_LATEX := $(CFG_PDFLATEX)
9088
endif
9189

9290

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

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

99102
######################################################################
100103
# Rust version
101104
######################################################################
102105

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

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

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

117120
######################################################################
118-
# Docs, from rustdoc and sometimes pandoc
121+
# Docs, from rustdoc and sometimes pandoc & node
119122
######################################################################
120123

121124
doc/:
@@ -140,6 +143,10 @@ doc/footer.inc: $(D)/footer.inc | doc/
140143
@$(call E, cp: $@)
141144
$(Q)cp -a $< $@ 2> /dev/null
142145

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

145152
define DEF_SHOULD_BUILD_PDF_DOC
@@ -161,24 +168,22 @@ ifneq ($(ONLY_HTML_DOCS),1)
161168
DOC_TARGETS += doc/$(1).epub
162169
doc/$(1).epub: $$(D)/$(1).md | doc/
163170
@$$(call E, pandoc: $$@)
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=$$@
171+
$$(Q)$$(CFG_NODE) $$(D)/prep.js --highlight $$< | \
172+
$$(CFG_PANDOC) $$(PANDOC_EPUB_OPTS) --output=$$@
169173

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

176181
ifneq ($(NO_PDF_DOCS),1)
177182
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
178183
DOC_TARGETS += doc/$(1).pdf
179184
doc/$(1).pdf: doc/$(1).tex
180-
@$$(call E, latex compiler: $$@)
181-
$$(Q)$$(CFG_LATEX) \
185+
@$$(call E, pdflatex: $$@)
186+
$$(Q)$$(CFG_PDFLATEX) \
182187
-interaction=batchmode \
183188
-output-directory=doc \
184189
$$<

branches/try2/src/doc/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
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+
711
[po4a](http://po4a.alioth.debian.org/) is required for generating translated
812
docs from the master (English) docs.
913

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

2731
# Additional notes
2832

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

3236
~~~~
3337
pandoc --from=markdown --to=html5 --number-sections -o rust.html rust.md

branches/try2/src/doc/footer.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright © 2011-2014 The Rust Project Developers. Licensed under the
2+
\href{http://www.apache.org/licenses/LICENSE-2.0}{Apache License,
3+
Version 2.0} or the \href{http://opensource.org/licenses/MIT}{MIT
4+
license}, at your option.
5+
6+
This file may not be copied, modified, or distributed except according
7+
to those terms.

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;
347346
# 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;
380379
# use sync::Arc;
381380
# 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;
393392
# use sync::Arc;
394393
# 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;
410409
# use sync::Arc;
411410
# 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)