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>
Fri, 21 Oct 2022 20:24:21 +0000 (21:24 +0100)
Forwarded: http://mid.gmane.org/20160517132809.GE7555@decadent.org.uk

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 9a03c5f1fb7882b26f9c664651455000fef40f7e..ea9923c819c7e856b97a6f4bc5cbd03704a2d609 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 2b62ba1e72b75711e50782a574c207c41640ee82..82d3060177baa23715c537fdf3a22eab2630d350 100644 (file)
@@ -71,6 +71,9 @@ ifdef::backend-docbook[]
 [header]
 template::[header-declarations]
 <refentry>
+<refentryinfo>
+template::[docinfo]
+</refentryinfo>
 ifdef::perf_date[]
 <refentryinfo><date>{perf_date}</date></refentryinfo>
 endif::perf_date[]