summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-04-11 22:37:14 +0200
committerSam James <sam@gentoo.org>2021-04-11 21:00:05 +0000
commitec597af5a1f701bea67abecfa0795e7569b07711 (patch)
tree646016f8f8b6f5540608abd2d92beeb3751a36c3 /eclass/flag-o-matic.eclass
parentflag-o-matic.eclass: Make test-flags-PROG() internal (diff)
downloadgentoo-ec597af5a1f701bea67abecfa0795e7569b07711.tar.gz
gentoo-ec597af5a1f701bea67abecfa0795e7569b07711.tar.bz2
gentoo-ec597af5a1f701bea67abecfa0795e7569b07711.zip
flag-o-matic.eclass: Fix eclassdoc
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass15
1 files changed, 14 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 0d2760d686f2..ed1b6e746cef 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -23,6 +23,8 @@ inherit toolchain-funcs
[[ ${EAPI} == [567] ]] && inherit eutils
+# @FUNCTION: all-flag-vars
+# @DESCRIPTION:
# Return all the flag variables that our high level funcs operate on.
all-flag-vars() {
echo {ADA,C,CPP,CXX,CCAS,F,FC,LD}FLAGS
@@ -110,7 +112,10 @@ _setup-allowed-flags() {
)
}
-# inverted filters for hardened compiler. This is trying to unpick
+# @FUNCTION: _filter-hardened
+# @INTERNAL
+# @DESCRIPTION:
+# Inverted filters for hardened compiler. This is trying to unpick
# the hardened compiler defaults.
_filter-hardened() {
local f
@@ -144,6 +149,9 @@ _filter-hardened() {
done
}
+# @FUNCTION: _filter-var
+# @INTERNAL
+# @DESCRIPTION:
# Remove occurrences of strings from variable given in $1
# Strings removed are matched as globs, so for example
# '-O*' would remove -O1, -O2 etc.
@@ -336,6 +344,11 @@ replace-cpu-flags() {
return 0
}
+# @FUNCTION: _is_flagq
+# @USAGE: <variable> <flag>
+# @INTERNAL
+# @DESCRIPTION:
+# Returns shell true if <flag> is in a given <variable>, else returns shell false.
_is_flagq() {
local x var="$1[*]"
for x in ${!var} ; do