Add rustdoc to build.

This commit is contained in:
Graydon Hoare 2011-12-20 18:27:27 -08:00
parent cab4da70c8
commit 51a9274cf6
3 changed files with 22 additions and 1 deletions

View File

@ -431,8 +431,9 @@ TSREQS := \
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE))) $(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
FUZZ := $(HBIN3_H_$(CFG_HOST_TRIPLE))/fuzzer$(X) FUZZ := $(HBIN3_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
CARGO := $(HBIN3_H_$(CFG_HOST_TRIPLE))/cargo$(X) CARGO := $(HBIN3_H_$(CFG_HOST_TRIPLE))/cargo$(X)
RUSTDOC := $(HBIN3_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
all: rustc $(GENERATED) $(DOCS) $(FUZZ) $(CARGO) all: rustc $(GENERATED) $(DOCS) $(FUZZ) $(CARGO) $(RUSTDOC)
endif endif

View File

@ -69,6 +69,7 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1 $(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
$(Q)$(call INSTALL,$(HB),$(PHB),rustc$(X)) $(Q)$(call INSTALL,$(HB),$(PHB),rustc$(X))
$(Q)$(call INSTALL,$(HB),$(PHB),cargo$(X)) $(Q)$(call INSTALL,$(HB),$(PHB),cargo$(X))
$(Q)$(call INSTALL,$(HB),$(PHB),rustdoc$(X))
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME)) $(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME))
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB)) $(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB))

View File

@ -12,6 +12,10 @@ COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs)
CARGO_CRATE := $(S)src/cargo/cargo.rc CARGO_CRATE := $(S)src/cargo/cargo.rc
CARGO_INPUTS := $(wildcard $(S)src/cargo/*rs) CARGO_INPUTS := $(wildcard $(S)src/cargo/*rs)
# Rustdoc, the documentation tool
RUSTDOC_CRATE := $(wildcard $(S)src/rustdoc/.rc)
RUSTDOC_INPUTS := $(wildcard $(S)src/rustdoc/*.rs)
# FIXME: These are only built for the host arch. Eventually we'll # FIXME: These are only built for the host arch. Eventually we'll
# have tools that need to built for other targets. # have tools that need to built for other targets.
define TOOLS_STAGE_N define TOOLS_STAGE_N
@ -64,6 +68,21 @@ $$(HBIN$(2)_H_$(4))/cargo$$(X): \
@$$(call E, cp: $$@) @$$(call E, cp: $$@)
$$(Q)cp $$< $$@ $$(Q)cp $$< $$@
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \
$$(RUSTDOC_CRATE) $$(RUSTDOC_INPUTS) \
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
$$(HBIN$(2)_H_$(4))/rustdoc$$(X): \
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X) \
$$(HSREQ$(2)_$(4))
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
endef endef
$(foreach host,$(CFG_TARGET_TRIPLES), \ $(foreach host,$(CFG_TARGET_TRIPLES), \