diff --git a/Makefile.in b/Makefile.in
index 3a762f1c00ffc..24aa25a1ca422 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -136,6 +136,8 @@ ifneq ($(wildcard $(CFG_GIT)),)
ifneq ($(wildcard $(CFG_GIT_DIR)),)
CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
--pretty=format:'(%h %ci)')
+ CFG_VER_HASH = $(shell git --git-dir=$(CFG_GIT_DIR) log -1 \
+ --pretty=format:'%H')
endif
endif
diff --git a/doc/rust.css b/doc/rust.css
index 0f318cba92bc7..c884acfb697ae 100644
--- a/doc/rust.css
+++ b/doc/rust.css
@@ -2,6 +2,8 @@ body {
padding: 1em;
margin: 0;
font-family: "Helvetica Neue", Helvetica, sans-serif;
+ background-color: white;
+ color: black;
}
body {
@@ -58,6 +60,22 @@ h1.title {
background-position: right;
}
+#versioninfo {
+ position: fixed;
+ bottom: 0px;
+ right: 0px;
+
+ background-color: white;
+ border-left: solid 1px black;
+ border-top: solid 1px black;
+ padding: 0.5em;
+}
+
+a.lessimportant {
+ color: gray;
+ font-size: 60%;
+}
+
blockquote {
color: black;
border-left: solid 1px silver;
diff --git a/doc/version_info_template.html b/doc/version_info_template.html
new file mode 100644
index 0000000000000..9376b29bcdf63
--- /dev/null
+++ b/doc/version_info_template.html
@@ -0,0 +1,10 @@
+
+
diff --git a/mk/docs.mk b/mk/docs.mk
index 4f678a8260125..742918f3d5b28 100644
--- a/mk/docs.mk
+++ b/mk/docs.mk
@@ -21,7 +21,7 @@ doc/rust.css: rust.css
$(Q)cp -a $< $@ 2> /dev/null
DOCS += doc/rust.html
-doc/rust.html: rust.md doc/version.md doc/rust.css
+doc/rust.html: rust.md doc/version_info.html doc/rust.css
@$(call E, pandoc: $@)
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
"$(CFG_PANDOC)" \
@@ -30,6 +30,7 @@ doc/rust.html: rust.md doc/version.md doc/rust.css
--number-sections \
--from=markdown --to=html \
--css=rust.css \
+ --include-before-body=doc/version_info.html \
--output=$@
endif
@@ -72,12 +73,13 @@ doc/rust.pdf: doc/rust.tex
else
DOCS += doc/tutorial.html
-doc/tutorial.html: tutorial.md doc/rust.css
+doc/tutorial.html: tutorial.md doc/version_info.html doc/rust.css
@$(call E, pandoc: $@)
$(Q)$(CFG_NODE) $(S)doc/prep.js --highlight $< | \
$(CFG_PANDOC) --standalone --toc \
--section-divs --number-sections \
--from=markdown --to=html --css=rust.css \
+ --include-before-body=doc/version_info.html \
--output=$@
endif
@@ -145,6 +147,12 @@ doc/version.md: $(MKFILE_DEPS) rust.md
@$(call E, version-stamp: $@)
$(Q)echo "$(CFG_VERSION)" >$@
+doc/version_info.html: version_info_template.html
+ @$(call E, version-info: $@)
+ sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
+ $(CFG_VER_HASH) | head --bytes=8)/;\
+ s/STAMP/$(CFG_VER_HASH)/;" $< >$@
+
GENERATED += doc/version.md
docs: $(DOCS)