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)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 26 Sep 2019 12:19:06 +0000 (13:19 +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 30b7f2d31dd9adfd501fa9ff74115811ac6a1373..8e77a7f388a4412ab571bbb42879dc2458eda57e 100644 (file)
@@ -132,6 +132,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>