1 |
Add a new @INCLUDES_EPREFIX tag that indicates that a particular |
2 |
function (= getter) or variable is a path that includes ${EPREFIX}. |
3 |
This will be used in pkgcheck to detect accidental variable and getter |
4 |
combinations that result in double prefix. |
5 |
|
6 |
Signed-off-by: Michał Górny <mgorny@g.o> |
7 |
--- |
8 |
eclass-to-manpage.awk | 9 +++++++++ |
9 |
1 file changed, 9 insertions(+) |
10 |
|
11 |
diff --git a/eclass-to-manpage.awk b/eclass-to-manpage.awk |
12 |
index 44708d4..f8620c8 100755 |
13 |
--- a/eclass-to-manpage.awk |
14 |
+++ b/eclass-to-manpage.awk |
15 |
@@ -33,6 +33,7 @@ |
16 |
# @MAINTAINER: |
17 |
# <optional; list of contacts, one per line> |
18 |
# [@INTERNAL] |
19 |
+# [@INCLUDES_EPREFIX] (the function outputs path that includes ${EPREFIX}) |
20 |
# @DESCRIPTION: |
21 |
# <required if no @RETURN; blurb about this function> |
22 |
|
23 |
@@ -42,6 +43,7 @@ |
24 |
# [@INTERNAL] (internal eclass use variable) |
25 |
# [@DEFAULT_UNSET] |
26 |
# [@REQUIRED] |
27 |
+# [@INCLUDES_EPREFIX] (the variable is a path that includes ${EPREFIX}) |
28 |
# @DESCRIPTION: |
29 |
# <required; blurb about this variable> |
30 |
# foo="<default value>" |
31 |
@@ -54,6 +56,7 @@ |
32 |
# [@INTERNAL] (internal eclass use variable) |
33 |
# [@DEFAULT_UNSET] |
34 |
# [@REQUIRED] |
35 |
+# [@INCLUDES_EPREFIX] (the variable is a path that includes ${EPREFIX}) |
36 |
# @DESCRIPTION: |
37 |
# <required; blurb about this variable> |
38 |
# foo="<default value>" |
39 |
@@ -252,6 +255,10 @@ function handle_function() { |
40 |
internal = 1 |
41 |
getline |
42 |
} |
43 |
+ if ($2 == "@INCLUDES_EPREFIX") { |
44 |
+ includes_eprefix = 1 |
45 |
+ getline |
46 |
+ } |
47 |
if ($2 == "@DESCRIPTION:") |
48 |
desc = eat_paragraph() |
49 |
|
50 |
@@ -314,6 +321,8 @@ function _handle_variable() { |
51 |
user_variable = 1 |
52 |
else if ($2 == "@OUTPUT_VARIABLE") |
53 |
output_variable = 1 |
54 |
+ else if ($2 == "@INCLUDES_EPREFIX") |
55 |
+ includes_eprefix = 1 |
56 |
else |
57 |
opts = 0 |
58 |
} |
59 |
-- |
60 |
2.22.0 |