summaryrefslogtreecommitdiff
path: root/tools/perf/Documentation/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Documentation/Makefile')
-rw-r--r--tools/perf/Documentation/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/Documentation/Makefile b/tools/perf/Documentation/Makefile
index 8a7d7078e386..4407b106d977 100644
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -250,9 +250,13 @@ $(MAN_HTML): $(OUTPUT)%.html : %.txt
$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) -o $@+ $< && \
mv $@+ $@
-# Generate date from git log of the doc input file
-PERF_DATE = $(shell git log -1 --pretty="format:%cd" \
- --date=short --no-show-signature $<)
+# Generate date from either KBUILD_BUILD_TIMESTAMP or git log of
+# the doc input file
+PERF_DATE = $(strip \
+ $(if $(KBUILD_BUILD_TIMESTAMP), \
+ $(shell date -u -d '$(KBUILD_BUILD_TIMESTAMP)' +%Y-%m-%d), \
+ $(shell git log -1 --pretty="format:%cd" \
+ --date=short --no-show-signature $<)))
ifdef USE_ASCIIDOCTOR
$(OUTPUT)%.1 $(OUTPUT)%.5 $(OUTPUT)%.7 : %.txt