summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/groff/Makefile.inc3
-rwxr-xr-xgnu/usr.bin/groff/mdate.sh8
2 files changed, 10 insertions, 1 deletions
diff --git a/gnu/usr.bin/groff/Makefile.inc b/gnu/usr.bin/groff/Makefile.inc
index 67b61a8..06dbb42 100644
--- a/gnu/usr.bin/groff/Makefile.inc
+++ b/gnu/usr.bin/groff/Makefile.inc
@@ -118,7 +118,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" \
$< >$@
@@ -140,4 +140,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 0000000..03a4a09
--- /dev/null
+++ b/gnu/usr.bin/groff/mdate.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# $FreeBSD$
+
+set -e
+test -r "$1"
+export LC_ALL=C
+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)
OpenPOWER on IntegriCloud