From owner-svn-doc-head@freebsd.org Wed May 4 22:04:58 2016 Return-Path: Delivered-To: svn-doc-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C719B2D2A1; Wed, 4 May 2016 22:04:58 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBDF81DCD; Wed, 4 May 2016 22:04:57 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u44M4vHE045280; Wed, 4 May 2016 22:04:57 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u44M4ulN045275; Wed, 4 May 2016 22:04:56 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201605042204.u44M4ulN045275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Wed, 4 May 2016 22:04:56 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r48778 - in head/share: mk xml X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 22:04:58 -0000 Author: wblock Date: Wed May 4 22:04:56 2016 New Revision: 48778 URL: https://svnweb.freebsd.org/changeset/doc/48778 Log: Replace revision and publication date in generated documentation with the actual date of last update. This fixes the problems with misleading "last update" dates that only reflect the change in a single rarely-changed file. Note that hrs had reservations about doing this in the Makefile rather than with a stylesheet. However, not all our source files are XML. For now, this change works, and can be replaced by a more elegant solution later. We should also consider checking dates on other files that affect the content or appearance of documents, like images. Submitted by: grembo Modified: head/share/mk/doc.commands.mk head/share/mk/doc.docbook.mk head/share/xml/freebsd-common.xsl head/share/xml/freebsd-xhtml-common.xsl Modified: head/share/mk/doc.commands.mk ============================================================================== --- head/share/mk/doc.commands.mk Wed May 4 21:38:28 2016 (r48777) +++ head/share/mk/doc.commands.mk Wed May 4 22:04:56 2016 (r48778) @@ -32,6 +32,7 @@ SED?= /usr/bin/sed SETENV?= /usr/bin/env SH?= /bin/sh SORT?= /usr/bin/sort +TAIL?= /usr/bin/tail TOUCH?= /usr/bin/touch TRUE?= /usr/bin/true XARGS?= /usr/bin/xargs Modified: head/share/mk/doc.docbook.mk ============================================================================== --- head/share/mk/doc.docbook.mk Wed May 4 21:38:28 2016 (r48777) +++ head/share/mk/doc.docbook.mk Wed May 4 22:04:56 2016 (r48778) @@ -84,6 +84,18 @@ CSS_SHEET?= ${DOC_PREFIX}/share/misc/doc # NO_SUBDIR= YES +# +# Determine latest revision +# +LATESTREVISION!=${GREP} -Ehos '\$$[F]reeBSD: ([^\$$ ]+ ){5}\$$' ${SRCS} | \ + ${AWK} '{ print \ + " --param latestrevision.timestamp \"'\''"$$4" "$$5"'\''\"" \ + " --param latestrevision.committer \"'\''"$$6"'\''\"" \ + " --param latestrevision.number \"'\''"$$3"'\''\"" \ + }' | ${SORT} | ${TAIL} -n1 + +XSLTPROCOPTS+= ${LATESTREVISION} + # ------------------------------------------------------------------------ # # Look at ${FORMATS} and work out which documents need to be generated. Modified: head/share/xml/freebsd-common.xsl ============================================================================== --- head/share/xml/freebsd-common.xsl Wed May 4 21:38:28 2016 (r48777) +++ head/share/xml/freebsd-common.xsl Wed May 4 22:04:56 2016 (r48778) @@ -53,7 +53,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -91,7 +91,7 @@ - + Modified: head/share/xml/freebsd-xhtml-common.xsl ============================================================================== --- head/share/xml/freebsd-xhtml-common.xsl Wed May 4 21:38:28 2016 (r48777) +++ head/share/xml/freebsd-xhtml-common.xsl Wed May 4 22:04:56 2016 (r48778) @@ -264,7 +264,7 @@ - +