lkml.org 
[lkml]   [2018]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kconfig: remove redundant streamline_config.pl prerequisite
2018-03-01 23:39 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> 2018-03-01 20:18 GMT+09:00 Ulf Magnusson <ulfalizer@gmail.com>:
>> The local{yes,mod}config targets currently have streamline_config.pl as
>> a prerequisite. This is redundant, because streamline_config.pl is a
>> checked-in file with no prerequisites.
>>
>> Remove the prerequisite and reference streamline_config.pl directly in
>> the recipe of the rule instead.
>>
>> Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
>> ---
>> scripts/kconfig/Makefile | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
>> index 1f74336d4e23..58be52cb464d 100644
>
>
> Thanks! Almost good.
>
> Just small nits.
>
>
>> --- a/scripts/kconfig/Makefile
>> +++ b/scripts/kconfig/Makefile
>> @@ -77,9 +77,9 @@ silentoldconfig: $(obj)/conf
>> touch include/generated/autoksyms.h
>> $< $(silent) --$@ $(Kconfig)
>>
>> -localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
>> +localyesconfig localmodconfig: $(obj)/conf
>> $(Q)mkdir -p include/config include/generated
>> - $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
>> + $(Q)perl $(obj)/streamline_config.pl --$@ $(srctree) $(Kconfig) > .tmp.config
>
>
>
> '$(src)/streamline_config.pl' is better than '$(obj)/streamline_config.pl'
> since it is a checked-in file.
>
> '$(src)' and '$(obj)' are always the same.
> (https://github.com/torvalds/linux/blob/master/scripts/Makefile.build#L6)
>
>
> So, there is no effective difference.
> It is just a coding convention to use $(obj)/ for generated files,
> and $(src)/ for source files.
>
> The original code already used $(obj)/, so this is not your fault
> but I want to fix it while we are here.


No.

This is not a matter of taste,
but a bug that must be fixed.


This patch breaks out-of-tree build.

If O=... is given, it is error.


$ make O=foo localyesconfig
make[1]: Leaving directory '/home/masahiro/workspace/linux-yamada/foo'
masahiro@grover:~/workspace/linux-yamada$ make O=foo localyesconfig
make[1]: Entering directory '/home/masahiro/workspace/linux-yamada/foo'
GEN ./Makefile
Can't open perl script "scripts/kconfig/streamline_config.pl": No such
file or directory
../scripts/kconfig/Makefile:46: recipe for target 'localyesconfig' failed
make[2]: *** [localyesconfig] Error 2
/home/masahiro/workspace/linux-yamada/Makefile:521: recipe for target
'localyesconfig' failed
make[1]: *** [localyesconfig] Error 2
make[1]: Leaving directory '/home/masahiro/workspace/linux-yamada/foo'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2



The right fix is $(srctree)/$(src)/streamline_config.pl



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2018-03-01 15:46    [W:0.114 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site