diff options
| author | bors <bors@rust-lang.org> | 2015-03-30 11:35:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-30 11:35:52 +0000 |
| commit | 14192d6df5cc714e5c9a3ca70b08f2514d977be2 (patch) | |
| tree | 0eedad58dd56d696f81c113e788ef0872c797af9 | |
| parent | f00264074fb8f7e3b603eb3469822813632a6d30 (diff) | |
| parent | e64b677ca66d742e7c06738bacf3a160cba827a7 (diff) | |
Auto merge of #23848 - cmr:no-compiler-docs, r=huonw
This saves a bunch of a time and will make distributions smaller, as well as avoiding filling the implementors page with internal garbage. Turn it back on with `--enable-compiler-docs` if you want them. (Crates behind the facade are not documented at all) [breaking-change]
| -rwxr-xr-x | configure | 3 | ||||
| -rw-r--r-- | mk/crates.mk | 32 | ||||
| -rw-r--r-- | mk/docs.mk | 5 |
3 files changed, 28 insertions, 12 deletions
diff --git a/configure b/configure index b4bc66933dd..ca73c1cf8b1 100755 --- a/configure +++ b/configure @@ -526,7 +526,8 @@ VAL_OPTIONS="" opt valgrind 0 "run tests with valgrind (memcheck by default)" opt helgrind 0 "run tests with helgrind instead of memcheck" opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind" -opt docs 1 "build documentation" +opt docs 1 "build standard library documentation" +opt compiler-docs 0 "build compiler documentation" opt optimize 1 "build optimized rust code" opt optimize-cxx 1 "build optimized C++ code" opt optimize-llvm 1 "build optimized LLVM" diff --git a/mk/crates.mk b/mk/crates.mk index 13e4d8cdeb8..7494a9c5f98 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -122,17 +122,29 @@ ONLY_RLIB_rustc_bitflags := 1 # You should not need to edit below this line ################################################################################ +# On channels where the only usable crate is std, only build documentation for +# std. This keeps distributions small and doesn't clutter up the API docs with +# confusing internal details from the crates behind the facade. + +ifeq ($(CFG_RELEASE_CHANNEL),stable) +DOC_CRATES := std +else +ifeq ($(CFG_RELEASE_CHANNEL),beta) +DOC_CRATES := std +else DOC_CRATES := $(filter-out rustc, \ - $(filter-out rustc_trans, \ - $(filter-out rustc_typeck, \ - $(filter-out rustc_borrowck, \ - $(filter-out rustc_resolve, \ - $(filter-out rustc_driver, \ - $(filter-out rustc_privacy, \ - $(filter-out rustc_lint, \ - $(filter-out log, \ - $(filter-out getopts, \ - $(filter-out syntax, $(CRATES)))))))))))) + $(filter-out rustc_trans, \ + $(filter-out rustc_typeck, \ + $(filter-out rustc_borrowck, \ + $(filter-out rustc_resolve, \ + $(filter-out rustc_driver, \ + $(filter-out rustc_privacy, \ + $(filter-out rustc_lint, \ + $(filter-out log, \ + $(filter-out getopts, \ + $(filter-out syntax, $(CRATES)))))))))))) +endif +endif COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \ rustc_typeck rustc_driver syntax rustc_privacy \ rustc_lint diff --git a/mk/docs.mk b/mk/docs.mk index f7ab86d3a29..d297055ba9a 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -259,7 +259,10 @@ doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/ endef $(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS))) -$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS))) + +ifdef CFG_COMPILER_DOCS + $(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS))) +endif ifdef CFG_DISABLE_DOCS $(info cfg: disabling doc build (CFG_DISABLE_DOCS)) |
