1 |
> On 2 Sep 2021, at 20:42, Mike Pagano <mpagano@g.o> wrote: |
2 |
> |
3 |
> Support the possibility that the Makefile could be |
4 |
> one of the following and should be checked in |
5 |
> the order described here: |
6 |
> |
7 |
> https://www.gnu.org/software/make/manual/make.html |
8 |
> |
9 |
> Order of checking and valid Makefiles names: |
10 |
> GNUMakefile, makefile, Makefile |
11 |
> |
12 |
> Bug: https://bugs.gentoo.org/663368 |
13 |
> |
14 |
> Signed-off-by: Mike Pagano <mpagano@g.o> |
15 |
> --- |
16 |
> eclass/linux-info.eclass | 33 +++++++++++++++++++++++++++++---- |
17 |
> 1 file changed, 29 insertions(+), 4 deletions(-) |
18 |
> |
19 |
> diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass |
20 |
> index 0b6df1bf5..2dfc8979f 100644 |
21 |
> --- a/eclass/linux-info.eclass |
22 |
> +++ b/eclass/linux-info.eclass |
23 |
> @@ -80,6 +80,15 @@ KERNEL_DIR="${KERNEL_DIR:-${ROOT%/}/usr/src/linux}" |
24 |
> # There are also a couple of variables which are set by this, and shouldn't be |
25 |
> # set by hand. These are as follows: |
26 |
> +# @ECLASS-VARIABLE: KERNEL_MAKEFILE |
27 |
> +# @INTERNAL |
28 |
> +# @DESCRIPTION: |
29 |
> +# According to upstream documentation, by default, when make looks for the makefile, it tries |
30 |
> +# the following names, in order: GNUmakefile, makefile and Makefile. Set this variable to the |
31 |
> +# proper Makefile name or the eclass will search in this order for it. |
32 |
> +# See https://www.gnu.org/software/make/manual/make.html |
33 |
> +: ${KERNEL_MAKEFILE:=""} |
34 |
|
35 |
Thanks for adding the reference! I'm often an advocate for adding _more_ links and explanation |
36 |
because while it's sometimes a bit dull to add, it makes life a lot easier later on when researching. |
37 |
|
38 |
> + |
39 |
> # @ECLASS-VARIABLE: KV_FULL |
40 |
> # @OUTPUT_VARIABLE |
41 |
> # @DESCRIPTION: |
42 |
> @@ -510,7 +519,9 @@ get_version() { |
43 |
> qeinfo " ${KV_DIR}" |
44 |
> fi |
45 |
> - if [ ! -s "${KV_DIR}/Makefile" ] |
46 |
> + get_makefile |
47 |
> + |
48 |
> + if [ ! -s "${KERNEL_MAKEFILE}" ] |
49 |
> then |
50 |
|
51 |
Can you use Bash tests instead? |
52 |
|
53 |
(https://devmanual.gentoo.org/tools-reference/bash/#single-versus-double-brackets-in-bash) |
54 |
|
55 |
Best, |
56 |
sam |