Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jul 2018 14:23:02 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336548 - in head/share/man: man4 man5
Message-ID:  <201807201423.w6KEN2E5002419@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Fri Jul 20 14:23:01 2018
New Revision: 336548
URL: https://svnweb.freebsd.org/changeset/base/336548

Log:
  Support installing manpages for multiple or alternate architecture(s).
  
  Some section-4 manpages are architecture-specific, and the build process
  currently generates only the pages for the MACHINE_CPUARCH being built.
  man(1) supports a '-m' option to find manpages belonging to an arbitrary
  architecture other than the MACHINE_[CPU]ARCH, but we have no way to
  generate and install alternate-arch pages right now.
  
  This change adds a new make.conf variable, MAN_ARCH, which can be a list of
  one or more MACHINE_ARCH or MACHINE_CPUARCH values. All arch-specific
  manpages that exist for the named arches will be installed. If unset, it
  continues the behavior of installing just the MACHINE_CPUARCH being built.
  
  Differential Revision:	https://reviews.freebsd.org/D16198

Modified:
  head/share/man/man4/Makefile
  head/share/man/man5/make.conf.5

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Fri Jul 20 13:59:29 2018	(r336547)
+++ head/share/man/man4/Makefile	Fri Jul 20 14:23:01 2018	(r336548)
@@ -868,9 +868,18 @@ _nvd.4= 	nvd.4
 _nvme.4=	nvme.4
 .endif
 
-.if exists(${.CURDIR}/man4.${MACHINE_CPUARCH})
-SUBDIR=	man4.${MACHINE_CPUARCH}
+.if empty(MAN_ARCH)
+__arches=	${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH}
+.elif ${MAN_ARCH} == "all"
+__arches=	${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
+.else
+__arches=	${MAN_ARCH}
 .endif
+.for __arch in ${__arches:O:u}
+.if exists(${.CURDIR}/man4.${__arch})
+SUBDIR+=	man4.${__arch}
+.endif
+.endfor
 
 .if ${MK_BLUETOOTH} != "no"
 MAN+=		ng_bluetooth.4

Modified: head/share/man/man5/make.conf.5
==============================================================================
--- head/share/man/man5/make.conf.5	Fri Jul 20 13:59:29 2018	(r336547)
+++ head/share/man/man5/make.conf.5	Fri Jul 20 14:23:01 2018	(r336548)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 23, 2017
+.Dd July 20, 2018
 .Dt MAKE.CONF 5
 .Os
 .Sh NAME
@@ -399,6 +399,14 @@ Set this to disable assertions and statistics gatherin
 .Xr malloc 3 .
 It also defaults the A and J runtime options to off.
 Disabled by default on -CURRENT.
+.It Va MAN_ARCH
+.Pq Vt str
+Space-delimited list of one or more MACHINE and/or MACHINE_ARCH values
+for which section 4 man pages will be installed.
+The special value
+.Sq all
+installs all available architectures.
+The default is the MACHINE and MACHINE_ARCH being built.
 .It Va MODULES_WITH_WORLD
 .Pq Vt bool
 Set to build modules with the system instead of the kernel.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807201423.w6KEN2E5002419>