git: 3a570865ceb5 - main - devel/llvm*: (NFC) extract MAN1SRCS list

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Tue, 03 May 2022 18:58:42 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3a570865ceb55217f755228ab9ed01597947bd42

commit 3a570865ceb55217f755228ab9ed01597947bd42
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-05-03 18:58:33 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-05-03 18:58:33 +0000

    devel/llvm*: (NFC) extract MAN1SRCS list
    
    Move the lists of manpages into Makefile.MAN1SRCS as with COMMANDS.
    
    Sponsored by:   DARPA, AFRL
---
 devel/llvm-cheri/Makefile            | 58 ++++---------------------------
 devel/llvm-cheri/Makefile.MAN1SRCS   | 56 ++++++++++++++++++++++++++++++
 devel/llvm-devel/Makefile            | 60 ++++----------------------------
 devel/llvm-devel/Makefile.MAN1SRCS   | 64 ++++++++++++++++++++++++++++++++++
 devel/llvm-morello/Makefile.MAN1SRCS |  1 +
 devel/llvm10/Makefile                | 50 ++++-----------------------
 devel/llvm10/Makefile.MAN1SRCS       | 54 +++++++++++++++++++++++++++++
 devel/llvm11/Makefile                | 50 ++++-----------------------
 devel/llvm11/Makefile.MAN1SRCS       | 54 +++++++++++++++++++++++++++++
 devel/llvm12/Makefile                | 52 ++++------------------------
 devel/llvm12/Makefile.MAN1SRCS       | 56 ++++++++++++++++++++++++++++++
 devel/llvm13/Makefile                | 59 +++++---------------------------
 devel/llvm13/Makefile.MAN1SRCS       | 65 +++++++++++++++++++++++++++++++++++
 devel/llvm14/Makefile                | 60 +++++---------------------------
 devel/llvm14/Makefile.MAN1SRCS       | 66 ++++++++++++++++++++++++++++++++++++
 devel/llvm70/Makefile                | 22 ++++--------
 devel/llvm70/Makefile.MAN1SRCS       | 39 +++++++++++++++++++++
 devel/llvm80/Makefile                | 24 ++++---------
 devel/llvm80/Makefile.MAN1SRCS       | 41 ++++++++++++++++++++++
 devel/llvm90/Makefile                | 47 +++----------------------
 devel/llvm90/Makefile.MAN1SRCS       | 50 +++++++++++++++++++++++++++
 21 files changed, 609 insertions(+), 419 deletions(-)

diff --git a/devel/llvm-cheri/Makefile b/devel/llvm-cheri/Makefile
index 36a92d0df68e..40e48b07deb6 100644
--- a/devel/llvm-cheri/Makefile
+++ b/devel/llvm-cheri/Makefile
@@ -101,6 +101,8 @@ PLIST_SUB+=	COMMAND_SUFFIX=${COMMAND_SUFFIX} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
+MAN1SRCS+=	${LLVM_MAN1SRCS}
+
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
 		${LIBNAME}.0 \
@@ -114,16 +116,12 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-portbld-${OPSYS:tl}${
 .if ${PORT_OPTIONS:MCLANG}
 LLVM_ENABLE_PROJECTS+=	clang
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		diagtool.1 \
-		scan-build.1
-MAN1SRCS+=	clang-tblgen.1
-#DOCS_PLIST_FILES+=	man/man1/scan-build${LLVM_SUFFIX}.1.gz
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 USES+=		gnome
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 _USES_PYTHON=	python:3.6+
 .endif
 
@@ -135,7 +133,7 @@ COMMANDS+=	${LLD_COMMANDS}
 .if ${PORT_OPTIONS:MLLDB}
 LLVM_ENABLE_PROJECTS+=	lldb
 COMMANDS+=	${LLDB_COMMANDS}
-MAN1SRCS+=	lldb-tblgen.1
+MAN1SRCS+=	${LLDB_MAN1SRCS}
 _USES_PYTHON=	python:3.6+
 .endif
 
@@ -146,53 +144,9 @@ CMAKE_ARGS+=	-DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS:ts;}"
 _USES_PYTHON?=	python:3.6+,build
 USES+=		${_USES_PYTHON}
 
-MAN1SRCS+=	bugpoint.1 \
-		dsymutil.1 \
-		llc.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-install-name-tool.1 \
-		llvm-lib.1 \
-		llvm-libtool-darwin.1 \
-		llvm-link.1 \
-		llvm-lipo.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-profgen.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		opt.1
-
-MAN1SRCS+= \
-		llvm-otool.1 \
-		llvm-tblgen.1 \
-		tblgen.1
-
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 post-patch:
 	${REINPLACE_CMD} -e 's|import lit|import lit${LLVM_SUFFIX}|' \
diff --git a/devel/llvm-cheri/Makefile.MAN1SRCS b/devel/llvm-cheri/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..fdc806f62eb1
--- /dev/null
+++ b/devel/llvm-cheri/Makefile.MAN1SRCS
@@ -0,0 +1,56 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	dsymutil.1 \
+	llc.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
+	llvm-exegesis.1 \
+	llvm-extract.1 \
+	llvm-install-name-tool.1 \
+	llvm-lib.1 \
+	llvm-libtool-darwin.1 \
+	llvm-link.1 \
+	llvm-lipo.1 \
+	llvm-locstats.1 \
+	llvm-mca.1 \
+	llvm-nm.1 \
+	llvm-objcopy.1 \
+	llvm-objdump.1 \
+	llvm-otool.1 \
+	llvm-pdbutil.1 \
+	llvm-profdata.1 \
+	llvm-profgen.1 \
+	llvm-ranlib.1 \
+	llvm-readelf.1 \
+	llvm-readobj.1 \
+	llvm-size.1 \
+	llvm-stress.1 \
+	llvm-strings.1 \
+	llvm-strip.1 \
+	llvm-symbolizer.1 \
+	llvm-tblgen.1 \
+	opt.1 \
+	tblgen.1
+
+CLANG_MAN1SRCS= \
+	clang.1 \
+	clang-tblgen.1 \
+	diagtool.1 \
+	scan-build.1
+
+LIT_MAN1SRCS= \
+	lit.1 \
+	FileCheck.1
+
+LLDB_MAN1SRCS= \
+	lldb-tblgen.1
diff --git a/devel/llvm-devel/Makefile b/devel/llvm-devel/Makefile
index 8d8de930e670..39bdb97be391 100644
--- a/devel/llvm-devel/Makefile
+++ b/devel/llvm-devel/Makefile
@@ -175,54 +175,7 @@ PLIST_SUB+=	LLVM_MAJOR=${LLVM_MAJOR} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
-MAN1SRCS+=	bugpoint.1 \
-		clang-tblgen.1 \
-		dsymutil.1 \
-		llc.1 \
-		lldb-tblgen.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-ifs.1 \
-		llvm-install-name-tool.1 \
-		llvm-lib.1 \
-		llvm-libtool-darwin.1 \
-		llvm-lipo.1 \
-		llvm-link.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-otool.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-profgen.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-remark-size-diff.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		llvm-tblgen.1 \
-		llvm-tli-checker.1 \
-		mlir-tblgen.1 \
-		opt.1 \
-		tblgen.1
+MAN1SRCS+=	${LLVM_MAN1SRCS}
 
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
@@ -275,9 +228,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${
 .if ${PORT_OPTIONS:MCLANG}
 LLVM_ENABLE_PROJECTS+=	clang
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		diagtool.1 \
-		scan-build.1
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 CLANG_PATTERN=	(c-index-test|clang|diagtool|hmaptool|intercept-|libear|libscanbuild|analyze-|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer)
 SHEBANG_FILES+=	clang/tools/clang-format/git-clang-format \
 		clang/tools/clang-format/clang-format-diff.py \
@@ -301,7 +252,7 @@ USES+=	localbase
 .if ${PORT_OPTIONS:MEXTRAS}
 LLVM_ENABLE_PROJECTS+=	clang-tools-extra
 COMMANDS+=	${EXTRAS_COMMANDS}
-MAN1SRCS+=	extraclangtools.1
+MAN1SRCS+=	${EXTRAS_MAN1SRCS}
 PORTDOCS+=	clang-tools
 SHEBANG_FILES+=	clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py \
 		clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py \
@@ -314,7 +265,7 @@ COMMANDS+=	${FLANG_COMMANDS}
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 .endif
 
 .if ${PORT_OPTIONS:MLLD}
@@ -335,7 +286,7 @@ COMMANDS+=	${MLIR_COMMANDS}
 
 .if ${PORT_OPTIONS:MOPENMP}
 LLVM_ENABLE_PROJECTS+=	openmp
-MAN1SRCS+=	llvmopenmp.1
+MAN1SRCS+=	${OPENMP_MAN1SRCS}
 COMMANDS+=	${OPENMP_COMMANDS}
 .endif
 OPENMP_PATTERN=	${OPENMP_COMMANDS:tW:C/  */|/g}|cmake\/openmp|libarcher|lib[ig]*omp|omp.h|ompt.h|ompt-multiplex.h|omp-tools.h
@@ -346,6 +297,7 @@ CMAKE_ARGS+=	-DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS:ts;}"
 
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 .if defined(WITH_DEBUG)
 CMAKE_BUILD_TYPE=	RelWithDebInfo
diff --git a/devel/llvm-devel/Makefile.MAN1SRCS b/devel/llvm-devel/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..2c7af5733bfd
--- /dev/null
+++ b/devel/llvm-devel/Makefile.MAN1SRCS
@@ -0,0 +1,64 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	clang-tblgen.1 \
+	dsymutil.1 \
+	llc.1 \
+	lldb-tblgen.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
+	llvm-exegesis.1 \
+	llvm-extract.1 \
+	llvm-ifs.1 \
+	llvm-install-name-tool.1 \
+	llvm-lib.1 \
+	llvm-libtool-darwin.1 \
+	llvm-lipo.1 \
+	llvm-link.1 \
+	llvm-locstats.1 \
+	llvm-mca.1 \
+	llvm-nm.1 \
+	llvm-objcopy.1 \
+	llvm-objdump.1 \
+	llvm-otool.1 \
+	llvm-pdbutil.1 \
+	llvm-profdata.1 \
+	llvm-profgen.1 \
+	llvm-ranlib.1 \
+	llvm-readelf.1 \
+	llvm-readobj.1 \
+	llvm-remark-size-diff.1 \
+	llvm-size.1 \
+	llvm-stress.1 \
+	llvm-strings.1 \
+	llvm-strip.1 \
+	llvm-symbolizer.1 \
+	llvm-tblgen.1 \
+	llvm-tli-checker.1 \
+	mlir-tblgen.1 \
+	opt.1 \
+	tblgen.1
+
+CLANG_MAN1SRCS= \
+	clang.1 \
+	diagtool.1 \
+	scan-build.1
+
+EXTRAS_MAN1SRCS= \
+	extraclangtools.1
+
+LIT_MAN1SRCS= \
+	lit.1 \
+	FileCheck.1
+
+OPENMP_MAN1SRCS= \
+	llvmopenmp.1
diff --git a/devel/llvm-morello/Makefile.MAN1SRCS b/devel/llvm-morello/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..78b439db8b4b
--- /dev/null
+++ b/devel/llvm-morello/Makefile.MAN1SRCS
@@ -0,0 +1 @@
+.include "${.PARSEDIR}/../llvm-cheri/Makefile.MAN1SRCS"
diff --git a/devel/llvm10/Makefile b/devel/llvm10/Makefile
index 305035dc44c4..12daf3b7fe55 100644
--- a/devel/llvm10/Makefile
+++ b/devel/llvm10/Makefile
@@ -174,44 +174,7 @@ PLIST_SUB+=	LLVM_RELEASE=${LLVM_RELEASE} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
-MAN1SRCS+=	bugpoint.1 \
-		dsymutil.1 \
-		llc.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-build.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-lib.1 \
-		llvm-lipo.1 \
-		llvm-link.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		opt.1 \
-		tblgen.1
+MAN1SRCS+=	${LLVM_MAN1SRCS}
 
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
@@ -261,9 +224,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${
 
 .if ${PORT_OPTIONS:MCLANG}
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		diagtool.1 \
-		scan-build.1
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 CLANG_PATTERN=	(c-index-test|clang|diagtool|hmaptool|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer|AnalyzerPlugin.so)
 SHEBANG_FILES+=	tools/clang/tools/scan-view/bin/scan-view \
 		tools/clang/tools/clang-format/clang-format-diff.py \
@@ -278,7 +239,7 @@ COMPILER_RT_PATTERN=	(sanitizer|include.xray|include\/fuzzer|profile\/InstrProfD
 
 .if ${PORT_OPTIONS:MEXTRAS}
 COMMANDS+=	${EXTRAS_COMMANDS}
-MAN1SRCS+=	extraclangtools.1
+MAN1SRCS+=	${EXTRAS_MAN1SRCS}
 PORTDOCS+=	clang-tools
 SHEBANG_FILES+=	tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py \
 		tools/clang/tools/extra/clang-tidy/tool/clang-tidy-diff.py \
@@ -286,7 +247,7 @@ SHEBANG_FILES+=	tools/clang/tools/extra/clang-include-fixer/find-all-symbols/too
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 .endif
 
 .if ${PORT_OPTIONS:MLLD}
@@ -296,7 +257,7 @@ PORTDOCS+=	lld
 
 .if ${PORT_OPTIONS:MLLDB}
 COMMANDS+=	${LLDB_COMMANDS}
-MAN1SRCS+=	lldb.1
+MAN1SRCS+=	${LLDB_MAN1SRCS}
 USES+=		lua
 .endif
 
@@ -308,6 +269,7 @@ PYCLANG_PATTERN=	(clang\/(__init__|cindex|enumerations).py)$$
 
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 _FREEBSD_BACKENDS=	AArch64 ARM Mips PowerPC RISCV Sparc X86
 FREEBSD_BACKENDS=	${_FREEBSD_BACKENDS}
diff --git a/devel/llvm10/Makefile.MAN1SRCS b/devel/llvm10/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..d8b5619b44c0
--- /dev/null
+++ b/devel/llvm10/Makefile.MAN1SRCS
@@ -0,0 +1,54 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	dsymutil.1 \
+	llc.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-build.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
+	llvm-exegesis.1 \
+	llvm-extract.1 \
+	llvm-lib.1 \
+	llvm-lipo.1 \
+	llvm-link.1 \
+	llvm-locstats.1 \
+	llvm-mca.1 \
+	llvm-nm.1 \
+	llvm-objcopy.1 \
+	llvm-objdump.1 \
+	llvm-pdbutil.1 \
+	llvm-profdata.1 \
+	llvm-ranlib.1 \
+	llvm-readelf.1 \
+	llvm-readobj.1 \
+	llvm-size.1 \
+	llvm-stress.1 \
+	llvm-strings.1 \
+	llvm-strip.1 \
+	llvm-symbolizer.1 \
+	opt.1 \
+	tblgen.1
+
+CLANG_MAN1SRCS= \
+	clang.1 \
+	diagtool.1 \
+	scan-build.1
+
+EXTRAS_MAN1SRCS= \
+	extraclangtools.1
+
+LIT_MAN1SRCS= \
+	lit.1 \
+	FileCheck.1
+
+LLDB_MAN1SRCS= \
+	lldb.1
diff --git a/devel/llvm11/Makefile b/devel/llvm11/Makefile
index c9ee6841a25d..e8f66d19c899 100644
--- a/devel/llvm11/Makefile
+++ b/devel/llvm11/Makefile
@@ -170,44 +170,7 @@ PLIST_SUB+=	LLVM_RELEASE=${LLVM_RELEASE} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
-MAN1SRCS+=	bugpoint.1 \
-		dsymutil.1 \
-		llc.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-build.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-lib.1 \
-		llvm-lipo.1 \
-		llvm-link.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		opt.1 \
-		tblgen.1
+MAN1SRCS+=	${LLVM_MAN1SRCS}
 
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
@@ -254,9 +217,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${
 
 .if ${PORT_OPTIONS:MCLANG}
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		diagtool.1 \
-		scan-build.1
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 CLANG_PATTERN=	(c-index-test|clang|diagtool|hmaptool|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer|AnalyzerPlugin.so)
 SHEBANG_FILES+=	tools/clang/tools/scan-view/bin/scan-view \
 		tools/clang/tools/clang-format/clang-format-diff.py \
@@ -271,7 +232,7 @@ COMPILER_RT_PATTERN=	(sanitizer|include.xray|include\/fuzzer|profile\/InstrProfD
 
 .if ${PORT_OPTIONS:MEXTRAS}
 COMMANDS+=	${EXTRAS_COMMANDS}
-MAN1SRCS+=	extraclangtools.1
+MAN1SRCS+=	${EXTRAS_MAN1SRCS}
 PORTDOCS+=	clang-tools
 PLIST_DIRS+=	${LLVM_DIR}/include/clang-tidy/plugin
 SHEBANG_FILES+=	tools/clang/tools/extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py \
@@ -280,7 +241,7 @@ SHEBANG_FILES+=	tools/clang/tools/extra/clang-include-fixer/find-all-symbols/too
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 .endif
 
 .if ${PORT_OPTIONS:MLLD}
@@ -290,7 +251,7 @@ PORTDOCS+=	lld
 
 .if ${PORT_OPTIONS:MLLDB}
 COMMANDS+=	${LLDB_COMMANDS}
-MAN1SRCS+=	lldb.1
+MAN1SRCS+=	${LLDB_MAN1SRCS}
 USES+=		lua
 .endif
 
@@ -302,6 +263,7 @@ PYCLANG_PATTERN=	(clang\/(__init__|cindex|enumerations).py)$$
 
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 _FREEBSD_BACKENDS=	AArch64 ARM Mips PowerPC RISCV Sparc X86
 FREEBSD_BACKENDS=	${_FREEBSD_BACKENDS}
diff --git a/devel/llvm11/Makefile.MAN1SRCS b/devel/llvm11/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..d8b5619b44c0
--- /dev/null
+++ b/devel/llvm11/Makefile.MAN1SRCS
@@ -0,0 +1,54 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	dsymutil.1 \
+	llc.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-build.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
+	llvm-exegesis.1 \
+	llvm-extract.1 \
+	llvm-lib.1 \
+	llvm-lipo.1 \
+	llvm-link.1 \
+	llvm-locstats.1 \
+	llvm-mca.1 \
+	llvm-nm.1 \
+	llvm-objcopy.1 \
+	llvm-objdump.1 \
+	llvm-pdbutil.1 \
+	llvm-profdata.1 \
+	llvm-ranlib.1 \
+	llvm-readelf.1 \
+	llvm-readobj.1 \
+	llvm-size.1 \
+	llvm-stress.1 \
+	llvm-strings.1 \
+	llvm-strip.1 \
+	llvm-symbolizer.1 \
+	opt.1 \
+	tblgen.1
+
+CLANG_MAN1SRCS= \
+	clang.1 \
+	diagtool.1 \
+	scan-build.1
+
+EXTRAS_MAN1SRCS= \
+	extraclangtools.1
+
+LIT_MAN1SRCS= \
+	lit.1 \
+	FileCheck.1
+
+LLDB_MAN1SRCS= \
+	lldb.1
diff --git a/devel/llvm12/Makefile b/devel/llvm12/Makefile
index c36a3bd48739..d6ddffb680fc 100644
--- a/devel/llvm12/Makefile
+++ b/devel/llvm12/Makefile
@@ -175,46 +175,7 @@ PLIST_SUB+=	LLVM_RELEASE=${LLVM_RELEASE} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
-MAN1SRCS+=	bugpoint.1 \
-		dsymutil.1 \
-		llc.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-install-name-tool.1 \
-		llvm-lib.1 \
-		llvm-libtool-darwin.1 \
-		llvm-lipo.1 \
-		llvm-link.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-profgen.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		opt.1 \
-		xxx-tblgen.1
+MAN1SRCS+=	${LLVM_MAN1SRCS}
 
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
@@ -266,9 +227,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${
 .if ${PORT_OPTIONS:MCLANG}
 LLVM_ENABLE_PROJECTS+=	clang
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		diagtool.1 \
-		scan-build.1
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 CLANG_PATTERN=	(c-index-test|clang|diagtool|hmaptool|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer|AnalyzerPlugin.so)
 USES+=		gnome
 .endif
@@ -281,13 +240,13 @@ COMPILER_RT_PATTERN=	(sanitizer|include.xray|include\/fuzzer|profile\/InstrProfD
 .if ${PORT_OPTIONS:MEXTRAS}
 LLVM_ENABLE_PROJECTS+=	clang-tools-extra
 COMMANDS+=	${EXTRAS_COMMANDS}
-MAN1SRCS+=	extraclangtools.1
+MAN1SRCS+=	${EXTRAS_MAN1SRCS}
 PORTDOCS+=	clang-tools
 PLIST_DIRS+=	${LLVM_DIR}/include/clang-tidy/plugin
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 .endif
 
 .if ${PORT_OPTIONS:MLLD}
@@ -303,7 +262,7 @@ COMMANDS+=	${LLDB_COMMANDS}
 
 .if ${PORT_OPTIONS:MOPENMP}
 LLVM_ENABLE_PROJECTS+=	openmp
-MAN1SRCS+=	llvmopenmp.1
+MAN1SRCS+=	${OPENMP_MAN1SRCS}
 .endif
 OPENMP_PATTERN=	libarcher|lib[ig]*omp|omp.h|ompt.h|ompt-multiplex.h|omp-tools.h
 
@@ -317,6 +276,7 @@ CMAKE_ARGS+=	-DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS:ts;}"
 
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 _FREEBSD_BACKENDS=	AArch64 ARM Mips PowerPC RISCV Sparc X86
 FREEBSD_BACKENDS=	${_FREEBSD_BACKENDS}
diff --git a/devel/llvm12/Makefile.MAN1SRCS b/devel/llvm12/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..edbc30457a3d
--- /dev/null
+++ b/devel/llvm12/Makefile.MAN1SRCS
@@ -0,0 +1,56 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	dsymutil.1 \
+	llc.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
+	llvm-exegesis.1 \
+	llvm-extract.1 \
+	llvm-install-name-tool.1 \
+	llvm-lib.1 \
+	llvm-libtool-darwin.1 \
+	llvm-lipo.1 \
+	llvm-link.1 \
+	llvm-locstats.1 \
+	llvm-mca.1 \
+	llvm-nm.1 \
+	llvm-objcopy.1 \
+	llvm-objdump.1 \
+	llvm-pdbutil.1 \
+	llvm-profdata.1 \
+	llvm-profgen.1 \
+	llvm-ranlib.1 \
+	llvm-readelf.1 \
+	llvm-readobj.1 \
+	llvm-size.1 \
+	llvm-stress.1 \
+	llvm-strings.1 \
+	llvm-strip.1 \
+	llvm-symbolizer.1 \
+	opt.1 \
+	xxx-tblgen.1
+
+CLANG_MAN1SRCS= \
+	clang.1 \
+	diagtool.1 \
+	scan-build.1
+
+EXTRAS_MAN1SRCS= \
+	extraclangtools.1
+
+LIT_MAN1SRCS= \
+	lit.1 \
+	FileCheck.1
+
+OPENMP_MAN1SRCS= \
+	llvmopenmp.1
diff --git a/devel/llvm13/Makefile b/devel/llvm13/Makefile
index a9a852fb02b9..1b5b4e4bbdbb 100644
--- a/devel/llvm13/Makefile
+++ b/devel/llvm13/Makefile
@@ -196,48 +196,7 @@ PLIST_SUB+=	LLVM_RELEASE=${LLVM_RELEASE} \
 COMMANDS=	${LLVM_COMMANDS}
 FIRST_COMMAND=	${COMMANDS:C/^/XXXX/1:MXXXX*:C/^XXXX//}
 
-MAN1SRCS+=	bugpoint.1 \
-		dsymutil.1 \
-		llc.1 \
-		lli.1 \
-		llvm-addr2line.1 \
-		llvm-ar.1 \
-		llvm-as.1 \
-		llvm-bcanalyzer.1 \
-		llvm-config.1 \
-		llvm-cov.1 \
-		llvm-cxxfilt.1 \
-		llvm-cxxmap.1 \
-		llvm-diff.1 \
-		llvm-dis.1 \
-		llvm-dwarfdump.1 \
-		llvm-exegesis.1 \
-		llvm-extract.1 \
-		llvm-install-name-tool.1 \
-		llvm-lib.1 \
-		llvm-libtool-darwin.1 \
-		llvm-lipo.1 \
-		llvm-link.1 \
-		llvm-locstats.1 \
-		llvm-mca.1 \
-		llvm-nm.1 \
-		llvm-objcopy.1 \
-		llvm-objdump.1 \
-		llvm-otool.1 \
-		llvm-pdbutil.1 \
-		llvm-profdata.1 \
-		llvm-profgen.1 \
-		llvm-ranlib.1 \
-		llvm-readelf.1 \
-		llvm-readobj.1 \
-		llvm-size.1 \
-		llvm-stress.1 \
-		llvm-strings.1 \
-		llvm-strip.1 \
-		llvm-symbolizer.1 \
-		llvm-tblgen.1 \
-		tblgen.1 \
-		opt.1
+MAN1SRCS+=	${LLVM_MAN1SRCS}
 
 STRIP_LIBS=	BugpointPasses.so \
 		LLVMHello.so \
@@ -293,10 +252,7 @@ CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/arm64/aarch64/}-portbld-${OPSYS:tl}${
 .if ${PORT_OPTIONS:MCLANG}
 LLVM_ENABLE_PROJECTS+=	clang
 COMMANDS+=	${CLANG_COMMANDS}
-MAN1SRCS+=	clang.1 \
-		clang-tblgen.1 \
-		diagtool.1 \
-		scan-build.1
+MAN1SRCS+=	${CLANG_MAN1SRCS}
 CLANG_PATTERN=	(c-index-test|clang|diagtool|hmaptool|intercept-|libear|libscanbuild|analyze-|scan-|Reporter.py|ScanView.py|scanview.css|sorttable.js|startfile.py|-analyzer|AnalyzerPlugin.so)
 USES+=		gnome
 .endif
@@ -309,7 +265,7 @@ COMPILER_RT_PATTERN=	(sanitizer|include.xray|include\/fuzzer|profile\/InstrProfD
 .if ${PORT_OPTIONS:MEXTRAS}
 LLVM_ENABLE_PROJECTS+=	clang-tools-extra
 COMMANDS+=	${EXTRAS_COMMANDS}
-MAN1SRCS+=	extraclangtools.1
+MAN1SRCS+=	${EXTRAS_MAN1SRCS}
 PORTDOCS+=	clang-tools
 .endif
 
@@ -319,7 +275,7 @@ COMMANDS+=	${FLANG_COMMANDS}
 .endif
 
 .if ${PORT_OPTIONS:MLIT}
-MAN1SRCS+=	lit.1 FileCheck.1
+MAN1SRCS+=	${LIT_MAN1SRCS}
 .endif
 
 .if ${PORT_OPTIONS:MLLD}
@@ -330,19 +286,19 @@ PORTDOCS+=	lld
 
 .if ${PORT_OPTIONS:MLLDB}
 LLVM_ENABLE_PROJECTS+=	lldb
-MAN1SRCS+=	lldb-tblgen.1
+MAN1SRCS+=	${LLDB_MAN1SRCS}
 COMMANDS+=	${LLDB_COMMANDS}
 .endif
 
 .if ${PORT_OPTIONS:MMLIR}
 LLVM_ENABLE_PROJECTS+=	mlir
-MAN1SRCS+=	mlir-tblgen.1
+MAN1SRCS+=	${MLIR_MAN1SRCS}
 COMMANDS+=	${MLIR_COMMANDS}
 .endif
 
 .if ${PORT_OPTIONS:MOPENMP}
 LLVM_ENABLE_PROJECTS+=	openmp
-MAN1SRCS+=	llvmopenmp.1
+MAN1SRCS+=	${OPENMP_MAN1SRCS}
 COMMANDS+=	${OPENMP_COMMANDS}
 .endif
 OPENMP_PATTERN=	${OPENMP_COMMANDS:tW:C/  */|/g}|cmake\/openmp|libarcher|lib[ig]*omp|omp.h|ompt.h|ompt-multiplex.h|omp-tools.h
@@ -357,6 +313,7 @@ CMAKE_ARGS+=	-DLLVM_ENABLE_PROJECTS="${LLVM_ENABLE_PROJECTS:ts;}"
 
 .include <bsd.port.pre.mk>
 .include "${.CURDIR}/Makefile.COMMANDS"
+.include "${.CURDIR}/Makefile.MAN1SRCS"
 
 _FREEBSD_BACKENDS=	AArch64 ARM Mips PowerPC RISCV Sparc X86
 FREEBSD_BACKENDS=	${_FREEBSD_BACKENDS}
diff --git a/devel/llvm13/Makefile.MAN1SRCS b/devel/llvm13/Makefile.MAN1SRCS
new file mode 100644
index 000000000000..6bb713780dea
--- /dev/null
+++ b/devel/llvm13/Makefile.MAN1SRCS
@@ -0,0 +1,65 @@
+LLVM_MAN1SRCS= \
+	bugpoint.1 \
+	dsymutil.1 \
+	llc.1 \
+	lli.1 \
+	llvm-addr2line.1 \
+	llvm-ar.1 \
+	llvm-as.1 \
+	llvm-bcanalyzer.1 \
+	llvm-config.1 \
+	llvm-cov.1 \
+	llvm-cxxfilt.1 \
+	llvm-cxxmap.1 \
+	llvm-diff.1 \
+	llvm-dis.1 \
+	llvm-dwarfdump.1 \
*** 603 LINES SKIPPED ***