diff options
author | Ed Maste <emaste@FreeBSD.org> | 2016-10-05 23:25:29 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2016-10-05 23:25:29 +0000 |
commit | fea8ff85991f056f8ee188505ae163a75e8056a1 (patch) | |
tree | 23bda0994326afa94fbef5d84f4281f4397717d1 /gnu/usr.bin | |
parent | 04970b8d6e7087a0cf17e5dde2cdfbe17cf14b92 (diff) | |
download | src-fea8ff85991f056f8ee188505ae163a75e8056a1.tar.gz src-fea8ff85991f056f8ee188505ae163a75e8056a1.zip |
groff: use changelog date rather than file modification date in man pages
The source checkout date is not particularly relevant, and this makes
groff man pages build reproducibly.
Reviewed by: bapt
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8158
Notes
Notes:
svn path=/head/; revision=306740
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/groff/Makefile.inc | 3 | ||||
-rwxr-xr-x | gnu/usr.bin/groff/mdate.sh | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/groff/Makefile.inc b/gnu/usr.bin/groff/Makefile.inc index 24bcd9868796..eced62d4e301 100644 --- a/gnu/usr.bin/groff/Makefile.inc +++ b/gnu/usr.bin/groff/Makefile.inc @@ -119,7 +119,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(GROFF_DIST)/REVISION` -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \ -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \ -e "s;@VERSION@;$(version)$(revision);g" \ - -e "s;@MDATE@;`$(SHELL) ${GROFF_DIST}/mdate.sh $<`;g" \ + -e "s;@MDATE@;$(MDATE);g" \ -e "s;@g@;$(g);g" \ -e "s;@G@;`echo $(g) | LC_ALL=C tr a-z A-Z`;g" \ $< >$@ @@ -141,4 +141,5 @@ TOPREL?= .. GROFF_DIST= ${.CURDIR}/${TOPREL}/../../../contrib/groff DIST_SUBDIR?= ${.CURDIR:T} DIST_DIR= ${GROFF_DIST}/${DIST_SUBDIR} +MDATE!= sh ${.CURDIR}/${TOPREL}/mdate.sh ${GROFF_DIST}/ChangeLog .PATH: ${DIST_DIR} diff --git a/gnu/usr.bin/groff/mdate.sh b/gnu/usr.bin/groff/mdate.sh new file mode 100755 index 000000000000..70a052abc046 --- /dev/null +++ b/gnu/usr.bin/groff/mdate.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# $FreeBSD$ + +set -e +test -r "$1" +export LC_ALL=C +changelog_date=$(sed -E -n 's/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*$/\1/p' "$1" |\ + head -n 1) +echo $(date -j -f %Y-%m-%d +"%e %B %Y" $changelog_date) |