git: 48eb5a86c10a - main - framework: improve llvm.mk documentation

From: Tobias C. Berner <tcberner_at_FreeBSD.org>
Date: Sun, 18 Dec 2022 08:38:37 UTC
The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=48eb5a86c10ac70ffe3be4d54f59d64f5bcae6c3

commit 48eb5a86c10ac70ffe3be4d54f59d64f5bcae6c3
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-12-18 08:34:05 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-12-18 08:38:06 +0000

    framework: improve llvm.mk documentation
    
    Previously it contained a copy-and-pasted unedited line for step 3).
    Switch to the better documentation copied from CHANGES.
    
    Reported by:    arrowd
---
 Mk/Uses/llvm.mk | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/Mk/Uses/llvm.mk b/Mk/Uses/llvm.mk
index 6fa1f60c5d41..2cae756fd280 100644
--- a/Mk/Uses/llvm.mk
+++ b/Mk/Uses/llvm.mk
@@ -1,17 +1,33 @@
 # Provides support to depend on LLVM
 #
-# It chooses the llvm port to be used based on the following constraint:
-#	1) no constraints given						=> ${LLVM_DEFAULT}
-#	2) exact constraint given					=> ${exact}
-#	2) max constraint given && ${max} < ${LLVM_DEFAULT}		=> ${max}
-#	3) min constraint given && ${LLVM_DEFAULT} < ${LLVM_DEFAULT}	=> ${LLVM_DEFAULT}
-
-# Usage:
-# 	USES=	llvm			- default version chosen
-# 	USES=	llvm:15			- exact constraint
-# 	USES=	llvm:min=9		- min constraint: max(min,default)
-# 	USES=	llvm:max=10		- max constraint: min(max,default)
-# 	USES=	llvm:min=10,max=11	- all constraint: max(min(max,default),default)
+# USES=llvm supports two kinds of arguments:
+#
+# * mode
+#         <none>:         defaults to build
+#         build:          add a BUILD_DEPENDS on chosen llvm-port
+#         run:            add a RUN_DEPENDS on chosen llvm-port
+#         lib:            add a LIB_DEPENDS on chosen llvm-port
+#
+# * version
+#         <none>:         defaults to ${LLVM_DEFAULT}
+#         number:         use explicitly the specified version
+#         min=number:     use specified min if ${LLVM_DEFAULT} is lower
+#         max=number:     use specified max if ${LLVM_DEFAULT} is higher
+#
+# An example usage might be:
+#         USES=   llvm
+#   or
+#         USES=   llvm:13,build
+#   or
+#         USES=   llvm:min=14,lib
+#
+# The following variables are exposed to be used in the ports tree at the moment:
+#         * LLVM_VERSION  version chosen from the arguments to llvm.mk
+#         * LLVM_PORT     chosen llvm port
+#         * LLVM_CONFIG   llvm-config of the chosen port
+#         * LLVM_LIBLLVM  libLLVM.so of the chosen port
+#         * LLVM_PREFIX   installation prefix of the chosen port
+#
 
 .if !defined(_INCLUDE_USES_LLVM_MK)
 _INCLUDE_USES_LLVM_MK=	YES