Re: [PATCH] kconfig: fix line number in recursive inclusion error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2018-03-02 16:05 GMT+09:00 Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>:
> When recursive inclusion is detected, the line number of the last
> 'included from:' is wrong.
>
> [Test Case]
>
> Kconfig:
>   -------->8--------
>   source "Kconfig2"
>   -------->8--------
>
> Kconfig2:
>   -------->8--------
>   source "Kconfig3"
>   -------->8--------
>
> Kconfig3:
>   -------->8--------
>   source "Kconfig"
>   -------->8--------
>
> [Result]
>
>   $ make allyesconfig
>   scripts/kconfig/conf  --allyesconfig Kconfig
>   Kconfig:1: recursive inclusion detected. Inclusion path:
>     current file : 'Kconfig'
>     included from: 'Kconfig3:1'
>     included from: 'Kconfig2:1'
>     included from: 'Kconfig:3'
>   scripts/kconfig/Makefile:89: recipe for target 'allyesconfig' failed
>   make[1]: *** [allyesconfig] Error 1
>   Makefile:512: recipe for target 'allyesconfig' failed
>   make: *** [allyesconfig] Error 2
>
> where we expect
>
>     current file : 'Kconfig'
>     included from: 'Kconfig3:1'
>     included from: 'Kconfig2:1'
>     included from: 'Kconfig:1'
>
> The 'iter->lineno+1' in the second fpinrtf() should be 'iter->lineno-1'.
> I refactored the code to merge two fprintf().
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> ---
>

Applied to linux-kbuild/fixes.



-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux