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>
Sat, 7 Oct 2023 09:36:46 +0000 (10:36 +0100)
Forwarded: https://lore.kernel.org/all/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 6e48c99a00559f4d4f7af711a88c6452194a2ffd..c9e5be9a0b6abcc177def09a4756047c060fa3c6 100644 (file)
@@ -129,6 +129,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[]