Re: [PATCH] kconfig: add build-only configurator targets
From: Masahiro Yamada
Date: Thu Aug 16 2018 - 21:56:10 EST
2018-08-17 1:30 GMT+09:00 Randy Dunlap <rdunlap@xxxxxxxxxxxxx>:
> On 08/15/2018 08:27 PM, Masahiro Yamada wrote:
>> 2018-08-15 9:36 GMT+09:00 Randy Dunlap <rdunlap@xxxxxxxxxxxxx>:
>>> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>>>
>>> Add build-only targets for build_menuconfig, build_nconfig,
>>> build_xconfig, and build_gconfig.
>>> (targets must end in "config" to qualify in top-level Makefile)
>>>
>>> This allows these target to be built without execution (e.g., to
>>> look for errors or warnings) and/or to be built and checked by sparse.
>>>
>>> Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
>>> ---
Applied to linux-kbuild. Thanks!
>>> scripts/kconfig/Makefile | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>>
>>> --- linux-next-20180814.orig/scripts/kconfig/Makefile
>>> +++ linux-next-20180814/scripts/kconfig/Makefile
>>> @@ -33,6 +33,14 @@ config: $(obj)/conf
>>> nconfig: $(obj)/nconf
>>> $< $(silent) $(Kconfig)
>>>
>>> +build_menuconfig: $(obj)/mconf
>>> +
>>> +build_nconfig: $(obj)/nconf
>>> +
>>> +build_gconfig: $(obj)/gconf
>>> +
>>> +build_xconfig: $(obj)/qconf
>>> +
>>> localyesconfig localmodconfig: $(obj)/conf
>>> $(Q)perl $(srctree)/$(src)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
>>> $(Q)if [ -f .config ]; then \
>>>
>>
>>
>> OK, seems useful,
>> but these should be phony targets.
>>
>> May I squash the following change?
>>
>
> Of course. Thanks.
>
>>
>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
>> index c0ca9ea..f7bdcc9 100644
>> --- a/scripts/kconfig/Makefile
>> +++ b/scripts/kconfig/Makefile
>> @@ -3,7 +3,8 @@
>> # Kernel configuration targets
>> # These targets are used from top-level makefile
>>
>> -PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig
>> +PHONY += xconfig gconfig menuconfig config localmodconfig localyesconfig \
>> + build_menuconfig build_nconfig build_gconfig build_xconfig
>>
>> ifdef KBUILD_KCONFIG
>> Kconfig := $(KBUILD_KCONFIG)
>
>
> --
> ~Randy
--
Best Regards
Masahiro Yamada