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>
Thu, 28 Sep 2017 17:27:56 +0000 (18:27 +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 21f904e06cb47244a3e3db5fec5c05bea5826da6..aabdee329d7ba5168e94573f389ff84a03e0bbe0 100644 (file)
@@ -120,6 +120,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>