2017-06-06 09:05:32

by Cao jin

[permalink] [raw]
Subject: [PATCH v2] Kbuild: tiny correction on `make help`

The help info of `make C=1` is little confusing, make it clear.

Signed-off-by: Cao jin <[email protected]>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index efa267a..bc9eb36 100644
--- a/Makefile
+++ b/Makefile
@@ -1417,7 +1417,7 @@ help:
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
- @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
+ @echo ' make C=1 [targets] Check re-compiled c source with $$CHECK (sparse by default)'
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
@echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
--
2.1.0




2017-06-06 15:01:18

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help`

2017-06-06 18:07 GMT+09:00 Cao jin <[email protected]>:
> The help info of `make C=1` is little confusing, make it clear.
>
> Signed-off-by: Cao jin <[email protected]>


Applied to linux-kbuild/fixes. Thanks!

--
Best Regards
Masahiro Yamada

2017-06-13 09:50:07

by Cao jin

[permalink] [raw]
Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help`

Yamada-san,

I have a question on the current top level Makefile. There are
following lines, I have trouble to understand "firstword x$(MAKEFLAGS)"
in 2nd line, why there is a 'x' there?


ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
quiet=silent_
tools_silent=s
endif
else # make-3.8x
ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
quiet=silent_
tools_silent=-s
endif
endif

I already read & understand your patch[*] and know these lines will be
modified, but I have spent quite a few days on understanding it, so I
still want to know the purpose of 'x'.

[*]https://lkml.org/lkml/2017/5/19/371

--
Sincerely,
Cao jin

On 06/06/2017 11:01 PM, Masahiro Yamada wrote:
> 2017-06-06 18:07 GMT+09:00 Cao jin <[email protected]>:
>> The help info of `make C=1` is little confusing, make it clear.
>>
>> Signed-off-by: Cao jin <[email protected]>
>
>
> Applied to linux-kbuild/fixes. Thanks!
>



2017-06-14 01:15:38

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help`

2017-06-13 18:52 GMT+09:00 Cao jin <[email protected]>:
> Yamada-san,
>
> I have a question on the current top level Makefile. There are
> following lines, I have trouble to understand "firstword x$(MAKEFLAGS)"
> in 2nd line, why there is a 'x' there?
>
>
> ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
> ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)


I do not understand the 'x' either.

Michal suggested the code according to the following:
https://patchwork.kernel.org/patch/3291301/
(I hope Michal can help you.)


My first guess was, it was added just in case $(MAKEFLAGS) is empty.
Actually $(firstword ) seems to work with empty argument, though.



--
Best Regards
Masahiro Yamada

2017-06-14 07:06:20

by Cao jin

[permalink] [raw]
Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help`



On 06/14/2017 09:15 AM, Masahiro Yamada wrote:
> 2017-06-13 18:52 GMT+09:00 Cao jin <[email protected]>:
>> Yamada-san,
>>
>> I have a question on the current top level Makefile. There are
>> following lines, I have trouble to understand "firstword x$(MAKEFLAGS)"
>> in 2nd line, why there is a 'x' there?
>>
>>
>> ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
>> ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
>
>
> I do not understand the 'x' either.
>
> Michal suggested the code according to the following:
> https://patchwork.kernel.org/patch/3291301/
> (I hope Michal can help you.)
>

It does helps.

>
> My first guess was, it was added just in case $(MAKEFLAGS) is empty.
> Actually $(firstword ) seems to work with empty argument, though.
>

I see, I guess you are saying it was added in case there is no
single-letter flags in $(MAKEFLAGS) while it has "--debug=jobs", that
make sense to me. Thanks very much, Yamada-san.

--
Sincerely,
Cao jin


2017-06-14 07:32:26

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH v2] Kbuild: tiny correction on `make help`

Dne 14.6.2017 v 09:08 Cao jin napsal(a):
>
>
> On 06/14/2017 09:15 AM, Masahiro Yamada wrote:
>> 2017-06-13 18:52 GMT+09:00 Cao jin <[email protected]>:
>>> Yamada-san,
>>>
>>> I have a question on the current top level Makefile. There are
>>> following lines, I have trouble to understand "firstword x$(MAKEFLAGS)"
>>> in 2nd line, why there is a 'x' there?
>>>
>>>
>>> ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
>>> ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
>>
>>
>> I do not understand the 'x' either.
>>
>> Michal suggested the code according to the following:
>> https://patchwork.kernel.org/patch/3291301/
>> (I hope Michal can help you.)
>>
>
> It does helps.
>
>>
>> My first guess was, it was added just in case $(MAKEFLAGS) is empty.
>> Actually $(firstword ) seems to work with empty argument, though.
>>
>
> I see, I guess you are saying it was added in case there is no
> single-letter flags in $(MAKEFLAGS) while it has "--debug=jobs", that
> make sense to me. Thanks very much, Yamada-san.

Well, it more than three years ago. But yes, I believe that was the
intention:

make --foo=s

x$(MAKEFLAGS) => x --foo=s
$(firstword x$(MAKEFLAGS)) => x

Michal