Merge pull request #3005 from servo/rustdoc-submodules

Generate rustdoc documenation for submodules.
This commit is contained in:
Simon Sapin 2014-08-05 13:53:38 +01:00
commit baba90b471
25 changed files with 63 additions and 24 deletions

View file

@ -10,7 +10,8 @@ RUSTDOC_DEPS = $(RUSTDOC_HTML_IN_HEADER)
# FIXME(#2924) These crates make rustdoc fail for undetermined reasons.
DOC_BLACKLISTED := style
define DEF_DOC_RULES
define DEF_SERVO_DOC_RULES
.PHONY: doc-$(1)
doc-$(1): doc/$(1)/index.html
@ -30,8 +31,30 @@ endif
endef
$(foreach lib_crate,$(SERVO_LIB_CRATES) servo,\
$(eval $(call DEF_DOC_RULES,$(lib_crate))))
$(eval $(call DEF_SERVO_DOC_RULES,$(lib_crate))))
define DEF_SUBMODULES_DOC_RULES
.PHONY: doc-$(1)
doc-$(1): $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(RUSTC_DEP_$(1))
@$$(call E, rustdoc: $(1))
$$(Q) \
RUSTDOC_FLAGS="$$(ENV_RLDFLAGS_$(1))" \
RUSTDOC_TARGET="$$(CFG_BUILD_HOME)/doc" \
$$(ENV_EXT_DEPS_$(1)) \
$$(MAKE) -C $$(B)src/$$(PATH_$(1)) doc
endef
# Only Rust submodules
DOC_SUBMODULES = $(foreach submodule,$(SUBMODULES),\
$(if $(RUSTC_DEP_$(submodule)), $(submodule)))
$(foreach submodule,$(DOC_SUBMODULES),\
$(eval $(call DEF_SUBMODULES_DOC_RULES,$(submodule))))
.PHONY: doc
doc: $(foreach crate,$(SERVO_LIB_CRATES) servo,doc-$(crate))
doc: $(foreach target,$(DOC_SUBMODULES) $(SERVO_LIB_CRATES) servo,doc-$(target))

View file

@ -24,6 +24,8 @@ NATIVE_BUILDS += \
mozjs \
skia \
glfw \
fontconfig \
libpng \
$(NULL)
# NOTE: the make magic can only compute transitive build dependencies,

View file

@ -7,6 +7,7 @@
#![feature(macro_rules)]
//! Exports macros for use in other Servo crates.
#[cfg(test)]
extern crate sync;

@ -1 +1 @@
Subproject commit d09217164ed148784232598d40497fdc1a81f972
Subproject commit 2e6d5b189435f9f9118af5c2f06af3711a01a084

@ -1 +1 @@
Subproject commit 54a26d982610165caaf8a0b4fed123358205210b
Subproject commit 746fb521517eb58340c63c760c05e994391b0e34

@ -1 +1 @@
Subproject commit ac87a88dabbea73d706e2ff8502952c43ad2bc4c
Subproject commit aa718dcd3a14277ecfd51af16d5e352c6efa124b

@ -1 +1 @@
Subproject commit 9d80b68dbeac0ec61d96482dc6bfd03f89b61dac
Subproject commit 41fa53d78296d35e8190dcf1514a58e9ca98c02f

@ -1 +1 @@
Subproject commit 873585b81bba168a0ce21227042720c41f228e2a
Subproject commit 494309421daed6f1de77db350a36ac1a8faaef51

@ -1 +1 @@
Subproject commit 49613fd3ffb1c43112d419bea0a43581388f383f
Subproject commit 64c3ee2ea7898686420b8a5fe170fe41555a5509

View file

@ -8,6 +8,8 @@ RUSTC ?= rustc
RUSTDOC ?= rustdoc
RUSTFLAGS ?= -O
EXT_DEPS ?=
RUSTDOC_FLAGS ?=
RUSTDOC_TARGET ?= doc
LIB_RS = src/encoding/lib.rs
RUST_SRC = $(shell find $(VPATH)/src/encoding/. -type f -name '*.rs')
@ -38,8 +40,10 @@ check: doctest rustencoding-test
./rustencoding-test
.PHONY: doc
doc: $(LIB_RS) $(RUST_SRC)
$(RUSTDOC) $<
doc: $(RUSTDOC_TARGET)/encoding/index.html
$(RUSTDOC_TARGET)/encoding/index.html: $(LIB_RS) $(RUST_SRC) $(EXT_DEPS)
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)
.PHONY: clean
clean:

@ -1 +1 @@
Subproject commit db80b7e43c2d410fa0df3d97a854f26ddfb5b326
Subproject commit 8fb37cc40e977977b82e42460eccbf4edffb87a3

@ -1 +1 @@
Subproject commit bd84a08eda806323d13814bff7b1c98e6597d7de
Subproject commit 454d3b9f7b5e046ac61d26dee5aafb50cd44f602

@ -1 +1 @@
Subproject commit afc5e22ecf3a392dbd5269ed9eb4fc1a5462a120
Subproject commit 3722106a0d3af88da702cb21fdc997f23b4e5b86

@ -1 +1 @@
Subproject commit 949f719b1756dd0a8e63bd56da8d5ebe8c305c35
Subproject commit 4a89d9e01f178c7dd441ddae472526c9a6641d38

@ -1 +1 @@
Subproject commit 05f0b6a7781013ffbf0040f50007d09576e4a3e1
Subproject commit 99036a8596ca78b9c36de815bd4b39f050b5e6fd

@ -1 +1 @@
Subproject commit 50afbaaba0f1932771ddd9b417c39e57f78c0144
Subproject commit 6b5af96a1e95db3c4083a411855a592ac23a6fb4

@ -1 +1 @@
Subproject commit 48e17dd2e2a7f4a2e4ab074c7db4d208ff936665
Subproject commit a5cd4ef464ad86d81ecfb982ed18b9b9f8a0d38a

@ -1 +1 @@
Subproject commit 44d98042a5fdad01de7b7a53ff2be5d8117fa85b
Subproject commit ddcc9bae5a9e6e6ea449044f102e41310239ada3

@ -1 +1 @@
Subproject commit 9a6fdbee4ce4b4f1e6d5506e9fec0536a3e615eb
Subproject commit 7379a686661109407abfa808a8f85000344c1bea

@ -1 +1 @@
Subproject commit f1fb12c8b5971fd1a377b42dcafe697016bd6101
Subproject commit b9de1811d78554659f0f720166331ca7fa73f8c8

@ -1 +1 @@
Subproject commit 178602f72b69af3c7cfdd5e622cfce49906ec6c5
Subproject commit 6e60003076ad9db70ecf1b46bb8d6c271a773601

@ -1 +1 @@
Subproject commit c20c4679686047f822e6b76313b66ef82b9b453f
Subproject commit 89631a6db2c4c87cfd9c17634e3337833c555e1f

@ -1 +1 @@
Subproject commit f90c425ff54400464a5385a0f1cf35914cb4c5e8
Subproject commit 826fb1a9f8a3a72349c7feaad4ea67cbb4170c5f

View file

@ -3,6 +3,9 @@ VPATH=%VPATH%
RUSTC ?= rustc
RUSTFLAGS ?=
EXT_DEPS ?=
RUSTDOC ?= rustdoc
RUSTDOC_FLAGS ?=
RUSTDOC_TARGET ?= doc
SRC=$(shell find $(VPATH)/src -type f)
@ -20,6 +23,12 @@ url-test: src/url.rs $(SRC)
check: url-test
./url-test $(TEST)
.PHONY: doc
doc: $(RUSTDOC_TARGET)/url/index.html
$(RUSTDOC_TARGET)/url/index.html: src/url.rs $(SRC) $(EXT_DEPS)
$(RUSTDOC) $(RUSTDOC_FLAGS) $< -o $(RUSTDOC_TARGET)
.PHONY: clean
clean:
rm -f *.o *.a *.so *.dylib *.rlib *.dll *.dummy *-test

0
src/support/url/configure vendored Normal file → Executable file
View file