Fix generation of hardware.html for 12.0.

- Move definition of various branch-specific variables from
  Makefile to Makefile.inc.
- Include share/mk/doc.commands.mk to ensure ${SVN} is properly
  defined.  If ${SVN} is defined (default) and exists, hardware
  is appended to SUBDIR.  Add MKTEMP to share/mk/doc.commands.mk
  as part of this change.
- If MAN4DIR is not defined (default), use mktemp(1) to create
  a temporary directory to check out the share/man/man4 path of
  the relevant src branch (determined by evaluating the _BRANCH
  variable defined in the Makefile).  Once the dev-auto.end is
  created, the temporary MAN4DIR is removed.  The src-checkout
  and man4-rmsrc targets are limited specifically to exclude the
  make(install) case, as pseudo-repeatable errors have been
  observed under certain conditions that have yet to be determined.
- While here, remove hwlist entities from hardware.xml from
  drivers that are no longer present in 12.0-CURRENT.
- Also while here, bump copyright dates.

This is based on a differential revision that had received no
feedback seven months:
 https://reviews.freebsd.org/D13467

Approved by:	re, doceng (implicit, silence)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13467
This commit is contained in:
Glen Barber 2018-07-11 18:51:18 +00:00
parent 2ce5efeb44
commit a6e3a552e1
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=51989
8 changed files with 48 additions and 24 deletions

View file

@ -6,14 +6,12 @@
.if exists(../Makefile.inc)
.include "../Makefile.inc"
.endif
.if exists(Makefile.inc)
.include "Makefile.inc"
.endif
RELN_ROOT?= ${.CURDIR}
_OS?= FreeBSD
_REVISION?= 12.0
_BRANCH?= RELEASE
THISRELEASE?= ${_OS}-${_REVISION}-${_BRANCH}
DOCS= index.xml \
schedule.xml
@ -21,8 +19,8 @@ DATA= docbook.css
SUBDIR= errata readme relnotes
.if defined(MAN4DIR) && !empty(MAN4DIR)
SUBDIR+= hardware
.if exists(${SVN})
SUBDIR+=hardware
.endif
# PGP-signed checksums

View file

@ -10,3 +10,20 @@ DESTDIR= ${HOME}/public_html/${WEBDIR}
.endif
DOCBOOK_DEPS_DISABLE= YES
.endif
.include "${DOC_PREFIX}/share/mk/doc.commands.mk"
_OS?= FreeBSD
_REVMAJOR?= 12
_REVMINOR?= 0
_REVISION?= ${REVMAJOR}.${REVMINOR}
_BRANCH?= CURRENT
THISRELEASE?= ${_OS}-${_REVISION}-${_BRANCH}
HOSTNAME!= hostname
.if (${_BRANCH:MCURRENT*} != "" || ${_BRANCH:MALPHA*} != "")
SRCBRANCH= head
.elif (${_BRANCH:MPRERELEASE} != "" || ${_BRANCH:MBETA*} != "" || ${_BRANCH:MSTABLE*} != "")
SRCBRANCH= stable/${_REVMAJOR}
.elif (${_BRANCH:MRC*} != "" || ${_BRANCH:MRELEASE*} != "")
SRCBRANCH= releng/${_REVMAJOR}.${_REVMINOR}
.endif

View file

@ -24,7 +24,7 @@
<pubdate>$FreeBSD$</pubdate>
<copyright>
<year>2017</year>
<year>2018</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation
Project</holder>
</copyright>

View file

@ -4,9 +4,10 @@
.include "../Makefile.inc"
.endif
# The path used on build-web is 'src/share/man/man4'.
.if make(all) && (!defined(MAN4DIR) || empty(MAN4DIR) || !exists(${MAN4DIR}))
. warning "MAN4DIR not found. Unable to build hardware.html"
MAN4TMP!= ${MKTEMP} -d ${.CURDIR}/svn.XXXXXXXX
MAN4DIR= ${MAN4TMP}
.if exists(${MAN4DIR})
rm -rf ${MAN4DIR}
.endif
MAN4PAGES?= ${MAN4DIR}/*.4 ${MAN4DIR}/man4.*/*.4
@ -19,14 +20,27 @@ MAN2HWNOTES_FLAGS=
MAN2HWNOTES_FLAGS= -c
.endif
DOC= hardware
FORMATS?= html
DOC?= hardware
FORMATS?= html txt
INSTALL_COMPRESSED?= gz
INSTALL_ONLY_COMPRESSED=
hardware.parsed.xml: dev-auto.ent
dev-auto.ent:
CLEANDIRS+= ${.CURDIR}/svn.*
.if ${.TARGET:M${DOC}.html}
hardware.parsed.xml: dev-auto.ent man4-rmsrc
dev-auto.ent: man4-src-checkout
${PERL} ${MAN2HWNOTES_CMD} ${MAN2HWNOTES_FLAGS} -a ${ARCHLIST} -o ${.TARGET} ${MAN4PAGES} || (rm -f ${.TARGET})
CLEANFILES+= dev-auto.ent
.endif
man4-src-checkout:
mkdir -p ${MAN4TMP}
${SVN} co svn://svn.freebsd.org/base/${SRCBRANCH}/share/man/man4 \
${MAN4TMP}
man4-rmsrc:
@# Just in case.
rm -rf ${MAN4DIR} || true
.include "${DOC_PREFIX}/share/mk/doc.project.mk"

View file

@ -46,6 +46,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation
Project</holder>
</copyright>
@ -827,8 +828,6 @@
&hwlist.ipheth;
&hwlist.ixgb;
&hwlist.ixgbe;
&hwlist.ixl;
@ -853,8 +852,6 @@
&hwlist.nge;
&hwlist.nxge;
&hwlist.oce;
&hwlist.pcn;
@ -910,8 +907,6 @@
&hwlist.vx;
&hwlist.vxge;
&hwlist.wb;
&hwlist.xe;
@ -1005,8 +1000,6 @@
&hwlist.cp;
&hwlist.ctau;
&hwlist.cm;
</sect2>
<sect2 xml:id="serial">

View file

@ -43,6 +43,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation
Project</holder>
</copyright>

View file

@ -25,7 +25,7 @@
<!-- Last rev: 288943 -->
<copyright>
<year>2017</year>
<year>2018</year>
<holder role="mailto:doc@FreeBSD.org">The &os; Documentation
Project</holder>
</copyright>

View file

@ -15,6 +15,7 @@ FIND?= /usr/bin/find
GREP?= /usr/bin/grep
LN?= /bin/ln
MKDIR?= /bin/mkdir
MKTEMP?= /usr/bin/mktemp
MV?= /bin/mv
RM?= /bin/rm
ISPELL?= ispell