mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Merge pull request #2922 from servo/rustdoc
Build rustdoc docs on Travis and upload them to GitHub Pages.
This commit is contained in:
commit
03ff79b872
5 changed files with 69 additions and 18 deletions
|
@ -30,3 +30,6 @@ notifications:
|
|||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
env:
|
||||
- secure: qSjs06HEBF6A7ZyCWdltko+LkVz6OpNZQnEbr0nHB3rSl9mzwwjjH6v0VOKYNgvSPTgD8eHa/nnTeTcUJPaBB3mok+X43xkEUQWHLnW/X30QU0c8Xn+7db4hCgsaUupc1XaJhzpLDj3qV8dqDiGNKIwXJHlMzIuxSW424XL1CNc=
|
||||
|
|
34
Makefile.in
34
Makefile.in
|
@ -214,42 +214,42 @@ $(eval $(call DEF_SUBMODULE_RULES,$(submodule))))
|
|||
|
||||
DONE_SUBMODULES = $(foreach submodule,$(SUBMODULES),$(DONE_$(submodule)))
|
||||
|
||||
RFLAGS_macros = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
|
||||
RFLAGS_macros = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
|
||||
SRC_macros = $(call rwildcard,$(S)src/components/macros/,*.rs)
|
||||
CRATE_macros = $(S)src/components/macros/macros.rs
|
||||
DONE_macros = $(B)src/components/macros/libmacros.dummy
|
||||
|
||||
DEPS_macros = $(CRATE_macros) $(SRC_macros) $(DONE_SUBMODULES)
|
||||
|
||||
RFLAGS_util = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
|
||||
RFLAGS_util = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES))
|
||||
SRC_util = $(call rwildcard,$(S)src/components/util/,*.rs)
|
||||
CRATE_util = $(S)src/components/util/util.rs
|
||||
DONE_util = $(B)src/components/util/libutil.dummy
|
||||
|
||||
DEPS_util = $(CRATE_util) $(SRC_util) $(DONE_SUBMODULES)
|
||||
|
||||
RFLAGS_net = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
|
||||
RFLAGS_net = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
|
||||
SRC_net = $(call rwildcard,$(S)src/components/net/,*.rs)
|
||||
CRATE_net = $(S)src/components/net/net.rs
|
||||
DONE_net = $(B)src/components/net/libnet.dummy
|
||||
|
||||
DEPS_net = $(CRATE_net) $(SRC_net) $(DONE_SUBMODULES) $(DONE_util)
|
||||
|
||||
RFLAGS_msg = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
|
||||
RFLAGS_msg = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util
|
||||
SRC_msg = $(call rwildcard,$(S)src/components/msg/,*.rs)
|
||||
CRATE_msg = $(S)src/components/msg/msg.rs
|
||||
DONE_msg = $(B)src/components/msg/libmsg.dummy
|
||||
|
||||
DEPS_msg = $(CRATE_msg) $(SRC_msg) $(DONE_SUBMODULES) $(DONE_util)
|
||||
|
||||
RFLAGS_gfx = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
RFLAGS_gfx = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
SRC_gfx = $(call rwildcard,$(S)src/components/gfx/,*.rs)
|
||||
CRATE_gfx = $(S)src/components/gfx/gfx.rs
|
||||
DONE_gfx = $(B)src/components/gfx/libgfx.dummy
|
||||
|
||||
DEPS_gfx = $(CRATE_gfx) $(SRC_gfx) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_macros)
|
||||
|
||||
RFLAGS_script = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
RFLAGS_script = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L $(B)src/components/style -L $(B)src/components/net -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
|
||||
BINDINGS_SRC = $(S)src/components/script/dom/bindings/codegen
|
||||
WEBIDLS_SRC = $(S)src/components/script/dom/webidls
|
||||
|
@ -264,7 +264,7 @@ DONE_script = $(B)src/components/script/libscript.dummy
|
|||
|
||||
DEPS_script = $(CRATE_script) $(SRC_script) $(DONE_SUBMODULES) $(DONE_util) $(DONE_style) $(DONE_net) $(DONE_msg) $(DONE_macros)
|
||||
|
||||
RFLAGS_style = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L$(B)src/components/macros
|
||||
RFLAGS_style = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/util -L$(B)src/components/macros
|
||||
MAKO_ZIP = $(S)src/components/style/Mako-0.9.1.zip
|
||||
MAKO_style = $(S)src/components/style/properties/mod.rs
|
||||
MAKO_SRC_style = $(MAKO_style).mako
|
||||
|
@ -274,7 +274,7 @@ DONE_style = $(B)src/components/style/libstyle.dummy
|
|||
|
||||
DEPS_style = $(CRATE_style) $(SRC_style) $(DONE_SUBMODULES) $(DONE_util) $(DONE_macros)
|
||||
|
||||
RFLAGS_layout_traits = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg
|
||||
RFLAGS_layout_traits = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg
|
||||
|
||||
SRC_layout_traits = $(call rwildcard,$(S)src/components/layout_traits/,*.rs)
|
||||
CRATE_layout_traits = $(S)src/components/layout_traits/layout_traits.rs
|
||||
|
@ -282,7 +282,7 @@ DONE_layout_traits = $(B)src/components/layout_traits/liblayout_traits.dummy
|
|||
|
||||
DEPS_layout_traits = $(CRATE_layout_traits) $(SRC_layout_traits) $(DONE_script) $(DONE_msg) $(DONE_net) $(DONE_gfx) $(DONE_util)
|
||||
|
||||
RFLAGS_layout = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros -L$(B)src/components/layout_traits
|
||||
RFLAGS_layout = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros -L$(B)src/components/layout_traits
|
||||
|
||||
SRC_layout = $(call rwildcard,$(S)src/components/layout/,*.rs) $(S)src/components/layout/css/user-agent.css
|
||||
CRATE_layout = $(S)src/components/layout/layout.rs
|
||||
|
@ -290,7 +290,7 @@ DONE_layout = $(B)src/components/layout/liblayout.dummy
|
|||
|
||||
DEPS_layout = $(CRATE_layout) $(SRC_layout) $(DONE_script) $(DONE_style) $(DONE_msg) $(DONE_macros) $(DONE_gfx) $(DONE_util) $(DONE_layout_traits)
|
||||
|
||||
RFLAGS_compositing = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout_traits -L $(B)src/components/style -L $(B)src/components/msg
|
||||
RFLAGS_compositing = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout_traits -L $(B)src/components/style -L $(B)src/components/msg
|
||||
|
||||
SRC_compositing = $(call rwildcard,$(S)src/components/compositing/,*.rs)
|
||||
CRATE_compositing = $(S)src/components/compositing/compositing.rs
|
||||
|
@ -298,7 +298,7 @@ DONE_compositing = $(B)src/components/compositing/libcompositing.dummy
|
|||
|
||||
DEPS_compositing = $(CRATE_compositing) $(SRC_compositing) $(DONE_util) $(DONE_msg) $(DONE_gfx) $(DONE_script) $(DONE_layout_traits) $(DONE_style)
|
||||
|
||||
RFLAGS_servo = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout_traits -L $(B)src/components/layout -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
RFLAGS_servo = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout_traits -L $(B)src/components/layout -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L$(B)src/components/macros
|
||||
|
||||
SRC_servo = $(call rwildcard,$(S)src/components/main/,*.rs)
|
||||
CRATE_servo = $(S)src/components/main/servo.rs
|
||||
|
@ -320,7 +320,7 @@ include $(S)mk/clean.mk
|
|||
define DEF_LIB_CRATE_RULES
|
||||
$$(DONE_$(1)): $$(DEPS_$(1))
|
||||
@$$(call E, compile: $$@)
|
||||
$$(Q)$$(RUSTC) $$(RFLAGS_$(1)) --out-dir $$(B)src/components/$(1) $$< && touch $$@
|
||||
$$(Q)$$(RUSTC) $(strip $(CFG_RUSTC_FLAGS)) $$(RFLAGS_$(1)) --out-dir $$(B)src/components/$(1) $$< && touch $$@
|
||||
endef
|
||||
|
||||
$(foreach lib_crate,$(SERVO_LIB_CRATES),\
|
||||
|
@ -370,9 +370,9 @@ ifneq ($(CFG_OSTYPE),linux-androideabi)
|
|||
all: servo servo-embedding
|
||||
servo: $(DEPS_servo)
|
||||
@$(call E, compile: $@)
|
||||
$(Q)$(RUSTC) $(RFLAGS_servo) $< --crate-type bin,dylib,rlib
|
||||
$(Q)$(RUSTC) $(strip $(CFG_RUSTC_FLAGS)) $(RFLAGS_servo) $< --crate-type bin,dylib,rlib
|
||||
|
||||
RFLAGS_embedding = $(strip $(CFG_RUSTC_FLAGS)) $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout -L $(B)src/components/layout_traits -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L $(B).. -L $(B)src/components/main -L $(B)src/components/macros -A non_camel_case_types -A unused_variable
|
||||
RFLAGS_embedding = $(addprefix -L $(B)src/,$(DEPS_SUBMODULES)) -L $(B)src/components/gfx -L $(B)src/components/util -L $(B)src/components/net -L $(B)src/components/script -L $(B)src/components/layout -L $(B)src/components/layout_traits -L $(B)src/components/compositing -L $(B)src/components/style -L $(B)src/components/msg -L $(B).. -L $(B)src/components/main -L $(B)src/components/macros -A non_camel_case_types -A unused_variable
|
||||
|
||||
ifeq ($(CFG_OSTYPE),apple-darwin)
|
||||
RFLAGS_embedding += -C link-args="-Wl,-U,_tc_new -Wl,-U,_tc_newarray -Wl,-U,_tc_delete -Wl,-U,_tc_deletearray"
|
||||
|
@ -382,13 +382,13 @@ CRATE_embedding = $(S)src/components/embedding/embedding.rs
|
|||
|
||||
servo-embedding: servo $(SRC_embedding) $(CRATE_embedding)
|
||||
@$(call E, compile: $@)
|
||||
$(Q)$(RUSTC) $(RFLAGS_embedding) $(CRATE_embedding) --crate-type dylib,rlib
|
||||
$(Q)$(RUSTC) $(strip $(CFG_RUSTC_FLAGS)) $(RFLAGS_embedding) $(CRATE_embedding) --crate-type dylib,rlib
|
||||
touch servo-embedding
|
||||
else
|
||||
all: servo
|
||||
servo: $(DEPS_servo)
|
||||
@$(call E, compile: $@)
|
||||
$(Q)$(RUSTC) $(RFLAGS_servo) $< -o libservo.so --crate-type dylib
|
||||
$(Q)$(RUSTC) $(strip $(CFG_RUSTC_FLAGS)) $(RFLAGS_servo) $< -o libservo.so --crate-type dylib
|
||||
touch servo
|
||||
endif
|
||||
|
||||
|
@ -424,6 +424,8 @@ endif
|
|||
|
||||
bindings: $(AUTOGEN_SRC_script)
|
||||
|
||||
include $(S)mk/doc.mk
|
||||
|
||||
# Backup targets. These axist until build slaves are using Makefile.backup directly.
|
||||
|
||||
.PHONY: backup-rust restore-rust
|
||||
|
|
32
mk/doc.mk
Normal file
32
mk/doc.mk
Normal file
|
@ -0,0 +1,32 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# FIXME(#2924) These crates make rustdoc fail for undetermined reasons.
|
||||
DOC_BLACKLISTED := style layout
|
||||
|
||||
define DEF_DOC_RULES
|
||||
.PHONY: doc-$(1)
|
||||
doc-$(1): doc/$(1)/index.html
|
||||
|
||||
ifeq (,$(filter $(1),$(DOC_BLACKLISTED)))
|
||||
|
||||
doc/$(1)/index.html: $$(DEPS_$(1))
|
||||
@$$(call E, rustdoc: $$@)
|
||||
$$(Q)$$(RUSTDOC) $$(RFLAGS_$(1)) $$<
|
||||
|
||||
else
|
||||
|
||||
.PHONY: doc/$(1)/index.html
|
||||
doc/$(1)/index.html: $$(DEPS_$(1))
|
||||
@echo SKIPPED: blacklisted rustdoc: $$@
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
$(foreach lib_crate,$(SERVO_LIB_CRATES) servo,\
|
||||
$(eval $(call DEF_DOC_RULES,$(lib_crate))))
|
||||
|
||||
|
||||
.PHONY: doc
|
||||
doc: $(foreach crate,$(SERVO_LIB_CRATES) servo,doc-$(crate))
|
|
@ -1 +1 @@
|
|||
Subproject commit 34a3bc65c7747e4a35618405380bc7ed11b6f97a
|
||||
Subproject commit 718a634f8ce07596844e56c3b53399d9d01bab06
|
|
@ -1,5 +1,19 @@
|
|||
set -e
|
||||
cd build
|
||||
../configure
|
||||
export DISPLAY=:1.0
|
||||
export RUST_TEST_TASKS=1
|
||||
make tidy && make -j2 && make check-servo && make check-content && make check-ref-cpu
|
||||
make tidy
|
||||
make -j2
|
||||
make check-servo
|
||||
make check-content
|
||||
make check-ref-cpu
|
||||
make doc
|
||||
|
||||
if [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ]
|
||||
then
|
||||
echo '<meta http-equiv=refresh content=0;url=servo/index.html>' > doc/index.html
|
||||
sudo pip install ghp-import
|
||||
ghp-import -n doc
|
||||
git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue