Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jul 2021 21:34:40 +0200
From:      =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= <fernape@freebsd.org>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org
Subject:   Re: git: 0a0f7486413c - main - man: Build manpages for all architectures
Message-ID:  <CAGwOe2aziQ--6OgD%2BVYr=PvSahs6o_UMeBrTzXa2LiJf0pRSGA@mail.gmail.com>
In-Reply-To: <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu>
References:  <202106300806.15U86pGq037942@gitrepo.freebsd.org> <20210706090311.aomxh4n45tkpktdc@aniel.nours.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 6, 2021 at 11:03 AM Baptiste Daroussin <bapt@freebsd.org> wrote=
:
>
> On Wed, Jun 30, 2021 at 08:06:51AM +0000, Fernando Apestegu=C3=ADa wrote:
> > The branch main has been updated by fernape (doc, ports committer):
> >
> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D0a0f7486413c147d56808b38=
055c40c64cff61f5
> >
> > commit 0a0f7486413c147d56808b38055c40c64cff61f5
> > Author:     Fernando Apestegu=C3=ADa <fernape@FreeBSD.org>
> > AuthorDate: 2021-06-09 10:58:04 +0000
> > Commit:     Fernando Apestegu=C3=ADa <fernape@FreeBSD.org>
> > 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 thi=
s 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 al=
l the
> >     architectures. The difference in disk space is negligible. Also lin=
k
> >     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}+=3D zfsbootcfg
> >
> >  SUBDIR.${MK_TESTS}+=3D tests
> >
> > +# Add architecture-specific manpages
> > +# to be included anyway
> > +MAN=3D   sconfig/sconfig.8
> > +
> > +.include <bsd.prog.mk>
> > +
> >  .include <bsd.arch.inc.mk>
> >
> >  SUBDIR_PARALLEL=3D
> > 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=3D  cgem.4
> >  MLINKS+=3Dcgem.4 if_cgem.4
> >  .endif
> >
> > -.if empty(MAN_ARCH)
> > -__arches=3D    ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH}
> > -.elif ${MAN_ARCH} =3D=3D "all"
> > +.if empty(MAN_ARCH) || ${MAN_ARCH} =3D=3D "all"
> >  __arches=3D    ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E}
> >  .else
> >  __arches=3D    ${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=3D       \
> >       rk_i2c.4 \
> >       rk_pinctrl.4 \
> >
> > +# Link files to the parent directory
> > +.for _manpage in ${MAN}
> > +MLINKS+=3D${_manpage} ../${_manpage}
> > +.endfor
>
> This breaks make -DNO_ROOT in a subtle manner and so likely pkgbase.
>
> The right way to do it is to add something that uses INSTALL_RSYMLINK or =
alike.

I'll look into it.

Thanks!

>
> Best regards,
> Bapt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGwOe2aziQ--6OgD%2BVYr=PvSahs6o_UMeBrTzXa2LiJf0pRSGA>