Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
docs/Makefile.am | 7 -------
docs/meson.build | 2 ++
scripts/meson-timestamp.sh | 8 ++++++++
scripts/meson.build | 1 +
4 files changed, 11 insertions(+), 7 deletions(-)
create mode 100755 scripts/meson-timestamp.sh
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 1237b4c47cc..f54336cf35d 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -306,13 +306,6 @@ aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
$(top_srcdir)/scripts/genaclperms.py Makefile.am
$(AM_V_GEN)$(RUNUTF8) $(PYTHON) $(top_srcdir)/scripts/genaclperms.py $< > $@
-timestamp="$(shell if test -n "$$SOURCE_DATE_EPOCH"; \
- then \
- date -u --date="@$$SOURCE_DATE_EPOCH"; \
- else \
- date -u; \
- fi)"
-
hvsupport.html: hvsupport.html.in
hvsupport.html.in: $(top_srcdir)/scripts/hvsupport.py $(api_DATA) \
diff --git a/docs/meson.build b/docs/meson.build
index c67e114751e..8a0b459f598 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -29,6 +29,8 @@ docs_assets = [
install_data(docs_assets, install_dir: docs_html_dir)
+docs_timestamp = run_command(meson_timestamp_prog).stdout()
+
docs_api_generated = custom_target(
'generate-api',
output: [
diff --git a/scripts/meson-timestamp.sh b/scripts/meson-timestamp.sh
new file mode 100755
index 00000000000..e68be1926cf
--- /dev/null
+++ b/scripts/meson-timestamp.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if test -n "$SOURCE_DATE_EPOCH";
+then
+ date -u --date="$SOURCE_DATE_EPOCH"
+else
+ date -u
+fi
diff --git a/scripts/meson.build b/scripts/meson.build
index 05bf6ff7231..12d18b8ce52 100644
--- a/scripts/meson.build
+++ b/scripts/meson.build
@@ -24,6 +24,7 @@ scripts = [
'install-dirs.sh',
'install-symlink.sh',
'meson-python.sh',
+ 'meson-timestamp.sh',
'mock-noinline.py',
'prohibit-duplicate-header.py',
'test-wrap-argv.py',
--
2.26.2