Date: Thu, 28 Aug 2025 11:53:44 -0400 From: Matteo Riondato <matteo@FreeBSD.org> To: John Baldwin <jhb@freebsd.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 557cc0f350e7 - main - bsd.man.mk: Handle MANSRC.{TARGET} for MK_MANCOMPRESS=no and empty MANBUILDCAT Message-ID: <743325E3-DDE0-464A-99E9-3FF0DDC28589@FreeBSD.org> In-Reply-To: <f2bf3ef0-7813-46b9-a66a-304be3bab43f@FreeBSD.org> References: <202508272012.57RKC8kl035894@gitrepo.freebsd.org> <2CBEC227-279A-4263-9B77-CAB3C5CB9E69@FreeBSD.org> <f2bf3ef0-7813-46b9-a66a-304be3bab43f@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Aug 28, 2025, at 10:09 AM, John Baldwin <jhb@freebsd.org> wrote: >=20 > On 8/28/25 08:10, Matteo Riondato wrote: >>> On Aug 27, 2025, at 4:12 PM, John Baldwin <jhb@freebsd.org> wrote: >>>=20 >>> The branch main has been updated by jhb: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D557cc0f350e758a223dffe8bca359de9= fc2642b2 >>>=20 >>> commit 557cc0f350e758a223dffe8bca359de9fc2642b2 >>> Author: John Baldwin <jhb@FreeBSD.org> >>> AuthorDate: 2025-08-27 20:11:54 +0000 >>> Commit: John Baldwin <jhb@FreeBSD.org> >>> CommitDate: 2025-08-27 20:11:54 +0000 >>>=20 >>> bsd.man.mk: Handle MANSRC.{TARGET} for MK_MANCOMPRESS=3Dno and = empty MANBUILDCAT >>>=20 >>> Reviewed by: kevans >>> Fixes: 65f60d715fd9 ("bsd.man.mk: Add a MANSRC.{TARGET} = variable") >>> Sponsored by: Chelsio Communications >>> Differential Revision: https://reviews.freebsd.org/D52181 >>> --- >> This did not fix the breakage of buildworld I reported. I had to = disable =E2=80=9CWITHOUT_MANCOMPRESS=3Dy=E2=80=9D from src.conf to make = buildworld complete. >=20 > Locally for me it fixed libutil++ (which is what you reported), and = while I also > tried a library that did not use MANSRC (libutil), something else must = be going > on. >=20 >> Once I=E2=80=99ve done a successful buildworld with = =E2=80=9CWITHOUT_MANCOMPRESS=3Dy=E2=80=9D disabled, I tried to = buildworld with =E2=80=9CWITHOUT_MANCOMPRESS=3Dy=E2=80=9D enabled, and = it failed again, at: >> make[3]: don't know how to make apmd.8. Stop >> (detailed message below) >> I have =E2=80=9CWITHOUT_APM=3Dy=E2=80=9D in src.conf, so I don=E2=80=99= t know why it is trying to build ampd.8. >=20 > Hmm, that is because of this in usr.sbin/Makefile which I think is = quite wrong > (it probably installs the manpage twice on i386 (and possibly in = different packages?) > which would break pkgbase if we were building packages for i386): >=20 > # Add architecture-specific manpages > # to be included anyway > MAN=3D apmd/apmd.8 \ > nvram/nvram.8 >=20 >> I tried without specifying =E2=80=9C-j50=E2=80=9D, with = =E2=80=9CWITHOUT_MANCOMPRESS=3Dy=E2=80=9D enabled, and it stopped at: >> make[4]: don't know how to make vi.1. Stop >=20 > This is similar to the above in that it has a relative pathname with a = subdirectory: >=20 > MAN=3D ${SRCDIR}/man/vi.1 >=20 > Most of the existing logic in bsd.man.mk uses :T, but perhaps the rule = this commit added > needs to not use :T when defining the target in the !MANSRC case. >=20 > The patch below fixes a manual 'make WITHOUT_MANCOMPRESS=3Dyes' in = usr.bin/vi in a buildenv > for me and I think would fix the apmd.8 case as well. >=20 > diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk > index 768879b64e60..a2c34eff9e3e 100644 > --- a/share/mk/bsd.man.mk > +++ b/share/mk/bsd.man.mk > @@ -169,14 +169,16 @@ ${__target}: ${MANSRC.${__page:T}:U${__page}} > .endfor > .else > .for __page in ${${__group}} > +.if defined(MANSRC.${__page:T}) > .for __target in ${__page:T:S/:/\:/g} > all-man: ${__target} > -.if defined(MANSRC.${__page:T}) > CLEANFILES+=3D ${__target} > ${__target}: ${MANSRC.${__page:T}} > ${CP} ${.ALLSRC} ${.TARGET} > -.endif > .endfor > +.else > +all-man: ${__page} > +.endif > .endfor > .endif > .endif This fixes =E2=80=9Cmake -j50 buildworld=E2=80=9D for me with = =E2=80=9CWITHOUT_MANCOMPRESS=3Dy=E2=80=9D in src.conf.=20 Thank you! > (In a related note, I don't really understand the nested for loops = used in much of bsd.man.mk, > once you do 'for page in group' page will already be a single word so = the 'for target in page' > will always just be a single iteration IIUC. Is it just a convenient = way to define __target as > a temporary variable?) That=E2=80=99s above my pay grade =3D) Thanks, Matteo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?743325E3-DDE0-464A-99E9-3FF0DDC28589>