Date: Wed, 19 Oct 2016 13:19:45 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r307631 - stable/11/gnu/usr.bin/groff Message-ID: <201610191319.u9JDJjYb052183@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Oct 19 13:19:45 2016 New Revision: 307631 URL: https://svnweb.freebsd.org/changeset/base/307631 Log: MFC r306740, r307150: groff: use changelog date in man pages r306740: 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. r307150: Avoid using 'head' in generating groff doc date It may not be available in certain cross build cases. Note that this is a slight change in functionality, in that now only the first line of the source ChangeLog file is processed. This is acceptable as groff will be retired and we won't encounter a possibly-different ChangeLog format. Added: stable/11/gnu/usr.bin/groff/mdate.sh - copied, changed from r306740, head/gnu/usr.bin/groff/mdate.sh Modified: stable/11/gnu/usr.bin/groff/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/gnu/usr.bin/groff/Makefile.inc ============================================================================== --- stable/11/gnu/usr.bin/groff/Makefile.inc Wed Oct 19 12:33:58 2016 (r307630) +++ stable/11/gnu/usr.bin/groff/Makefile.inc Wed Oct 19 13:19:45 2016 (r307631) @@ -119,7 +119,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9] -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} Copied and modified: stable/11/gnu/usr.bin/groff/mdate.sh (from r306740, head/gnu/usr.bin/groff/mdate.sh) ============================================================================== --- head/gnu/usr.bin/groff/mdate.sh Wed Oct 5 23:25:29 2016 (r306740, copy source) +++ stable/11/gnu/usr.bin/groff/mdate.sh Wed Oct 19 13:19:45 2016 (r307631) @@ -4,6 +4,5 @@ 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) +changelog_date=$(sed -E -n '1s/^([0-9]{4}-[0-9]{2}-[0-9]{2}).*$/\1/p' "$1") echo $(date -j -f %Y-%m-%d +"%e %B %Y" $changelog_date)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610191319.u9JDJjYb052183>