init/Kconfig: Specify the interpreter for rust-is-available.sh
authorSeongJae Park <sj@kernel.org>
Mon, 10 Jan 2022 08:59:52 +0000 (08:59 +0000)
committerMiguel Ojeda <ojeda@kernel.org>
Fri, 11 Feb 2022 19:43:14 +0000 (20:43 +0100)
commit847245fe812e178d9cdabcec70ebf9d02fb383e1
treec362f11e26fe342f2fba6c370081ed530ff4c784
parent255b71ccea93013885636098dbe69036ff2160c6
init/Kconfig: Specify the interpreter for rust-is-available.sh

Some common tools like 'diff' don't support permissions of the files.
Due to that, 'rust-is-available.sh' in some trees including '-mm' result in
having no execution permission, and therefore build fails like below:

    $ make O=../linux.out/ olddefconfig
    make[1]: Entering directory 'linux.out'
      GEN     Makefile
    sh: 1: linux/scripts/rust-is-available.sh: Permission denied
    init/Kconfig:71: syntax error
    init/Kconfig:70: invalid statement
    linux/scripts/kconfig/Makefile:77: recipe for target 'olddefconfig' failed
    make[2]: *** [olddefconfig] Error 1
    linux/Makefile:666: recipe for target 'olddefconfig' failed
    make[1]: *** [olddefconfig] Error 2
    make[1]: Leaving directory 'linux.out'
    Makefile:226: recipe for target '__sub-make' failed
    make: *** [__sub-make] Error 2

It's not a big deal, but not so fun.  This commit works around the issue
by specifying the interpreter for 'rust-is-available.sh' in the Kconfig file.
The ugly work around wouldn't be needed once 'rust-is-available.sh' file is
merged in the mainline with the execution permission.

Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
[Edited for new script]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
init/Kconfig