Skip to content

Commit 7de2379

Browse files
committed
rust_version.html is a HTML_DEPS and every html has it as dependecy
1 parent e53b566 commit 7de2379

File tree

1 file changed

+29
-34
lines changed

1 file changed

+29
-34
lines changed

mk/docs.mk

+29-34
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,23 @@ HTML_OPTS = $(BASE_DOC_OPTS) --to=html5 --section-divs --css=rust.css \
2424
TEX_OPTS = $(BASE_DOC_OPTS) --to=latex
2525
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
2626

27+
######################################################################
28+
# Rust version
29+
######################################################################
30+
doc/version.md: $(MKFILE_DEPS) $(wildcard $(S)doc/*.*)
31+
@$(call E, version-stamp: $@)
32+
$(Q)echo "$(CFG_VERSION)" >$@
33+
34+
HTML_DEPS += doc/version_info.html
35+
doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
36+
$(wildcard $(S)doc/*.*)
37+
@$(call E, version-info: $@)
38+
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
39+
$(CFG_VER_HASH) | head -c 8)/;\
40+
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
41+
42+
GENERATED += doc/version.md doc/version_info.html
43+
2744
######################################################################
2845
# Docs, from pandoc, rustdoc (which runs pandoc), and node
2946
######################################################################
@@ -55,7 +72,7 @@ endif
5572
ifneq ($(NO_DOCS),1)
5673

5774
DOCS += doc/rust.html
58-
doc/rust.html: rust.md doc/version_info.html doc/full-toc.inc $(HTML_DEPS)
75+
doc/rust.html: rust.md doc/full-toc.inc $(HTML_DEPS)
5976
@$(call E, pandoc: $@)
6077
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
6178
$(CFG_PANDOC) $(HTML_OPTS) --include-in-header=doc/full-toc.inc --output=$@
@@ -73,19 +90,19 @@ doc/rust.epub: rust.md doc/version_info.html doc/rust.css
7390
$(CFG_PANDOC) $(EPUB_OPTS) --output=$@
7491

7592
DOCS += doc/rustpkg.html
76-
doc/rustpkg.html: rustpkg.md doc/version_info.html $(HTML_DEPS)
93+
doc/rustpkg.html: rustpkg.md $(HTML_DEPS)
7794
@$(call E, pandoc: $@)
7895
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
7996
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
8097

8198
DOCS += doc/rustdoc.html
82-
doc/rustdoc.html: rustdoc.md doc/version_info.html $(HTML_DEPS)
99+
doc/rustdoc.html: rustdoc.md $(HTML_DEPS)
83100
@$(call E, pandoc: $@)
84101
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
85102
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
86103

87104
DOCS += doc/tutorial.html
88-
doc/tutorial.html: tutorial.md doc/version_info.html $(HTML_DEPS)
105+
doc/tutorial.html: tutorial.md $(HTML_DEPS)
89106
@$(call E, pandoc: $@)
90107
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
91108
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
@@ -154,57 +171,49 @@ doc/complement-bugreport.html: $(S)doc/complement-bugreport.md $(HTML_DEPS)
154171
# Guides
155172

156173
DOCS += doc/guide-macros.html
157-
doc/guide-macros.html: $(S)doc/guide-macros.md doc/version_info.html doc/rust.css \
158-
doc/favicon.inc
174+
doc/guide-macros.html: $(S)doc/guide-macros.md $(HTML_DEPS)
159175
@$(call E, pandoc: $@)
160176
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
161177
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
162178

163179
DOCS += doc/guide-container.html
164-
doc/guide-container.html: $(S)doc/guide-container.md doc/version_info.html doc/rust.css \
165-
doc/favicon.inc
180+
doc/guide-container.html: $(S)doc/guide-container.md $(HTML_DEPS)
166181
@$(call E, pandoc: $@)
167182
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
168183
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
169184

170185
DOCS += doc/guide-ffi.html
171-
doc/guide-ffi.html: $(S)doc/guide-ffi.md doc/version_info.html doc/rust.css \
172-
doc/favicon.inc
186+
doc/guide-ffi.html: $(S)doc/guide-ffi.md $(HTML_DEPS)
173187
@$(call E, pandoc: $@)
174188
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
175189
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
176190

177191
DOCS += doc/guide-testing.html
178-
doc/guide-testing.html: $(S)doc/guide-testing.md doc/version_info.html doc/rust.css \
179-
doc/favicon.inc
192+
doc/guide-testing.html: $(S)doc/guide-testing.md $(HTML_DEPS)
180193
@$(call E, pandoc: $@)
181194
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
182195
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
183196

184197
DOCS += doc/guide-borrowed-ptr.html
185-
doc/guide-borrowed-ptr.html: $(S)doc/guide-borrowed-ptr.md doc/version_info.html doc/rust.css \
186-
doc/favicon.inc
198+
doc/guide-borrowed-ptr.html: $(S)doc/guide-borrowed-ptr.md $(HTML_DEPS)
187199
@$(call E, pandoc: $@)
188200
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
189201
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
190202

191203
DOCS += doc/guide-tasks.html
192-
doc/guide-tasks.html: $(S)doc/guide-tasks.md doc/version_info.html doc/rust.css \
193-
doc/favicon.inc
204+
doc/guide-tasks.html: $(S)doc/guide-tasks.md $(HTML_DEPS)
194205
@$(call E, pandoc: $@)
195206
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
196207
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
197208

198209
DOCS += doc/guide-conditions.html
199-
doc/guide-conditions.html: $(S)doc/guide-conditions.md doc/version_info.html doc/rust.css \
200-
doc/favicon.inc
210+
doc/guide-conditions.html: $(S)doc/guide-conditions.md $(HTML_DEPS)
201211
@$(call E, pandoc: $@)
202212
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
203213
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
204214

205215
DOCS += doc/guide-rustpkg.html
206-
doc/guide-rustpkg.html: $(S)doc/guide-rustpkg.md doc/version_info.html doc/rust.css \
207-
doc/favicon.inc
216+
doc/guide-rustpkg.html: $(S)doc/guide-rustpkg.md $(HTML_DEPS)
208217
@$(call E, pandoc: $@)
209218
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
210219
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
@@ -303,20 +312,6 @@ ifdef CFG_DISABLE_DOCS
303312
DOCS :=
304313
endif
305314

306-
307-
doc/version.md: $(MKFILE_DEPS) $(wildcard $(S)doc/*.*)
308-
@$(call E, version-stamp: $@)
309-
$(Q)echo "$(CFG_VERSION)" >$@
310-
311-
doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
312-
$(wildcard $(S)doc/*.*)
313-
@$(call E, version-info: $@)
314-
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
315-
$(CFG_VER_HASH) | head -c 8)/;\
316-
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
317-
318-
GENERATED += doc/version.md doc/version_info.html
319-
320315
docs: $(DOCS)
321316
compiler-docs: $(CDOCS)
322317

0 commit comments

Comments
 (0)