Skip to content

Commit

Permalink
auto merge of #20104 : alexcrichton/rust/rollup, r=alexcrichton
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Dec 22, 2014
2 parents 1bdcfd6 + fb7c088 commit 34d6800
Show file tree
Hide file tree
Showing 246 changed files with 2,266 additions and 2,213 deletions.
34 changes: 0 additions & 34 deletions mk/docs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -216,36 +216,6 @@ endef
$(foreach docname,$(DOCS),$(eval $(call DEF_DOC,$(docname))))


# Localized documentation

# FIXME: I (huonw) haven't actually been able to test properly, since
# e.g. (by default) I'm doing an out-of-tree build (#12763), but even
# adjusting for that, the files are too old(?) and are rejected by
# po4a.
#
# As such, I've attempted to get it working as much as possible (and
# switching from pandoc to rustdoc), but preserving the old behaviour
# (e.g. only running on the guide)
.PHONY: l10n-mds
l10n-mds: $(D)/po4a.conf \
$(foreach lang,$(L10N_LANG),$(D)/po/$(lang)/*.md.po)
$(warning WARNING: localized documentation is experimental)
po4a --copyright-holder="The Rust Project Developers" \
--package-name="Rust" \
--package-version="$(CFG_RELEASE)" \
-M UTF-8 -L UTF-8 \
$(D)/po4a.conf

define DEF_L10N_DOC
DOC_L10N_TARGETS += doc/l10n/$(1)/$(2).html
doc/l10n/$(1)/$(2).html: l10n-mds $$(HTML_DEPS) $$(RUSTDOC_DEPS_$(2))
@$$(call E, rustdoc: $$@)
$$(RUSTDOC) $$(RUSTDOC_HTML_OPTS) $$(RUSTDOC_FLAGS_$(1)) doc/l10n/$(1)/$(2).md
endef

$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))


######################################################################
# Rustdoc (libstd/extra)
######################################################################
Expand Down Expand Up @@ -294,7 +264,3 @@ endif

docs: $(DOC_TARGETS)
compiler-docs: $(COMPILER_DOC_TARGETS)

docs-l10n: $(DOC_L10N_TARGETS)

.PHONY: docs-l10n
17 changes: 0 additions & 17 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@ endif
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok

TEST_RATCHET_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4)-metrics.json
TEST_RATCHET_NOISE_PERCENT=10.0

# Whether to ratchet or merely save benchmarks
ifdef CFG_RATCHET_BENCH
CRATE_TEST_EXTRA_ARGS= \
--test $(TEST_BENCH) \
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
--ratchet-noise-percent $(TEST_RATCHET_NOISE_PERCENT)
else
CRATE_TEST_EXTRA_ARGS= \
--test $(TEST_BENCH) \
--save-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4))
endif

# If we're sharding the testsuite between parallel testers,
# pass this argument along to the compiletest and crate test
# invocations.
Expand Down Expand Up @@ -455,7 +440,6 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
$$(Q)touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/
$$(Q)$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
$$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/$$(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) tmp/
@if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
then \
rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
Expand Down Expand Up @@ -697,7 +681,6 @@ CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
--mode $$(CTEST_MODE_$(4)) \
$$(CTEST_RUNTOOL_$(4))

Expand Down
2 changes: 1 addition & 1 deletion src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ fn _arm_exec_compiled_test(config: &Config,
stderr_out.as_slice());

ProcRes {
status: process::ExitStatus(exitcode),
status: process::ProcessExit::ExitStatus(exitcode),
stdout: stdout_out,
stderr: stderr_out,
cmdline: cmdline
Expand Down
46 changes: 0 additions & 46 deletions src/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
document converter, is required to generate docs as HTML from Rust's
source code.

[po4a](http://po4a.alioth.debian.org/) is required for generating translated
docs from the master (English) docs.

[GNU gettext](http://www.gnu.org/software/gettext/) is required for managing
the translation data.

## Building

To generate all the docs, just run `make docs` from the root of the repository.
Expand Down Expand Up @@ -44,43 +38,3 @@ The syntax for pandoc flavored markdown can be found at:
A nice quick reference (for non-pandoc markdown) is at:

- http://kramdown.gettalong.org/quickref.html

## Notes for translators

Notice: The procedure described below is a work in progress. We are working on
translation system but the procedure contains some manual operations for now.

To start the translation for a new language, see `po4a.conf` at first.

To generate `.pot` and `.po` files, do something like:

~~~~
po4a --copyright-holder="The Rust Project Developers" \
--package-name="Rust" \
--package-version="0.13.0" \
-M UTF-8 -L UTF-8 \
src/doc/po4a.conf
~~~~

(the version number must be changed if it is not `0.13.0` now.)

Now you can translate documents with `.po` files, commonly used with gettext. If
you are not familiar with gettext-based translation, please read the online
manual linked from http://www.gnu.org/software/gettext/ . We use UTF-8 as the
file encoding of `.po` files.

When you want to make a commit, do the command below before staging your
change:

~~~~
for f in src/doc/po/**/*.po; do
msgattrib --translated $f -o $f.strip
if [ -e $f.strip ]; then
mv $f.strip $f
else
rm $f
fi
done
~~~~

This removes untranslated entries from `.po` files to save disk space.
8 changes: 4 additions & 4 deletions src/doc/guide-ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ fn main() {
let f = Foo { x: y }; // -+ f goes into scope
// stuff // |
// |
} // -+ f & y go out of scope
} // -+ f and y go out of scope
```

Our `f` lives within the scope of `y`, so everything works. What if it didn't?
Expand All @@ -342,7 +342,7 @@ fn main() {
let y = &5i; // ---+ y goes into scope
let f = Foo { x: y }; // ---+ f goes into scope
x = &f.x; // | | error here
} // ---+ f & y go out of scope
} // ---+ f and y go out of scope
// |
println!("{}", x); // |
} // -+ x goes out of scope
Expand Down Expand Up @@ -395,7 +395,7 @@ struct Wheel {
}
fn main() {
let car = Car { name: "DeLorian".to_string() };
let car = Car { name: "DeLorean".to_string() };
for _ in range(0u, 4) {
Wheel { size: 360, owner: car };
Expand Down Expand Up @@ -431,7 +431,7 @@ struct Wheel {
}

fn main() {
let car = Car { name: "DeLorian".to_string() };
let car = Car { name: "DeLorean".to_string() };

let car_owner = Rc::new(car);

Expand Down
Loading

0 comments on commit 34d6800

Please sign in to comment.