Skip to content

Commit fa69739

Browse files
committed
auto merge of rust-lang#4822 : graydon/rust/doc-version-stamp, r=brson
This just improves the version stamp, which was not being regenerated in cached workspaces even when the version changed. Also adds it to the pdf.
2 parents b3e1825 + 79dc10d commit fa69739

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mk/docs.mk

+6-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4545
--from=markdown --to=html \
4646
--css=rust.css \
4747
--css=manual.css \
48-
--include-before-body=doc/version_info.html \
48+
--include-before-body=doc/version_info.html \
4949
--output=$@
5050
endif
5151

@@ -66,6 +66,7 @@ doc/rust.tex: rust.md doc/version.md
6666
"$(CFG_PANDOC)" \
6767
--standalone --toc \
6868
--number-sections \
69+
--include-before-body=doc/version.md \
6970
--from=markdown --to=latex \
7071
--output=$@
7172

@@ -199,16 +200,17 @@ ifdef CFG_DISABLE_DOCS
199200
endif
200201

201202

202-
doc/version.md: $(MKFILE_DEPS) rust.md
203+
doc/version.md: $(MKFILE_DEPS) $(wildcard $(S)doc/*.*)
203204
@$(call E, version-stamp: $@)
204205
$(Q)echo "$(CFG_VERSION)" >$@
205206

206-
doc/version_info.html: version_info.html.template
207+
doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
208+
$(wildcard $(S)doc/*.*)
207209
@$(call E, version-info: $@)
208210
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
209211
$(CFG_VER_HASH) | head -c 8)/;\
210212
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
211213

212-
GENERATED += doc/version.md
214+
GENERATED += doc/version.md doc/version_info.html
213215

214216
docs: $(DOCS)

0 commit comments

Comments
 (0)