perf tools: Use $KBUILD_BUILD_TIMESTAMP as man page date
authorBen Hutchings <ben@decadent.org.uk>
Mon, 13 Jul 2015 19:29:20 +0000 (20:29 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 7 Oct 2018 20:57:06 +0000 (21:57 +0100)
This allows man pages to be built reproducibly.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name tools-perf-man-date.patch

tools/perf/Documentation/Makefile
tools/perf/Documentation/asciidoc.conf

index a6506013ea509e85b2dc326d11b80048207fd01f..9bc184e60bab2d74915441dda47766d642906e2b 100644 (file)
@@ -131,6 +131,9 @@ endif
 ifdef DOCBOOK_SUPPRESS_SP
 XMLTO_EXTRA += -m manpage-suppress-sp.xsl
 endif
+ifdef KBUILD_BUILD_TIMESTAMP
+ASCIIDOC_EXTRA += -a revdate=$(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d)
+endif
 
 SHELL_PATH ?= $(SHELL)
 # Shell quote;
index 356b23a40339871321fe0c74b4230767335cb253..1347a1f45d5fcc6bc3c9a15e6d8061153968a8d4 100644 (file)
@@ -71,6 +71,9 @@ ifdef::backend-docbook[]
 [header]
 template::[header-declarations]
 <refentry>
+<refentryinfo>
+template::[docinfo]
+</refentryinfo>
 <refmeta>
 <refentrytitle>{mantitle}</refentrytitle>
 <manvolnum>{manvolnum}</manvolnum>