scripts/jobserver-exec: parse the last --jobserver-auth= option
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 14 Nov 2022 18:10:55 +0000 (03:10 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 21 Nov 2022 01:18:39 +0000 (10:18 +0900)
commitf8f4dc7685c72c8ef86420566a38a4f786613851
treef983ca07c729a4b96ec277234e86aaa50fd253f1
parentbe5ea98983efe2a2c5156c3b43e35a076d5b640d
scripts/jobserver-exec: parse the last --jobserver-auth= option

In the GNU Make manual, the section "Sharing Job Slots with GNU make"
says:

    Be aware that the MAKEFLAGS variable may contain multiple instances
    of the --jobserver-auth= option. Only the last instance is relevant.

Take the last element of the array, not the first.

Link: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
scripts/jobserver-exec