Skip to content

Commit 51a9274

Browse files
committed
Add rustdoc to build.
1 parent cab4da7 commit 51a9274

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

Makefile.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,9 @@ TSREQS := \
431431
$(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE)))
432432
FUZZ := $(HBIN3_H_$(CFG_HOST_TRIPLE))/fuzzer$(X)
433433
CARGO := $(HBIN3_H_$(CFG_HOST_TRIPLE))/cargo$(X)
434+
RUSTDOC := $(HBIN3_H_$(CFG_HOST_TRIPLE))/rustdoc$(X)
434435

435-
all: rustc $(GENERATED) $(DOCS) $(FUZZ) $(CARGO)
436+
all: rustc $(GENERATED) $(DOCS) $(FUZZ) $(CARGO) $(RUSTDOC)
436437

437438
endif
438439

mk/install.mk

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
6969
$(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1
7070
$(Q)$(call INSTALL,$(HB),$(PHB),rustc$(X))
7171
$(Q)$(call INSTALL,$(HB),$(PHB),cargo$(X))
72+
$(Q)$(call INSTALL,$(HB),$(PHB),rustdoc$(X))
7273
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME))
7374
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
7475
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB))

mk/tools.mk

+19
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ COMPILETEST_INPUTS := $(wildcard $(S)src/compiletest/*rs)
1212
CARGO_CRATE := $(S)src/cargo/cargo.rc
1313
CARGO_INPUTS := $(wildcard $(S)src/cargo/*rs)
1414

15+
# Rustdoc, the documentation tool
16+
RUSTDOC_CRATE := $(wildcard $(S)src/rustdoc/.rc)
17+
RUSTDOC_INPUTS := $(wildcard $(S)src/rustdoc/*.rs)
18+
1519
# FIXME: These are only built for the host arch. Eventually we'll
1620
# have tools that need to built for other targets.
1721
define TOOLS_STAGE_N
@@ -64,6 +68,21 @@ $$(HBIN$(2)_H_$(4))/cargo$$(X): \
6468
@$$(call E, cp: $$@)
6569
$$(Q)cp $$< $$@
6670

71+
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X): \
72+
$$(RUSTDOC_CRATE) $$(RUSTDOC_INPUTS) \
73+
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
74+
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
75+
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
76+
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
77+
@$$(call E, compile_and_link: $$@)
78+
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$<
79+
80+
$$(HBIN$(2)_H_$(4))/rustdoc$$(X): \
81+
$$(TBIN$(1)_T_$(4)_H_$(3))/rustdoc$$(X) \
82+
$$(HSREQ$(2)_$(4))
83+
@$$(call E, cp: $$@)
84+
$$(Q)cp $$< $$@
85+
6786
endef
6887

6988
$(foreach host,$(CFG_TARGET_TRIPLES), \

0 commit comments

Comments
 (0)