From owner-dev-commits-src-all@freebsd.org Wed Jun 30 08:06:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4456165F9E4; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFDT71WRzz4htg; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C52FFAB; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U86pNO037943; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U86pGq037942; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git) Date: Wed, 30 Jun 2021 08:06:51 GMT Message-Id: <202106300806.15U86pGq037942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa?= Subject: git: 0a0f7486413c - main - man: Build manpages for all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a0f7486413c147d56808b38055c40c64cff61f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 08:06:51 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 commit 0a0f7486413c147d56808b38055c40c64cff61f5 Author: Fernando ApesteguĂ­a AuthorDate: 2021-06-09 10:58:04 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2021-06-30 07:57:51 +0000 man: Build manpages for all architectures Building and installing architecture-specific man pages only raises a number of problems: * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an example, it does not show results for pae(4). The reason for this is that the cgi interface runs on FreeBSD amd64. * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) for an example. * Also, we have broken links in our Release Notes. This is a consequence of the first point. See https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. Make MAN_ARCH default to 'all' so we build all the man pages for all the architectures. The difference in disk space is negligible. Also link architecture-specific man pages to their own section while keeping their own namespace. PR: 212290 Reported by: mj@bsdops.com Approved by: ceri@, wosch@ MFC after: 4 weeks --- sbin/Makefile | 6 ++++++ share/man/man4/Makefile | 4 +--- share/man/man4/man4.aarch64/Makefile | 5 +++++ share/man/man4/man4.arm/Makefile | 5 +++++ share/man/man4/man4.i386/Makefile | 5 +++++ share/man/man4/man4.powerpc/Makefile | 5 +++++ share/man/man5/make.conf.5 | 2 +- usr.sbin/Makefile | 7 +++++++ usr.sbin/apm/Makefile | 4 ++++ 9 files changed, 39 insertions(+), 4 deletions(-) diff --git a/sbin/Makefile b/sbin/Makefile index 64840bae82bb..f53e2f037ebe 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -90,6 +90,12 @@ SUBDIR.${MK_ZFS}+= zfsbootcfg SUBDIR.${MK_TESTS}+= tests +# Add architecture-specific manpages +# to be included anyway +MAN= sconfig/sconfig.8 + +.include + .include SUBDIR_PARALLEL= diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5051470edc71..9027fe7df841 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -895,9 +895,7 @@ _cgem.4= cgem.4 MLINKS+=cgem.4 if_cgem.4 .endif -.if empty(MAN_ARCH) -__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} -.elif ${MAN_ARCH} == "all" +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all" __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} .else __arches= ${MAN_ARCH} diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index 6714a47011ef..ef5fcd84ccd4 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -17,6 +17,11 @@ MAN= \ rk_i2c.4 \ rk_pinctrl.4 \ +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/aarch64 .include diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 0b3eec427934..2ac8dbb5fd81 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -18,6 +18,11 @@ MAN= \ MLINKS= imx_wdog.4 imxwdt.4 MLINKS+= mge.4 if_mge.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/arm .include diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index a21b3cd6302b..e3d2e66ca78d 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -21,6 +21,11 @@ MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4 MLINKS+=pae.4 PAE.4 MLINKS+=sbni.4 if_sbni.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/i386 .include diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index 05c5d4012fe8..aa0e137fcedd 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -15,6 +15,11 @@ MAN= adb.4 \ snd_davbus.4 \ tsec.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/powerpc .include diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 5885d9476d71..b3623b29a950 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -385,7 +385,7 @@ 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 is also the default value. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 6acef31cc23a..f19af2a5566d 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -213,6 +213,13 @@ SUBDIR.${MK_TESTS}+= tests .include +# Add architecture-specific manpages +# to be included anyway +MAN= apmd/apmd.8 \ + nvram/nvram.8 + +.include + SUBDIR_PARALLEL= .include diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index f52453c62522..27fa0c37d5cf 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -5,6 +5,10 @@ MAN= apm.8 MLINKS= apm.8 apmconf.8 MANSUBDIR= /${MACHINE_CPUARCH} +# Link files to the parent directory +MLINKS+= apm.8 ../apm.8 +MLINKS+= apmconf.8 ../apmconf.8 + PACKAGE=apm .include