summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-11-27 12:26:00 +0000
committerPádraig Brady <P@draigBrady.com>2015-11-28 00:11:06 +0000
commitc1b3d65877913f139175920699ad2c5aed592ea8 (patch)
tree0177dfe5c861653843a2e912002536cbde5520ff /man
parent93e83ff52f3af65023f7a95fb0f79e660603ebe3 (diff)
downloadcoreutils-c1b3d65877913f139175920699ad2c5aed592ea8.tar.xz
build: support reproducible builds with consistent man pages
Use a consistent date in the generated man pages even if SOURCE_DATE_EPOCH is not set. * Makefile.am: Generate .timestamp in the tarball. * man/local.mk: Pass .timestamp if available to help2man. * man/dummy-man: Don't bother with the year in the stub. Reported in http://bugs.debian.org/806321
Diffstat (limited to 'man')
-rwxr-xr-xman/dummy-man3
-rw-r--r--man/local.mk3
2 files changed, 3 insertions, 3 deletions
diff --git a/man/dummy-man b/man/dummy-man
index bf31912b2..f05ce2ab4 100755
--- a/man/dummy-man
+++ b/man/dummy-man
@@ -48,11 +48,10 @@ inadequate on this system. Creating a stub man page instead.
END
progname=`basename_ "$1"`
-year=`LC_ALL=C date +%Y`
bs='\'
cat >"$output" <<END
-.TH "$progname" 1 "$year" "$source" "User Commands"
+.TH "$progname" 1 "$source" "User Commands"
.SH NAME
$progname $bs- a $source program
.SH DESCRIPTION
diff --git a/man/local.mk b/man/local.mk
index d1117606f..56eda6b8d 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -184,7 +184,8 @@ endif
&& $(MKDIR_P) $$t \
&& (cd $$t && $(LN_S) '$(abs_top_builddir)/src/'$$prog$(EXEEXT) \
$$argv$(EXEEXT)) \
- && $(run_help2man) \
+ && : $${SOURCE_DATE_EPOCH=`cat $(srcdir)/.timestamp 2>/dev/null || :`} \
+ && export SOURCE_DATE_EPOCH && $(run_help2man) \
--source='$(PACKAGE_STRING)' \
--include=$(srcdir)/man/$$name.x \
--output=$$t/$$name.1 \