build: Help help2man generate reproducible man-pages.

* build-aux/GNUmakefile.in (SOURCE_DATE_EPOCH): New variable.
This commit is contained in:
Janneke Nieuwenhuizen 2023-09-09 13:56:01 +02:00
parent 6aa77fe162
commit b6bad13883

View file

@ -227,6 +227,10 @@ man: doc/mes.1 doc/mescc.1 doc/mesar.1
%: %.o %: %.o
%: %.c %: %.c
# help2man reproducibility
SOURCE_DATE_EPOCH=$(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 0)
export SOURCE_DATE_EPOCH
doc/mes.1: src/${program_prefix}mes | build doc/mes.1: src/${program_prefix}mes | build
MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \ MES_ARENA=10000000 ./pre-inst-env $(HELP2MAN) \
--name="Scheme interpreter for bootstrapping the GNU system" \ --name="Scheme interpreter for bootstrapping the GNU system" \
@ -286,7 +290,7 @@ TARBALL_VERSION=$(COMMIT:v%=%)
TARBALL_DIR:=$(PACKAGE)-$(TARBALL_VERSION) TARBALL_DIR:=$(PACKAGE)-$(TARBALL_VERSION)
TARBALL:=$(TARBALL_DIR).tar.gz TARBALL:=$(TARBALL_DIR).tar.gz
# Be friendly to Debian; avoid using EPOCH # Be friendly to Debian; avoid using EPOCH
MTIME=$(shell git show HEAD --format=%ct --no-patch 2>/dev/null) MTIME=$(SOURCE_DIR_EPOCH)
# Reproducible tarball # Reproducible tarball
TAR_FLAGS=--sort=name --mtime=@$(MTIME) --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s TAR_FLAGS=--sort=name --mtime=@$(MTIME) --owner=0 --group=0 --numeric-owner --mode=go=rX,u+rw,a-s